Unverified Commit 6b7165fb authored by kladko's avatar kladko

SKALE-2454-add-logs-to-enclave

parent 4a103ecf
...@@ -266,7 +266,7 @@ bool sign_aes(const char *_encryptedKeyHex, const char *_hashHex, size_t _t, siz ...@@ -266,7 +266,7 @@ bool sign_aes(const char *_encryptedKeyHex, const char *_hashHex, size_t _t, siz
} }
sgx_status_t status = sgx_status_t status =
trustedBlsSignMessage_aes(eid, &errStatus, errMsg, encryptedKey, trustedBlsSignMessageAES(eid, &errStatus, errMsg, encryptedKey,
sz, xStrArg, yStrArg, signature); sz, xStrArg, yStrArg, signature);
......
...@@ -300,7 +300,7 @@ bool CreateBLSShare(const string &blsKeyName, const char *s_shares, const char * ...@@ -300,7 +300,7 @@ bool CreateBLSShare(const string &blsKeyName, const char *s_shares, const char *
if (!encryptKeys) if (!encryptKeys)
trustedCreateBlsKey(eid, &errStatus, errMsg, s_shares, encr_key, decKeyLen, encr_bls_key, &enc_bls_len); trustedCreateBlsKey(eid, &errStatus, errMsg, s_shares, encr_key, decKeyLen, encr_bls_key, &enc_bls_len);
else else
trustedCreateBlsKey_aes(eid, &errStatus, errMsg, s_shares, encr_key, decKeyLen, encr_bls_key, &enc_bls_len); trustedCreateBlsKeyAES(eid, &errStatus, errMsg, s_shares, encr_key, decKeyLen, encr_bls_key, &enc_bls_len);
if (errStatus != 0) { if (errStatus != 0) {
......
...@@ -54,7 +54,7 @@ std::vector<std::string> genECDSAKey() { ...@@ -54,7 +54,7 @@ std::vector<std::string> genECDSAKey() {
if (!encryptKeys) if (!encryptKeys)
status = trustedGenerateEcdsaKey(eid, &errStatus, errMsg, encr_pr_key, &enc_len, pub_key_x, pub_key_y); status = trustedGenerateEcdsaKey(eid, &errStatus, errMsg, encr_pr_key, &enc_len, pub_key_x, pub_key_y);
else else
status = trustedGenerateEcdsaKey_aes(eid, &errStatus, errMsg, encr_pr_key, &enc_len, pub_key_x, pub_key_y); status = trustedGenerateEcdsaKeyAES(eid, &errStatus, errMsg, encr_pr_key, &enc_len, pub_key_x, pub_key_y);
if (status != SGX_SUCCESS || errStatus != 0) { if (status != SGX_SUCCESS || errStatus != 0) {
spdlog::error("RPCException thrown with status {}", status); spdlog::error("RPCException thrown with status {}", status);
...@@ -116,7 +116,7 @@ std::string getECDSAPubKey(const char *_encryptedKeyHex) { ...@@ -116,7 +116,7 @@ std::string getECDSAPubKey(const char *_encryptedKeyHex) {
if (!encryptKeys) if (!encryptKeys)
status = trustedGetPublicEcdsaKey(eid, &errStatus, errMsg.data(), encrPrKey.data(), enc_len, pubKeyX.data(), status = trustedGetPublicEcdsaKey(eid, &errStatus, errMsg.data(), encrPrKey.data(), enc_len, pubKeyX.data(),
pubKeyY.data()); pubKeyY.data());
else status = trustedGetPublicEcdsaKey_aes(eid, &errStatus, else status = trustedGetPublicEcdsaKeyAES(eid, &errStatus,
errMsg.data(), encrPrKey.data(), enc_len, pubKeyX.data(), pubKeyY.data()); errMsg.data(), encrPrKey.data(), enc_len, pubKeyX.data(), pubKeyY.data());
if (errStatus != 0) { if (errStatus != 0) {
throw SGXException(-666, errMsg.data()); throw SGXException(-666, errMsg.data());
......
...@@ -997,7 +997,7 @@ void trustedSetSEK_backup(int *errStatus, char *err_string, ...@@ -997,7 +997,7 @@ void trustedSetSEK_backup(int *errStatus, char *err_string,
*enc_len = sealedLen; *enc_len = sealedLen;
} }
void trustedGenerateEcdsaKey_aes(int *errStatus, char *err_string, void trustedGenerateEcdsaKeyAES(int *errStatus, char *err_string,
uint8_t *encrypted_key, uint32_t *enc_len, char *pub_key_x, char *pub_key_y) { uint8_t *encrypted_key, uint32_t *enc_len, char *pub_key_x, char *pub_key_y) {
domain_parameters curve = domain_parameters_init(); domain_parameters curve = domain_parameters_init();
...@@ -1069,7 +1069,7 @@ void trustedGenerateEcdsaKey_aes(int *errStatus, char *err_string, ...@@ -1069,7 +1069,7 @@ void trustedGenerateEcdsaKey_aes(int *errStatus, char *err_string,
point_clear(Pkey); point_clear(Pkey);
} }
void trustedGetPublicEcdsaKey_aes(int *errStatus, char *err_string, void trustedGetPublicEcdsaKeyAES(int *errStatus, char *err_string,
uint8_t *encrypted_key, uint32_t enc_len, char *pub_key_x, char *pub_key_y) { uint8_t *encrypted_key, uint32_t enc_len, char *pub_key_x, char *pub_key_y) {
domain_parameters curve = domain_parameters_init(); domain_parameters curve = domain_parameters_init();
...@@ -1315,7 +1315,7 @@ void decrypt_key_aes(int *errStatus, char *err_string, uint8_t *encrypted_key, ...@@ -1315,7 +1315,7 @@ void decrypt_key_aes(int *errStatus, char *err_string, uint8_t *encrypted_key,
} }
void trustedBlsSignMessage_aes(int *errStatus, char *err_string, uint8_t *encrypted_key, void trustedBlsSignMessageAES(int *errStatus, char *err_string, uint8_t *encrypted_key,
uint32_t enc_len, char *_hashX, uint32_t enc_len, char *_hashX,
char *_hashY, char *signature) { char *_hashY, char *signature) {
...@@ -1430,7 +1430,7 @@ void trustedGetEncryptedSecretShare_aes(int *errStatus, char *err_string, uint8_ ...@@ -1430,7 +1430,7 @@ void trustedGetEncryptedSecretShare_aes(int *errStatus, char *err_string, uint8_
uint32_t enc_len; uint32_t enc_len;
trustedGenerateEcdsaKey_aes(errStatus, err_string, encrypted_skey, &enc_len, pub_key_x, pub_key_y); trustedGenerateEcdsaKeyAES(errStatus, err_string, encrypted_skey, &enc_len, pub_key_x, pub_key_y);
if (*errStatus != 0) { if (*errStatus != 0) {
return; return;
} }
...@@ -1587,7 +1587,7 @@ void trustedDkgVerify_aes(int *errStatus, char *err_string, const char *public_s ...@@ -1587,7 +1587,7 @@ void trustedDkgVerify_aes(int *errStatus, char *err_string, const char *public_s
} }
void trustedCreateBlsKey_aes(int *errStatus, char *err_string, const char *s_shares, void trustedCreateBlsKeyAES(int *errStatus, char *err_string, const char *s_shares,
uint8_t *encrypted_key, uint64_t key_len, uint8_t *encr_bls_key, uint32_t *enc_bls_key_len) { uint8_t *encrypted_key, uint64_t key_len, uint8_t *encr_bls_key, uint32_t *enc_bls_key_len) {
char skey[ECDSA_SKEY_LEN]; char skey[ECDSA_SKEY_LEN];
......
...@@ -185,7 +185,7 @@ enclave { ...@@ -185,7 +185,7 @@ enclave {
[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 trustedGenerateEcdsaKey_aes ( public void trustedGenerateEcdsaKeyAES (
[user_check] int *errStatus, [user_check] 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,
...@@ -193,7 +193,7 @@ enclave { ...@@ -193,7 +193,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_x, [out, count = SMALL_BUF_SIZE] char * pub_key_x,
[out, count = SMALL_BUF_SIZE] char * pub_key_y); [out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedGetPublicEcdsaKey_aes( public void trustedGetPublicEcdsaKeyAES(
[user_check] int *errStatus, [user_check] 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,
...@@ -280,7 +280,7 @@ enclave { ...@@ -280,7 +280,7 @@ enclave {
[user_check] int* result); [user_check] int* result);
public void trustedCreateBlsKey_aes( public void trustedCreateBlsKeyAES(
[user_check]int *errStatus, [user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 6145] const char* s_shares, [in, count = 6145] const char* s_shares,
...@@ -289,7 +289,7 @@ enclave { ...@@ -289,7 +289,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key, [out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[user_check] uint32_t *enc_bls_key_len); [user_check] uint32_t *enc_bls_key_len);
public void trustedBlsSignMessage_aes ( public void trustedBlsSignMessageAES (
[user_check] int *errStatus, [user_check] 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,
......
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