Assignment 7 #4
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ int get_private_key_size() {
|
||||||
return SK_SIZE;
|
return SK_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
sgx_status_t seal_key_pair(sgx_ec256_private_t *private, sgx_ec256_public_t *public, uint8_t **sealed, uint32_t sealed_size) {
|
static sgx_status_t seal_key_pair(sgx_ec256_private_t *private, sgx_ec256_public_t *public, uint8_t **sealed, uint32_t sealed_size) {
|
||||||
// invalid parameter handling
|
// invalid parameter handling
|
||||||
if((private == NULL) || (public == NULL))
|
if((private == NULL) || (public == NULL))
|
||||||
return SGX_ERROR_INVALID_PARAMETER;
|
return SGX_ERROR_INVALID_PARAMETER;
|
||||||
|
@ -103,7 +103,7 @@ sgx_status_t seal_key_pair(sgx_ec256_private_t *private, sgx_ec256_public_t *pub
|
||||||
return sgx_seal_data(PK_SIZE, (const uint8_t *)pk, SK_SIZE, (const uint8_t *)sk, size, (sgx_sealed_data_t *) *sealed);
|
return sgx_seal_data(PK_SIZE, (const uint8_t *)pk, SK_SIZE, (const uint8_t *)sk, size, (sgx_sealed_data_t *) *sealed);
|
||||||
}
|
}
|
||||||
|
|
||||||
sgx_status_t unseal_key_pair(const uint8_t *sealed, sgx_ec256_private_t *private, sgx_ec256_public_t *public) {
|
static sgx_status_t unseal_key_pair(const uint8_t *sealed, sgx_ec256_private_t *private, sgx_ec256_public_t *public) {
|
||||||
// invalid parameter handling
|
// invalid parameter handling
|
||||||
if(sealed == NULL) {
|
if(sealed == NULL) {
|
||||||
return SGX_ERROR_INVALID_PARAMETER;
|
return SGX_ERROR_INVALID_PARAMETER;
|
||||||
|
|
Loading…
Reference in a new issue