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
228cb221
Unverified
Commit
228cb221
authored
May 20, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-1880-fix-ecdsa
parent
7acee1a7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
7 deletions
+18
-7
ECDSAImpl.c
ECDSAImpl.c
+5
-0
Makefile.am
Makefile.am
+4
-5
common.h
common.h
+1
-1
DKGUtils.h
secure_enclave/DKGUtils.h
+1
-0
Signature.c
secure_enclave/Signature.c
+4
-1
Verify.h
secure_enclave/Verify.h
+3
-0
No files found.
ECDSAImpl.c
0 → 100644
View file @
228cb221
#include "secure_enclave/Point.c"
#include "secure_enclave/DomainParameters.c"
#include "secure_enclave/NumberTheory.c"
#include "secure_enclave/Signature.c"
#include "secure_enclave/Curves.c"
\ No newline at end of file
Makefile.am
View file @
228cb221
...
...
@@ -45,7 +45,7 @@ secure_enclave.edl: secure_enclave/secure_enclave.edl
#AM_CPPFLAGS += -g -Og
AM_CFLAGS
=
-g
-Og
-rdynamic
-Wl
,--no-as-needed
-lSegFault
AM_CFLAGS
=
-
DUSER_SPACE
-
g
-Og
-rdynamic
-Wl
,--no-as-needed
-lSegFault
AM_CXXFLAGS
=
${
AM_CPPFLAGS
}
-rdynamic
-Wl
,--no-as-needed
-lSegFault
...
...
@@ -68,11 +68,10 @@ bin_PROGRAMS = sgxwallet testw cert_util
COMMON_SRC
=
InvalidStateException.cpp Exception.cpp InvalidArgumentException.cpp Log.cpp
\
SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp RPCException.cpp BLSCrypto.cpp
\
secure_enclave/DomainParameters.c
ECDSACrypto.cpp
\
ECDSACrypto.cpp
\
DKGCrypto.cpp ServerInit.cpp BLSPrivateKeyShareSGX.cpp LevelDB.cpp ServerDataChecker.cpp SEKManager.cpp
\
sgx_stub.c sgx_detect_linux.c create_enclave.c oc_alloc.c
\
secure_enclave/NumberTheory.c secure_enclave/Signature.c
\
secure_enclave/Curves.c secure_enclave/Point.c
ECDSAImpl.c
COMMON_ENCLAVE_SRC
=
secure_enclave_u.c secure_enclave_u.h
sgxwallet_SOURCES
=
sgxwallet.c
$(COMMON_SRC)
...
...
@@ -118,4 +117,4 @@ cert_util_SOURCES= InvalidStateException.cpp Exception.cpp InvalidArgumentExcep
cert_util_LDADD
=
-LlibBLS
/deps/deps_inst/x86_or_x64/lib
-Lleveldb
/build
-LlibBLS
/build
\
-LlibBLS
/build/libff/libff
\
-l
:libbls.a
-l
:libleveldb.a
\
-l
:libff.a
-lgmp
-ljsonrpccpp-stub
-ljsonrpccpp-server
-ljsonrpccpp-client
-ljsonrpccpp-common
-ljsoncpp
-lmicrohttpd
-lgnutls
-lgcrypt
-lcurl
-lssl
-lcrypto
-lz
-lpthread
-ldl
-l
:libff.a
-lgmp
-ljsonrpccpp-stub
-ljsonrpccpp-server
-ljsonrpccpp-client
-ljsonrpccpp-common
-ljsoncpp
-lmicrohttpd
-lgnutls
-lgcrypt
-lcurl
-lssl
-lcrypto
-lz
-lpthread
-ldl
\ No newline at end of file
common.h
View file @
228cb221
...
...
@@ -33,7 +33,7 @@ using namespace std;
#include <memory>
#define USER_SPACE
#include <gmp.h>
#include "secure_enclave/Verify.h"
#include "InvalidStateException.h"
...
...
secure_enclave/DKGUtils.h
View file @
228cb221
...
...
@@ -31,6 +31,7 @@
#endif
#ifdef USER_SPACE
#include <gmp.h>
#else
#include <../tgmp-build/include/sgx_tgmp.h>
...
...
secure_enclave/Signature.c
View file @
228cb221
...
...
@@ -28,6 +28,8 @@
#ifdef USER_SPACE
#include <gmp.h>
#else
#include <../tgmp-build/include/sgx_tgmp.h>
#endif
...
...
@@ -90,6 +92,7 @@ void signature_extract_public_key(point public_key, mpz_t private_key, domain_pa
point_multiplication
(
public_key
,
private_key
,
curve
->
G
,
curve
);
}
#ifndef USER_SPACE
/*Generate signature for a message*/
void
signature_sign
(
signature
sig
,
mpz_t
message
,
mpz_t
private_key
,
domain_parameters
curve
)
{
//message must not have a bit length longer than that of n
...
...
@@ -177,7 +180,7 @@ void signature_sign(signature sig, mpz_t message, mpz_t private_key, domain_para
}
#endif
/*Release signature*/
void
signature_free
(
signature
sig
)
{
...
...
secure_enclave/Verify.h
View file @
228cb221
...
...
@@ -22,6 +22,9 @@
*/
#ifndef SGXWALLET_VERIFY_H
#define SGXWALLET_VERIFY_H
#define USER_SPACE 1
#include "secure_enclave/Point.h"
#include "secure_enclave/DomainParameters.h"
#include "secure_enclave/NumberTheory.h"
...
...
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