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
6b8feb4a
Unverified
Commit
6b8feb4a
authored
Feb 19, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2201 Fixing ecdsa
parent
242a24e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
signature.c
secure_enclave/signature.c
+7
-19
No files found.
secure_enclave/signature.c
View file @
6b8feb4a
...
...
@@ -173,22 +173,14 @@ void signature_sign(signature sig, mpz_t message, mpz_t private_key, domain_para
/*Verify the integrity of a message using it's signature*/
bool
signature_verify
(
mpz_t
message
,
signature
sig
,
point
public_key
,
domain_parameters
curve
)
{
//verify r and s are within [1, n-1]
mpz_t
one
;
mpz_init
(
one
);
mpz_set_ui
(
one
,
1
);
//Initialize variables
mpz_t
w
;
mpz_init
(
w
);
mpz_t
u1
;
mpz_init
(
u1
);
mpz_t
u2
;
mpz_init
(
u2
);
mpz_t
t
;
mpz_init
(
t
);
mpz_t
tt2
;
mpz_init
(
tt2
);
mpz_t
one
,
w
,
u1
,
u2
,
t
,
tt2
;
mpz_init
(
one
);
mpz_init
(
w
);
mpz_init
(
u1
);
mpz_init
(
u2
);
mpz_init
(
t
);
mpz_init
(
tt2
);
mpz_set_ui
(
one
,
1
);
point
x
=
point_init
();
point
t1
=
point_init
();
point
t2
=
point_init
();
...
...
@@ -232,11 +224,7 @@ bool signature_verify(mpz_t message, signature sig, point public_key, domain_par
point_clear
(
t1
);
point_clear
(
t2
);
mpz_clear
(
one
);
mpz_clear
(
w
);
mpz_clear
(
u1
);
mpz_clear
(
u2
);
mpz_clear
(
t
);
mpz_clear
(
one
);
mpz_clear
(
w
);
mpz_clear
(
u1
);
mpz_clear
(
u2
);
mpz_clear
(
t
);
mpz_clear
(
tt2
);
return
result
;
...
...
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