Unverified Commit e97a9fc5 authored by kladko's avatar kladko

SKALE-2454-add-logs-to-enclave

parent 09386fd2
......@@ -159,7 +159,7 @@ vector<string> ecdsaSignHash(const char *encryptedKeyHex, const char *hashHex, i
status = ecdsa_sign1(eid, &err_status, errMsg, encr_key, ECDSA_ENCR_LEN, (unsigned char *) hashHex, signature_r,
signature_s, &signature_v, base);
else
status = ecdsa_sign_aes(eid, &err_status, errMsg, encr_key, dec_len, (unsigned char *) hashHex, signature_r,
status = trustedEcdsaSignAES(eid, &err_status, errMsg, encr_key, dec_len, (unsigned char *) hashHex, signature_r,
signature_s, &signature_v, base);
if (err_status != 0) {
throw SGXException(-666, errMsg);
......
......@@ -273,7 +273,7 @@ void trustedGetPublicEcdsaKey(int *err_status, char *err_string,
point_clear(Pkey);
}
void ecdsa_sign1(int *err_status, char *err_string, uint8_t *encrypted_key, uint32_t dec_len,
void trustedEcdsaSign(int *err_status, char *err_string, uint8_t *encrypted_key, uint32_t dec_len,
unsigned char *hash, char *sig_r, char *sig_s, uint8_t *sig_v, int base) {
char* arr_m = NULL;
......@@ -1140,7 +1140,7 @@ void trustedGetPublicEcdsaKey_aes(int *err_status, char *err_string,
point_clear(Pkey);
}
void ecdsa_sign_aes(int *err_status, char *err_string, uint8_t *encrypted_key, uint32_t enc_len,
void trustedEcdsaSignAES(int *err_status, char *err_string, uint8_t *encrypted_key, uint32_t enc_len,
unsigned char *hash, char *sig_r, char *sig_s, uint8_t *sig_v, int base) {
domain_parameters curve = domain_parameters_init();
......
......@@ -99,7 +99,7 @@ enclave {
unsigned _t,
unsigned _n);
public void ecdsa_sign1(
public void trustedEcdsaSign(
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
......@@ -201,7 +201,7 @@ enclave {
[out, count = 1024] char * pub_key_x,
[out, count = 1024] char * pub_key_y);
public void ecdsa_sign_aes(
public void trustedEcdsaSignAES(
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
......@@ -259,7 +259,7 @@ enclave {
uint8_t _n,
uint8_t ind);
public void trustedGetPublicShares_aes (
public void trustedGetPublicShares_aes(
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
......
......@@ -5476,7 +5476,7 @@ void trustedGenDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_d
void trustedDecryptDkgSecret(int* err_status, char* err_string, uint8_t* encrypted_dkg_secret, uint8_t* decrypted_dkg_secret, uint32_t enc_len);
void trustedGetSecretShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* secret_shares, unsigned int _t, unsigned int _n);
void trustedGetPublicShares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* public_shares, unsigned int _t, unsigned int _n);
void ecdsa_sign1(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t dec_len, unsigned char* hash, char* signature, int test_len);
void trustedEcdsaSign(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t dec_len, unsigned char* hash, char* signature, int test_len);
sgx_status_t oc_realloc(uint64_t* retval, void* optr, size_t osz, size_t nsz);
sgx_status_t oc_free(void* optr, size_t sz);
......@@ -6940,7 +6940,7 @@ struct signature_s
mpz_t s;
};
void ecdsa_sign1(int *err_status, char *err_string, uint8_t *encrypted_key,
void trustedEcdsaSign(int *err_status, char *err_string, uint8_t *encrypted_key,
uint32_t dec_len, unsigned char* hash, char * signature, int test_len) {
domain_parameters curve = domain_parameters_init();
......
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