Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
53fefaa7
Unverified
Commit
53fefaa7
authored
Apr 17, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2454-add-logs-to-enclave
parent
73eea1be
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
57 additions
and
57 deletions
+57
-57
BLSCrypto.cpp
BLSCrypto.cpp
+3
-3
BLSPrivateKeyShareSGX.cpp
BLSPrivateKeyShareSGX.cpp
+8
-8
ECDSACrypto.cpp
ECDSACrypto.cpp
+4
-4
ServerInit.cpp
ServerInit.cpp
+2
-2
secure_enclave.c
secure_enclave/secure_enclave.c
+13
-13
secure_enclave.edl
secure_enclave/secure_enclave.edl
+11
-11
secure_enclave.i
secure_enclave/secure_enclave.i
+12
-12
testw.cpp
testw.cpp
+4
-4
No files found.
BLSCrypto.cpp
View file @
53fefaa7
...
...
@@ -267,13 +267,13 @@ bool sign_aes(const char *_encryptedKeyHex, const char *_hashHex, size_t _t, siz
}
sgx_status_t
status
=
bls_sign_m
essage_aes
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
trustedBlsSignM
essage_aes
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
sz
,
xStrArg
,
yStrArg
,
signature
);
if
(
status
!=
SGX_SUCCESS
)
{
cerr
<<
"SGX enclave call to
bls_sign_m
essage failed:"
<<
status
<<
std
::
endl
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to
bls_sign_m
essage failed"
));
cerr
<<
"SGX enclave call to
trustedBlsSignM
essage failed:"
<<
status
<<
std
::
endl
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to
trustedBlsSignM
essage failed"
));
}
...
...
BLSPrivateKeyShareSGX.cpp
View file @
53fefaa7
...
...
@@ -165,7 +165,7 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
cerr
<<
"Key is "
+
*
encryptedKeyHex
<<
endl
;
sgx_status_t
status
=
bls_sign_m
essage
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
trustedBlsSignM
essage
(
eid
,
&
errStatus
,
errMsg
,
encryptedKey
,
encryptedKeyHex
->
size
()
/
2
,
xStrArg
,
yStrArg
,
signature
);
// strncpy(signature, "8175162913343900215959836578795929492705714455632345516427532159927644835012:15265825550804683171644566522808807137117748565649051208189914766494241035855", 1024);
...
...
@@ -174,13 +174,13 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
if
(
status
!=
SGX_SUCCESS
)
{
gmp_printf
(
"SGX enclave call to
bls_sign_m
essage failed: 0x%04x
\n
"
,
status
);
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to
bls_sign_m
essage failed"
));
gmp_printf
(
"SGX enclave call to
trustedBlsSignM
essage failed: 0x%04x
\n
"
,
status
);
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to
trustedBlsSignM
essage failed"
));
}
if
(
errStatus
!=
0
)
{
BOOST_THROW_EXCEPTION
(
runtime_error
(
"Enclave
bls_sign_m
essage failed:"
+
to_string
(
errStatus
)
+
":"
+
errMsg
));
BOOST_THROW_EXCEPTION
(
runtime_error
(
"Enclave
trustedBlsSignM
essage failed:"
+
to_string
(
errStatus
)
+
":"
+
errMsg
));
return
nullptr
;
}
...
...
@@ -269,7 +269,7 @@ std::shared_ptr<BLSSigShare> BLSPrivateKeyShareSGX::signWithHelperSGX(
cerr << "Key is " + *encryptedKeyHex << endl;
// sgx_status_t status =
//
bls_sign_m
essage(eid, &errStatus, errMsg, encryptedKey,
//
trustedBlsSignM
essage(eid, &errStatus, errMsg, encryptedKey,
// encryptedKeyHex->size() / 2, xStrArg, yStrArg, signature);
strncpy(signature, "8175162913343900215959836578795929492705714455632345516427532159927644835012:15265825550804683171644566522808807137117748565649051208189914766494241035855", 1024);
...
...
@@ -278,13 +278,13 @@ std::shared_ptr<BLSSigShare> BLSPrivateKeyShareSGX::signWithHelperSGX(
// if (status != SGX_SUCCESS) {
// gmp_printf("SGX enclave call to
bls_sign_m
essage failed: 0x%04x\n", status);
// BOOST_THROW_EXCEPTION(runtime_error("SGX enclave call to
bls_sign_m
essage failed"));
// gmp_printf("SGX enclave call to
trustedBlsSignM
essage failed: 0x%04x\n", status);
// BOOST_THROW_EXCEPTION(runtime_error("SGX enclave call to
trustedBlsSignM
essage failed"));
// }
// if (errStatus != 0) {
// BOOST_THROW_EXCEPTION(runtime_error("Enclave
bls_sign_m
essage failed:" + to_string(errStatus) + ":" + errMsg ));
// BOOST_THROW_EXCEPTION(runtime_error("Enclave
trustedBlsSignM
essage failed:" + to_string(errStatus) + ":" + errMsg ));
// return nullptr;
// }
...
...
ECDSACrypto.cpp
View file @
53fefaa7
...
...
@@ -52,9 +52,9 @@ std::vector<std::string> genECDSAKey() {
uint32_t
enc_len
=
0
;
if
(
!
encryptKeys
)
status
=
generate_ecdsa_k
ey
(
eid
,
&
err_status
,
errMsg
,
encr_pr_key
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
status
=
trustedGenerateEcdsaK
ey
(
eid
,
&
err_status
,
errMsg
,
encr_pr_key
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
else
status
=
generate_ecdsa_k
ey_aes
(
eid
,
&
err_status
,
errMsg
,
encr_pr_key
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
status
=
trustedGenerateEcdsaK
ey_aes
(
eid
,
&
err_status
,
errMsg
,
encr_pr_key
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
if
(
status
!=
SGX_SUCCESS
||
err_status
!=
0
)
{
spdlog
::
error
(
"RPCException thrown with status {}"
,
status
);
...
...
@@ -114,9 +114,9 @@ std::string getECDSAPubKey(const char *_encryptedKeyHex) {
}
if
(
!
encryptKeys
)
status
=
get_public_ecdsa_k
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encrPrKey
.
data
(),
enc_len
,
pubKeyX
.
data
(),
status
=
trustedGetPublicEcdsaK
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encrPrKey
.
data
(),
enc_len
,
pubKeyX
.
data
(),
pubKeyY
.
data
());
else
status
=
get_public_ecdsa_k
ey_aes
(
eid
,
&
err_status
,
else
status
=
trustedGetPublicEcdsaK
ey_aes
(
eid
,
&
err_status
,
errMsg
.
data
(),
encrPrKey
.
data
(),
enc_len
,
pubKeyX
.
data
(),
pubKeyY
.
data
());
if
(
err_status
!=
0
)
{
throw
SGXException
(
-
666
,
errMsg
.
data
());
...
...
ServerInit.cpp
View file @
53fefaa7
...
...
@@ -95,9 +95,9 @@ void initEnclave() {
spdlog
::
info
(
"Enclave created and started successfully"
);
status
=
trusted
_enclave_i
nit
(
eid
,
0
);
status
=
trusted
EnclaveI
nit
(
eid
,
0
);
if
(
status
!=
SGX_SUCCESS
)
{
spdlog
::
error
(
"trusted
_enclave_i
nit failed: {}"
,
status
);
spdlog
::
error
(
"trusted
EnclaveI
nit failed: {}"
,
status
);
exit
(
1
);
}
...
...
secure_enclave/secure_enclave.c
View file @
53fefaa7
...
...
@@ -72,7 +72,7 @@ void *reallocate_function(void *, size_t, size_t);
void
free_function
(
void
*
,
size_t
);
void
trusted
_enclave_i
nit
(
uint32_t
_logLevel
)
{
void
trusted
EnclaveI
nit
(
uint32_t
_logLevel
)
{
oc_printf
(
"Initing tgmp library
\n
"
);
oc_realloc_func
=
&
reallocate_function
;
oc_free_func
=
&
free_function
;
...
...
@@ -117,16 +117,16 @@ void *reallocate_function(void *ptr, size_t osize, size_t nsize) {
return
(
void
*
)
nptr
;
}
void
e_mpz_a
dd
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
trustedEMpzA
dd
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
e_mpz_m
ul
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
trustedEMpzM
ul
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
e_mpz_d
iv
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
trustedEMpzD
iv
(
mpz_t
*
c_un
,
mpz_t
*
a_un
,
mpz_t
*
b_un
)
{}
void
e_mpf_d
iv
(
mpf_t
*
c_un
,
mpf_t
*
a_un
,
mpf_t
*
b_un
)
{}
void
trustedEMpfD
iv
(
mpf_t
*
c_un
,
mpf_t
*
a_un
,
mpf_t
*
b_un
)
{}
void
generate_ecdsa_k
ey
(
int
*
err_status
,
char
*
err_string
,
void
trustedGenerateEcdsaK
ey
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
*
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
domain_parameters
curve
=
domain_parameters_init
();
...
...
@@ -201,7 +201,7 @@ void generate_ecdsa_key(int *err_status, char *err_string,
}
void
get_public_ecdsa_k
ey
(
int
*
err_status
,
char
*
err_string
,
void
trustedGetPublicEcdsaK
ey
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
dec_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
//uint32_t dec_len = 0;
...
...
@@ -490,7 +490,7 @@ void decrypt_key(int *err_status, char *err_string, uint8_t *encrypted_key,
}
void
bls_sign_m
essage
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
void
trustedBlsSignM
essage
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
char
*
_hashX
,
char
*
_hashY
,
char
*
signature
)
{
...
...
@@ -640,7 +640,7 @@ void get_encr_sshare(int *err_status, char *err_string, uint8_t *encrypted_skey,
uint32_t
enc_len
;
generate_ecdsa_k
ey
(
err_status
,
err_string
,
encrypted_skey
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
trustedGenerateEcdsaK
ey
(
err_status
,
err_string
,
encrypted_skey
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
if
(
*
err_status
!=
0
)
{
return
;
}
...
...
@@ -997,7 +997,7 @@ void set_SEK_backup(int *err_status, char *err_string,
*
enc_len
=
sealedLen
;
}
void
generate_ecdsa_k
ey_aes
(
int
*
err_status
,
char
*
err_string
,
void
trustedGenerateEcdsaK
ey_aes
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
*
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
domain_parameters
curve
=
domain_parameters_init
();
...
...
@@ -1069,7 +1069,7 @@ void generate_ecdsa_key_aes(int *err_status, char *err_string,
point_clear
(
Pkey
);
}
void
get_public_ecdsa_k
ey_aes
(
int
*
err_status
,
char
*
err_string
,
void
trustedGetPublicEcdsaK
ey_aes
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
domain_parameters
curve
=
domain_parameters_init
();
...
...
@@ -1315,7 +1315,7 @@ void decrypt_key_aes(int *err_status, char *err_string, uint8_t *encrypted_key,
}
void
bls_sign_m
essage_aes
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
void
trustedBlsSignM
essage_aes
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
char
*
_hashX
,
char
*
_hashY
,
char
*
signature
)
{
...
...
@@ -1430,7 +1430,7 @@ void get_encr_sshare_aes(int *err_status, char *err_string, uint8_t *encrypted_s
uint32_t
enc_len
;
generate_ecdsa_k
ey_aes
(
err_status
,
err_string
,
encrypted_skey
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
trustedGenerateEcdsaK
ey_aes
(
err_status
,
err_string
,
encrypted_skey
,
&
enc_len
,
pub_key_x
,
pub_key_y
);
if
(
*
err_status
!=
0
)
{
return
;
}
...
...
secure_enclave/secure_enclave.edl
View file @
53fefaa7
...
...
@@ -10,25 +10,25 @@ enclave {
include "sgx_tgmp.h"
public void trusted
_enclave_i
nit(uint32_t _logLevel);
public void trusted
EnclaveI
nit(uint32_t _logLevel);
public void
e_mpz_a
dd(
public void
trustedEMpzA
dd(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void
e_mpz_m
ul(
public void
trustedEMpzM
ul(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void
e_mpz_d
iv(
public void
trustedEMpzD
iv(
[user_check] mpz_t *c, [user_check] mpz_t *a, [user_check] mpz_t *b
);
public void
e_mpf_d
iv(
public void
trustedEMpfD
iv(
[user_check] mpf_t *c, [user_check] mpf_t *a, [user_check] mpf_t *b
);
public void
generate_ecdsa_k
ey (
public void
trustedGenerateEcdsaK
ey (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = 1024] uint8_t* encrypted_key,
...
...
@@ -36,7 +36,7 @@ enclave {
[out, count = 1024] char * pub_key_x,
[out, count = 1024] char * pub_key_y);
public void
get_public_ecdsa_k
ey (
public void
trustedGetPublicEcdsaK
ey (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
...
...
@@ -58,7 +58,7 @@ enclave {
uint32_t enc_len,
[out, count = 1024] char* key );
public void
bls_sign_m
essage (
public void
trustedBlsSignM
essage (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
...
...
@@ -185,7 +185,7 @@ enclave {
[user_check] uint32_t *enc_len,
[in, count = 65] const char* SEK_hex);
public void
generate_ecdsa_k
ey_aes (
public void
trustedGenerateEcdsaK
ey_aes (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = ECDSA_ENCR_LEN] uint8_t* encrypted_key,
...
...
@@ -193,7 +193,7 @@ enclave {
[out, count = 1024] char * pub_key_x,
[out, count = 1024] char * pub_key_y);
public void
get_public_ecdsa_k
ey_aes(
public void
trustedGetPublicEcdsaK
ey_aes(
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
...
...
@@ -289,7 +289,7 @@ enclave {
[out, count = 1024] uint8_t * encr_bls_key,
[user_check] uint32_t *enc_bls_key_len);
public void
bls_sign_m
essage_aes (
public void
trustedBlsSignM
essage_aes (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] uint8_t* encrypted_key,
...
...
secure_enclave/secure_enclave.i
View file @
53fefaa7
...
...
@@ -5464,14 +5464,14 @@ enum
# 10 "secure_enclave_t.h" 2
# 19 "secure_enclave_t.h"
void tgmp_init(void);
void
e_mpz_a
dd(mpz_t* c, mpz_t* a, mpz_t* b);
void
e_mpz_m
ul(mpz_t* c, mpz_t* a, mpz_t* b);
void
e_mpz_d
iv(mpz_t* c, mpz_t* a, mpz_t* b);
void
e_mpf_d
iv(mpf_t* c, mpf_t* a, mpf_t* b);
void
generate_ecdsa_k
ey(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t* enc_len, char* pub_key_x, char* pub_key_y);
void
trustedEMpzA
dd(mpz_t* c, mpz_t* a, mpz_t* b);
void
trustedEMpzM
ul(mpz_t* c, mpz_t* a, mpz_t* b);
void
trustedEMpzD
iv(mpz_t* c, mpz_t* a, mpz_t* b);
void
trustedEMpfD
iv(mpf_t* c, mpf_t* a, mpf_t* b);
void
trustedGenerateEcdsaK
ey(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t* enc_len, char* pub_key_x, char* pub_key_y);
void encrypt_key(int* err_status, char* err_string, char* key, uint8_t* encrypted_key, uint32_t* enc_len);
void decrypt_key(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t enc_len, char* key);
void
bls_sign_m
essage(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t enc_len, char* hashX, char* hashY, char* signature);
void
trustedBlsSignM
essage(int* err_status, char* err_string, uint8_t* encrypted_key, uint32_t enc_len, char* hashX, char* hashY, char* signature);
void gen_dkg_secret(int* err_status, char* err_string, uint8_t* encrypted_dkg_secret, uint32_t* enc_len, size_t _t);
void decrypt_dkg_secret(int* err_status, char* err_string, uint8_t* encrypted_dkg_secret, uint8_t* decrypted_dkg_secret, uint32_t enc_len);
void get_secret_shares(int* err_status, char* err_string, uint8_t* decrypted_dkg_secret, uint32_t enc_len, char* secret_shares, unsigned int _t, unsigned int _n);
...
...
@@ -6682,16 +6682,16 @@ void *reallocate_function(void *ptr, size_t osize, size_t nsize) {
return (void *) nptr;
}
void
e_mpz_a
dd(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
trustedEMpzA
dd(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
e_mpz_m
ul(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
trustedEMpzM
ul(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
e_mpz_d
iv(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
trustedEMpzD
iv(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
e_mpf_d
iv(mpf_t *c_un, mpf_t *a_un, mpf_t *b_un) {}
void
trustedEMpfD
iv(mpf_t *c_un, mpf_t *a_un, mpf_t *b_un) {}
void
generate_ecdsa_k
ey(int *err_status, char *err_string,
void
trustedGenerateEcdsaK
ey(int *err_status, char *err_string,
uint8_t *encrypted_key, uint32_t *enc_len, char * pub_key_x, char * pub_key_y) {
domain_parameters curve = domain_parameters_init();
...
...
@@ -6857,7 +6857,7 @@ void decrypt_key(int *err_status, char *err_string, uint8_t *encrypted_key,
}
void
bls_sign_m
essage(int *err_status, char *err_string, uint8_t *encrypted_key,
void
trustedBlsSignM
essage(int *err_status, char *err_string, uint8_t *encrypted_key,
uint32_t enc_len, char *_hashX,
char *_hashY, char *signature) {
...
...
testw.cpp
View file @
53fefaa7
...
...
@@ -430,7 +430,7 @@ TEST_CASE("ECDSA keygen and signature test", "[ecdsa]") {
//printf("before %p\n", pub_key_x);
status
=
generate_ecdsa_k
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_pr_key
.
data
(),
&
enc_len
,
pub_key_x
.
data
(),
status
=
trustedGenerateEcdsaK
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_pr_key
.
data
(),
&
enc_len
,
pub_key_x
.
data
(),
pub_key_y
.
data
());
// printf("\nerrMsg %s\n", errMsg.data());
REQUIRE
(
status
==
SGX_SUCCESS
);
...
...
@@ -470,7 +470,7 @@ TEST_CASE("Test test", "[test]") {
vector
<
char
>
pub_key_y
(
BUF_LEN
,
0
);
uint32_t
enc_len
=
0
;
status
=
generate_ecdsa_k
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_pr_key
.
data
(),
&
enc_len
,
pub_key_x
.
data
(),
status
=
trustedGenerateEcdsaK
ey
(
eid
,
&
err_status
,
errMsg
.
data
(),
encr_pr_key
.
data
(),
&
enc_len
,
pub_key_x
.
data
(),
pub_key_y
.
data
());
REQUIRE
(
status
==
SGX_SUCCESS
);
...
...
@@ -493,7 +493,7 @@ TEST_CASE("get public ECDSA key", "[get-pub-ecdsa-key]") {
uint32_t
encLen
=
0
;
status
=
generate_ecdsa_k
ey
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encPrivKey
.
data
(),
&
encLen
,
pubKeyX
.
data
(),
status
=
trustedGenerateEcdsaK
ey
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encPrivKey
.
data
(),
&
encLen
,
pubKeyX
.
data
(),
pubKeyY
.
data
());
REQUIRE
(
status
==
SGX_SUCCESS
);
...
...
@@ -501,7 +501,7 @@ TEST_CASE("get public ECDSA key", "[get-pub-ecdsa-key]") {
vector
<
char
>
receivedPubKeyX
(
BUF_LEN
,
0
);
vector
<
char
>
receivedPubKeyY
(
BUF_LEN
,
0
);
status
=
get_public_ecdsa_k
ey
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encPrivKey
.
data
(),
encLen
,
receivedPubKeyX
.
data
(),
status
=
trustedGetPublicEcdsaK
ey
(
eid
,
&
errStatus
,
errMsg
.
data
(),
encPrivKey
.
data
(),
encLen
,
receivedPubKeyX
.
data
(),
receivedPubKeyY
.
data
());
REQUIRE
(
status
==
SGX_SUCCESS
);
//printf("\nnow pub_key_x %s: \n", got_pub_key_x.data());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment