Added gmp

parent 16123e54
......@@ -132,6 +132,8 @@ void encrypt_key(int *err_status, unsigned char* key, unsigned char* encrypted_k
*err_status = -4;
memset(encrypted_key, 0, sealedLen);
if (sgx_seal_data(0, NULL, strlen(key) + 1, key, sealedLen, encrypted_key) != SGX_SUCCESS)
return;
......@@ -140,3 +142,11 @@ void encrypt_key(int *err_status, unsigned char* key, unsigned char* encrypted_k
*err_status = 0;
}
void decrypt_key(int *err_status, unsigned char* encrypted_key, unsigned char* key, uint32_t *dec_len) {
*err_status = -1;
}
......@@ -25,6 +25,13 @@ enclave {
[user_check] int *err_status,
[in, count = 128] unsigned char* key,
[out, count = 1024] unsigned char* encrypted_key, [user_check] uint32_t *enc_len);
public void decrypt_key (
[user_check] int *err_status,
[in, count = 1024] unsigned char* encrypted_key,
[out, count = 128] unsigned char* key, [user_check] uint32_t *dec_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