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
89927c83
Unverified
Commit
89927c83
authored
Jan 29, 2020
by
svetaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2003 Add aes to get_public_shares method
parent
86a5cac3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
secure_enclave.c
secure_enclave/secure_enclave.c
+1
-8
testw.cpp
testw.cpp
+3
-3
No files found.
secure_enclave/secure_enclave.c
View file @
89927c83
...
...
@@ -1413,13 +1413,7 @@ void get_public_shares_aes(int *err_status, char* err_string, uint8_t* encrypted
char
*
decrypted_dkg_secret
=
(
char
*
)
calloc
(
DKG_MAX_SEALED_LEN
,
1
);
//char decrypted_dkg_secret[DKG_MAX_SEALED_LEN];
decrypt_dkg_secret_aes
(
err_status
,
err_string
,
(
uint8_t
*
)
encrypted_dkg_secret
,
decrypted_dkg_secret
,
enc_len
);
if
(
*
err_status
!=
0
){
snprintf
(
err_string
,
BUF_LEN
,
"decrypt_dkg_secret failed with status %d"
,
*
err_status
);
return
;
}
int
status
=
AES_decrypt
(
encrypted_dkg_secret
,
enc_len
,
decrypted_dkg_secret
);
int
status
=
AES_decrypt
(
encrypted_dkg_secret
,
enc_len
,
decrypted_dkg_secret
);
if
(
status
!=
SGX_SUCCESS
)
{
...
...
@@ -1437,7 +1431,6 @@ void get_public_shares_aes(int *err_status, char* err_string, uint8_t* encrypted
}
free
(
decrypted_dkg_secret
);
*
err_status
=
1
;
}
...
...
testw.cpp
View file @
89927c83
...
...
@@ -1240,13 +1240,13 @@ TEST_CASE("AES_DKG test", "[aes_dkg]") {
}
// for ( uint8_t i = 0; i < n; i++){
//
secretShares[i] = c.getSecretShare(poly_names[i], pubEthKeys, t, n);
//
cout << secretShares[i] << std::endl;
//
secretShares[i] = c.getSecretShare(poly_names[i], pubEthKeys, t, n);
//
cout << secretShares[i] << std::endl;
// REQUIRE(secretShares[i]["status"] == 0);
// for ( uint8_t k = 0; k < t; k++ ) {
// for (uint8_t j = 0; j < 4; j++) {
// string pubShare = VerifVects[i]["verificationVector"][k][j].asString();
// pubShares[i] += ConvertDecToHex(pubShare);
// }
//
}
// }
}
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