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
3e81244d
Unverified
Commit
3e81244d
authored
Sep 10, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3039
parent
ff5b7048
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
Signature.c
secure_enclave/Signature.c
+10
-8
No files found.
secure_enclave/Signature.c
View file @
3e81244d
...
...
@@ -57,6 +57,15 @@ signature signature_init() {
return
sig
;
}
/*Release signature*/
void
signature_free
(
signature
sig
)
{
if
(
!
sig
)
return
;
mpz_clear
(
sig
->
r
);
mpz_clear
(
sig
->
s
);
free
(
sig
);
}
/*Set signature from strings of a base from 2-62*/
int
signature_set_str
(
signature
sig
,
const
char
*
r
,
const
char
*
s
,
int
base
)
{
...
...
@@ -200,14 +209,7 @@ void signature_sign(signature sig, mpz_t message, mpz_t private_key, domain_para
#endif
/*Release signature*/
void
signature_free
(
signature
sig
)
{
if
(
!
sig
)
return
;
mpz_clear
(
sig
->
r
);
mpz_clear
(
sig
->
s
);
free
(
sig
);
}
/*Verify the integrity of a message using it's signature*/
bool
signature_verify
(
mpz_t
message
,
signature
sig
,
point
public_key
,
domain_parameters
curve
)
{
...
...
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