Unverified Commit 3a31ad35 authored by kladko's avatar kladko

SKALE-3067-cleanup-sgx

parent 0ff442ae
...@@ -10,24 +10,9 @@ enclave { ...@@ -10,24 +10,9 @@ enclave {
public void trustedEnclaveInit(uint32_t _logLevel); public void trustedEnclaveInit(uint32_t _logLevel);
public void trustedEMpzAdd(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void trustedEMpzMul(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void trustedEMpzDiv(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void trustedEMpfDiv(
[user_check] mpf_t *c, [user_check] mpf_t *a, [user_check] mpf_t *b
);
public void trustedGenerateEcdsaKey ( public void trustedGenerateEcdsaKey (
[user_check] 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_key, [out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[user_check] uint32_t *enc_len, [user_check] uint32_t *enc_len,
...@@ -35,7 +20,7 @@ enclave { ...@@ -35,7 +20,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_y); [out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedGetPublicEcdsaKey ( public void trustedGetPublicEcdsaKey (
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t dec_len, uint32_t dec_len,
...@@ -43,21 +28,21 @@ enclave { ...@@ -43,21 +28,21 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_y); [out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedEncryptKey ( public void trustedEncryptKey (
[user_check] 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] const char* key, [in, count = SMALL_BUF_SIZE] const char* key,
[out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key, [out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[user_check] uint32_t *enc_len); [user_check] uint32_t *enc_len);
public void trustedDecryptKey ( public void trustedDecryptKey (
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
[out, count = SMALL_BUF_SIZE] char* key ); [out, count = SMALL_BUF_SIZE] char* key );
public void trustedBlsSignMessage ( public void trustedBlsSignMessage (
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
...@@ -66,21 +51,21 @@ enclave { ...@@ -66,21 +51,21 @@ enclave {
[out, count = SMALL_BUF_SIZE] char* signature); [out, count = SMALL_BUF_SIZE] char* signature);
public void trustedGenDkgSecret ( public void trustedGenDkgSecret (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = 3050] uint8_t* encrypted_dkg_secret, [out, count = 3050] uint8_t* encrypted_dkg_secret,
[user_check] uint32_t * enc_len, [user_check] uint32_t * enc_len,
size_t _t); size_t _t);
public void trustedDecryptDkgSecret ( public void trustedDecryptDkgSecret (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = 2490] 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 trustedGetSecretShares ( public void trustedGetSecretShares (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[user_check] uint32_t* dec_len, [user_check] uint32_t* dec_len,
...@@ -89,7 +74,7 @@ enclave { ...@@ -89,7 +74,7 @@ enclave {
unsigned _n); unsigned _n);
public void trustedGetPublicShares ( public void trustedGetPublicShares (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len, uint32_t enc_len,
...@@ -98,7 +83,7 @@ enclave { ...@@ -98,7 +83,7 @@ enclave {
unsigned _n); unsigned _n);
public void trustedEcdsaSign( public void trustedEcdsaSign(
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
...@@ -108,7 +93,7 @@ enclave { ...@@ -108,7 +93,7 @@ enclave {
[user_check] uint8_t* sig_v, [user_check] uint8_t* sig_v,
int base); int base);
public void trustedSetEncryptedDkgPoly( [user_check] 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 = 3050] uint8_t* encrypted_poly); [in, count = 3050] uint8_t* encrypted_poly);
...@@ -125,7 +110,7 @@ enclave { ...@@ -125,7 +110,7 @@ enclave {
uint8_t ind); uint8_t ind);
public void trustedDkgVerify( public void trustedDkgVerify(
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 8193] const char* public_shares, [in, count = 8193] const char* public_shares,
[in, count = 193] const char* s_share, [in, count = 193] const char* s_share,
...@@ -152,7 +137,7 @@ enclave { ...@@ -152,7 +137,7 @@ enclave {
[out, count = 320] char* bls_pub_key); [out, count = 320] char* bls_pub_key);
public void trustedComplaintResponse( public void trustedComplaintResponse(
[user_check] 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 *encryptedDHKey, [in, count = SMALL_BUF_SIZE] uint8_t *encryptedDHKey,
[in, count = 3050] uint8_t *encrypted_dkg_secret, [in, count = 3050] uint8_t *encrypted_dkg_secret,
...@@ -164,27 +149,27 @@ enclave { ...@@ -164,27 +149,27 @@ enclave {
uint8_t ind1); uint8_t ind1);
public void trustedGenerateSEK( public void trustedGenerateSEK(
[user_check] 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_SEK, [out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[user_check] uint32_t *enc_len, [user_check] uint32_t *enc_len,
[out, count = 65] char* hex_SEK); [out, count = 65] char* hex_SEK);
public void trustedSetSEK( public void trustedSetSEK(
[user_check] 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_SEK, [in, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
uint64_t encr_len); uint64_t encr_len);
public void trustedSetSEK_backup( public void trustedSetSEK_backup(
[user_check] 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_SEK, [out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[user_check] uint32_t *enc_len, [user_check] uint32_t *enc_len,
[in, count = 65] const char* SEK_hex); [in, count = 65] const char* SEK_hex);
public void trustedGenerateEcdsaKeyAES ( public void trustedGenerateEcdsaKeyAES (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = ECDSA_ENCR_LEN] uint8_t* encrypted_key, [out, count = ECDSA_ENCR_LEN] uint8_t* encrypted_key,
[user_check] uint32_t *enc_len, [user_check] uint32_t *enc_len,
...@@ -192,7 +177,7 @@ enclave { ...@@ -192,7 +177,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_y); [out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedGetPublicEcdsaKeyAES( public void trustedGetPublicEcdsaKeyAES(
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t dec_len, uint32_t dec_len,
...@@ -200,7 +185,7 @@ enclave { ...@@ -200,7 +185,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_y); [out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedEcdsaSignAES( public void trustedEcdsaSignAES(
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
...@@ -211,34 +196,34 @@ enclave { ...@@ -211,34 +196,34 @@ enclave {
int base); int base);
public void trustedEncryptKeyAES ( public void trustedEncryptKeyAES (
[user_check] 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] const char* key, [in, count = SMALL_BUF_SIZE] const char* key,
[out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key, [out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[user_check] uint32_t *enc_len); [user_check] uint32_t *enc_len);
public void trustedDecryptKeyAES ( public void trustedDecryptKeyAES (
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
[out, count = SMALL_BUF_SIZE] char* key ); [out, count = SMALL_BUF_SIZE] char* key );
public void trustedGenDkgSecretAES ( public void trustedGenDkgSecretAES (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = 3050] uint8_t* encrypted_dkg_secret, [out, count = 3050] uint8_t* encrypted_dkg_secret,
[user_check] uint32_t * enc_len, size_t _t); [user_check] uint32_t * enc_len, size_t _t);
public void trustedDecryptDkgSecretAES ( public void trustedDecryptDkgSecretAES (
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = 2490] 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(
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly, [in, count = 3050] uint8_t* encrypted_poly,
[user_check] uint64_t* enc_len); [user_check] uint64_t* enc_len);
...@@ -256,7 +241,7 @@ enclave { ...@@ -256,7 +241,7 @@ enclave {
uint8_t ind); uint8_t ind);
public void trustedGetPublicSharesAES( public void trustedGetPublicSharesAES(
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret, [in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len, uint32_t enc_len,
...@@ -265,7 +250,7 @@ enclave { ...@@ -265,7 +250,7 @@ enclave {
unsigned _n); unsigned _n);
public void trustedDkgVerifyAES( public void trustedDkgVerifyAES(
[user_check] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 8193] const char* public_shares, [in, count = 8193] const char* public_shares,
[in, count = 193] const char* s_share, [in, count = 193] const char* s_share,
...@@ -285,7 +270,7 @@ enclave { ...@@ -285,7 +270,7 @@ enclave {
[user_check] uint32_t *enc_bls_key_len); [user_check] uint32_t *enc_bls_key_len);
public void trustedBlsSignMessageAES ( public void trustedBlsSignMessageAES (
[user_check] 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_key, [in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len, uint32_t enc_len,
......
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