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
5fc2cfc3
Unverified
Commit
5fc2cfc3
authored
Sep 03, 2019
by
a72d9e2bad9edfd58d6c0248c12c953b71d409d2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix BLS
parent
2920d188
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
secure_enclave.c
secure_enclave/secure_enclave.c
+11
-1
secure_enclave.edl
secure_enclave/secure_enclave.edl
+17
-1
No files found.
secure_enclave/secure_enclave.c
View file @
5fc2cfc3
...
...
@@ -119,6 +119,10 @@ void e_mpz_div(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
e_mpf_div
(
mpf_t
*
c_un
,
mpf_t
*
a_un
,
mpf_t
*
b_un
)
{}
void
generate_ecdsa_key
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
*
enc_len
)
{
}
void
encrypt_key
(
int
*
err_status
,
char
*
err_string
,
char
*
key
,
uint8_t
*
encrypted_key
,
uint32_t
*
enc_len
)
{
...
...
@@ -253,7 +257,13 @@ void decrypt_key(int *err_status, char *err_string, uint8_t *encrypted_key,
void
sign_message
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
void
bls_sign_message
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
uint8_t
*
message
,
char
*
signature
)
{
}
void
ecdsa_sign_message
(
int
*
err_status
,
char
*
err_string
,
uint8_t
*
encrypted_key
,
uint32_t
enc_len
,
uint8_t
*
message
,
char
*
signature
)
{
*
err_status
=
-
1
;
...
...
secure_enclave/secure_enclave.edl
View file @
5fc2cfc3
...
...
@@ -21,6 +21,12 @@ enclave {
[user_check] mpf_t *c, [user_check] mpf_t *a, [user_check] mpf_t *b
);
public void generate_ecdsa_key (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[out, count = 1024] uint8_t* encrypted_key, [user_check] uint32_t *enc_len);
public void encrypt_key (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
...
...
@@ -34,7 +40,15 @@ enclave {
uint32_t enc_len,
[out, count = 128] char* key );
public void sign_message (
public void bls_sign_message (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] unsigned char* encrypted_key,
uint32_t enc_len,
[in, count = 16] uint8_t* hash,
[out, count = 1024] char* signature);
public void ecdsa_sign_message (
[user_check] int *err_status,
[out, count = 1024] char* err_string,
[in, count = 1024] unsigned char* encrypted_key,
...
...
@@ -46,6 +60,8 @@ enclave {
};
...
...
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