Unverified Commit 3a9c61fd authored by kladko's avatar kladko

Revert "SKALE-3067-cleanup-sgx"

This reverts commit 2b3422d0.
parent 2b3422d0
...@@ -1340,7 +1340,8 @@ trustedGenDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_s ...@@ -1340,7 +1340,8 @@ trustedGenDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_s
void void
trustedDecryptDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_secret, trustedDecryptDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_dkg_secret,
uint8_t *decrypted_dkg_secret, uint32_t *dec_len) { uint8_t *decrypted_dkg_secret,
uint32_t *dec_len) {
LOG_DEBUG(__FUNCTION__); LOG_DEBUG(__FUNCTION__);
int status = AES_decrypt(encrypted_dkg_secret, *dec_len, (char *) decrypted_dkg_secret); int status = AES_decrypt(encrypted_dkg_secret, *dec_len, (char *) decrypted_dkg_secret);
......
...@@ -3,9 +3,6 @@ ...@@ -3,9 +3,6 @@
#define ECDSA_ENCR_LEN 93 #define ECDSA_ENCR_LEN 93
#define ECDSA_BIN_LEN 33 #define ECDSA_BIN_LEN 33
#define SMALL_BUF_SIZE 1024 #define SMALL_BUF_SIZE 1024
#define SMALL_BUF_SIZE3 3072
#define SMALL_BUF_SIZE10 10240
#define SMALL_BUF_SIZE7 7168
enclave { enclave {
trusted { trusted {
...@@ -56,32 +53,32 @@ enclave { ...@@ -56,32 +53,32 @@ enclave {
public void trustedGenDkgSecret ( public void trustedGenDkgSecret (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [out, count = 3050] uint8_t* encrypted_dkg_secret,
[out] uint32_t * enc_len, [out] uint32_t * enc_len,
size_t _t); size_t _t);
public void trustedDecryptDkgSecret ( public void trustedDecryptDkgSecret (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = SMALL_BUF_SIZE3] uint8_t* decrypted_dkg_secret, [out, count = 2490] uint8_t* decrypted_dkg_secret,
[out] uint32_t* dec_len); [out] uint32_t* dec_len);
public void trustedGetSecretShares ( public void trustedGetSecretShares (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[out] uint32_t* dec_len, [out] uint32_t* dec_len,
[out, count = SMALL_BUF_SIZE3] char* secret_shares, [out, count = 2490] char* secret_shares,
unsigned _t, unsigned _t,
unsigned _n); unsigned _n);
public void trustedGetPublicShares ( public void trustedGetPublicShares (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len, uint32_t enc_len,
[out, count = SMALL_BUF_SIZE10] char* public_shares, [out, count = 10000] char* public_shares,
unsigned _t, unsigned _t,
unsigned _n); unsigned _n);
...@@ -98,15 +95,15 @@ enclave { ...@@ -98,15 +95,15 @@ enclave {
public void trustedSetEncryptedDkgPoly( [out] int *errStatus, public void trustedSetEncryptedDkgPoly( [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_poly); [in, count = 3050] uint8_t* encrypted_poly);
public void trustedGetEncryptedSecretShare( public void trustedGetEncryptedSecretShare(
[out]int *errStatus, [out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string, [out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey, [out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint32_t* dec_len, [out] uint32_t* dec_len,
[out, count = SMALL_BUF_SIZE3] char* result_str, [out, count = 193] char* result_str,
[out, count = SMALL_BUF_SIZE3] char* s_shareG2, [out, count = 320] char* s_shareG2,
[in, string] char* pub_keyB, [in, string] char* pub_keyB,
uint8_t _t, uint8_t _t,
uint8_t _n, uint8_t _n,
...@@ -137,14 +134,14 @@ enclave { ...@@ -137,14 +134,14 @@ enclave {
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len, uint64_t key_len,
[out, count = SMALL_BUF_SIZE] char* bls_pub_key); [out, count = 320] char* bls_pub_key);
public void trustedComplaintResponse( public void trustedComplaintResponse(
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t *encrypted_dkg_secret, [in, count = 3050] uint8_t *encrypted_dkg_secret,
[out] uint32_t* dec_len, [out] uint32_t* dec_len,
[out, count = SMALL_BUF_SIZE] char* s_shareG2, [out, count = 320] char* s_shareG2,
uint8_t _t, uint8_t _t,
uint8_t _n, uint8_t _n,
uint8_t ind1); uint8_t ind1);
...@@ -154,7 +151,7 @@ enclave { ...@@ -154,7 +151,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char *err_string, [out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK, [out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[out] uint32_t *enc_len, [out] uint32_t *enc_len,
[out, count = SMALL_BUF_SIZE] char* hex_SEK); [out, count = 65] char* hex_SEK);
public void trustedSetSEK( public void trustedSetSEK(
[out] int *errStatus, [out] int *errStatus,
...@@ -213,20 +210,20 @@ enclave { ...@@ -213,20 +210,20 @@ enclave {
public void trustedGenDkgSecretAES ( public void trustedGenDkgSecretAES (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [out, count = 3050] uint8_t* encrypted_dkg_secret,
[out] uint32_t * enc_len, size_t _t); [out] uint32_t * enc_len, size_t _t);
public void trustedDecryptDkgSecretAES ( public void trustedDecryptDkgSecretAES (
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = SMALL_BUF_SIZE3] uint8_t* decrypted_dkg_secret, [out, count = 2490] uint8_t* decrypted_dkg_secret,
[user_check] uint32_t* dec_len); [user_check] uint32_t* dec_len);
public void trustedSetEncryptedDkgPolyAES( public void trustedSetEncryptedDkgPolyAES(
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_poly, [in, count = 3050] uint8_t* encrypted_poly,
[out] uint64_t* enc_len); [out] uint64_t* enc_len);
public void trustedGetEncryptedSecretShareAES( public void trustedGetEncryptedSecretShareAES(
...@@ -234,8 +231,8 @@ enclave { ...@@ -234,8 +231,8 @@ enclave {
[out, count = SMALL_BUF_SIZE] char *err_string, [out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey, [out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[out] uint32_t* dec_len, [out] uint32_t* dec_len,
[out, count = SMALL_BUF_SIZE] char* result_str, [out, count = 193] char* result_str,
[out, count = SMALL_BUF_SIZE] char* s_shareG2, [out, count = 320] char* s_shareG2,
[in, string] char* pub_keyB, [in, string] char* pub_keyB,
uint8_t _t, uint8_t _t,
uint8_t _n, uint8_t _n,
...@@ -244,9 +241,9 @@ enclave { ...@@ -244,9 +241,9 @@ enclave {
public void trustedGetPublicSharesAES( public void trustedGetPublicSharesAES(
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE3] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len, uint32_t enc_len,
[out, count = SMALL_BUF_SIZE10] char* public_shares, [out, count = 10000] char* public_shares,
unsigned _t, unsigned _t,
unsigned _n); unsigned _n);
...@@ -264,7 +261,7 @@ enclave { ...@@ -264,7 +261,7 @@ enclave {
public void trustedCreateBlsKeyAES( public void trustedCreateBlsKeyAES(
[out]int *errStatus, [out]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE7] const char* s_shares, [in, count = 6145] const char* s_shares,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len, uint64_t key_len,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key, [out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
...@@ -284,7 +281,7 @@ enclave { ...@@ -284,7 +281,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len, uint64_t key_len,
[out, count = SMALL_BUF_SIZE] char* bls_pub_key); [out, count = 320] char* bls_pub_key);
}; };
untrusted { untrusted {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment