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
052e94c2
Unverified
Commit
052e94c2
authored
Sep 07, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3228
parent
a4274711
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
21 deletions
+27
-21
CMakeLists.txt
CMakeLists.txt
+1
-1
ECDSAImpl.c
ECDSAImpl.c
+1
-1
LevelDB.cpp
LevelDB.cpp
+1
-1
Makefile.am
Makefile.am
+1
-0
DomainParameters.cpp
secure_enclave/DomainParameters.cpp
+9
-4
EnclaveCommon.cpp
secure_enclave/EnclaveCommon.cpp
+5
-5
Makefile.am
secure_enclave/Makefile.am
+2
-2
Makefile.in
secure_enclave/Makefile.in
+5
-5
sgxwallet.c
sgxwallet.c
+2
-2
No files found.
CMakeLists.txt
View file @
052e94c2
...
...
@@ -20,7 +20,7 @@ add_executable(sgxwallet
secure_enclave/DHDkg.h
secure_enclave/DKGUtils.cpp
secure_enclave/DKGUtils.h
secure_enclave/DomainParameters.c
secure_enclave/DomainParameters.c
pp
secure_enclave/DomainParameters.h
secure_enclave/EnclaveConstants.h
secure_enclave/NumberTheory.c
...
...
ECDSAImpl.c
View file @
052e94c2
#include "secure_enclave/Point.c"
#include "secure_enclave/DomainParameters.c"
#include "secure_enclave/DomainParameters.c
pp
"
#include "secure_enclave/NumberTheory.c"
#include "secure_enclave/Signature.c"
#include "secure_enclave/Curves.c"
LevelDB.cpp
View file @
052e94c2
...
...
@@ -163,7 +163,7 @@ void LevelDB::writeDataUnique(const string & name, const string &value) {
}
writeString
(
key
,
value
);
}
...
...
Makefile.am
View file @
052e94c2
...
...
@@ -64,6 +64,7 @@ bin_PROGRAMS = sgxwallet testw cert_util
## You can't use $(wildcard ...) with automake so all source files
## have to be explicitly listed.
## have to be explicitly listed
COMMON_SRC
=
InvalidStateException.cpp Exception.cpp InvalidArgumentException.cpp Log.cpp
\
SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp BLSCrypto.cpp
\
...
...
secure_enclave/DomainParameters.c
→
secure_enclave/DomainParameters.c
pp
View file @
052e94c2
...
...
@@ -31,10 +31,13 @@
#include <../tgmp-build/include/sgx_tgmp.h>
#endif
#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include "EnclaveCommon.h"
#include "Point.h"
#include "DomainParameters.h"
#define CHECK_ARG_ABORT(_EXPRESSION_) \
...
...
@@ -48,12 +51,12 @@ domain_parameters domain_parameters_init()
{
LOG_INFO
(
"Allocating curver"
);
domain_parameters
curve
;
curve
=
calloc
(
sizeof
(
struct
domain_parameters_s
),
1
);
curve
=
(
domain_parameters
)
calloc
(
sizeof
(
struct
domain_parameters_s
),
1
);
CHECK_ARG_ABORT
(
curve
);
LOG_INFO
(
"Initing members"
);
//Initialize all members
mpz_init
(
curve
->
p
);
...
...
@@ -62,10 +65,12 @@ domain_parameters domain_parameters_init()
mpz_init
(
curve
->
n
);
mpz_init
(
curve
->
h
);
LOG_INFO
(
"Initing point"
);
curve
->
G
=
point_init
();
CHECK_ARG_ABORT
(
curve
->
G
);
return
curve
;
}
...
...
secure_enclave/EnclaveCommon.cpp
View file @
052e94c2
...
...
@@ -352,19 +352,19 @@ void logMsg(log_level _level, const char *_msg) {
}
EXTERNC
void
LOG_INFO
(
const
char
*
_msg
)
{
void
LOG_INFO
(
const
char
*
_msg
)
{
logMsg
(
L_INFO
,
_msg
);
};
EXTERNC
void
LOG_WARN
(
const
char
*
_msg
)
{
void
LOG_WARN
(
const
char
*
_msg
)
{
logMsg
(
L_WARNING
,
_msg
);
};
EXTERNC
void
LOG_ERROR
(
const
char
*
_msg
)
{
void
LOG_ERROR
(
const
char
*
_msg
)
{
logMsg
(
L_ERROR
,
_msg
);
};
EXTERNC
void
LOG_DEBUG
(
const
char
*
_msg
)
{
void
LOG_DEBUG
(
const
char
*
_msg
)
{
logMsg
(
L_DEBUG
,
_msg
);
};
EXTERNC
void
LOG_TRACE
(
const
char
*
_msg
)
{
void
LOG_TRACE
(
const
char
*
_msg
)
{
logMsg
(
L_TRACE
,
_msg
);
};
secure_enclave/Makefile.am
View file @
052e94c2
...
...
@@ -83,8 +83,8 @@ CLEANFILES+= secure_enclave_t.c secure_enclave_t.h
secure_enclave_SOURCES
=
secure_enclave_t.c secure_enclave_t.h
\
secure_enclave.c
\
Curves.c
DomainParameters.c
NumberTheory.c Point.c Signature.c DHDkg.c AESUtils.c
\
DKGUtils.cpp EnclaveCommon.cpp ../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_init.cpp
\
Curves.c NumberTheory.c Point.c Signature.c DHDkg.c AESUtils.c
\
DKGUtils.cpp EnclaveCommon.cpp
DomainParameters.cpp
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_init.cpp
\
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_g2.cpp
\
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_g1.cpp
$(ENCLAVE_KEY)
$(ENCLAVE_CONFIG)
...
...
secure_enclave/Makefile.in
View file @
052e94c2
...
...
@@ -108,9 +108,9 @@ PROGRAMS = $(libexec_PROGRAMS)
am__objects_1
=
am_secure_enclave_OBJECTS
=
secure_enclave_t.
$(OBJEXT)
\
secure_enclave.
$(OBJEXT)
Curves.
$(OBJEXT)
\
DomainParameters.
$(OBJEXT)
NumberTheory
.
$(OBJEXT)
\
Point.
$(OBJEXT)
Signature.
$(OBJEXT)
DHDkg
.
$(OBJEXT)
\
AESUtils.
$(OBJEXT)
DKGUtils.
$(OBJEXT)
EnclaveCommon
.
$(OBJEXT)
\
NumberTheory.
$(OBJEXT)
Point.
$(OBJEXT)
Signature
.
$(OBJEXT)
\
DHDkg.
$(OBJEXT)
AESUtils.
$(OBJEXT)
DKGUtils
.
$(OBJEXT)
\
EnclaveCommon.
$(OBJEXT)
DomainParameters
.
$(OBJEXT)
\
alt_bn128_init.
$(OBJEXT)
alt_bn128_g2.
$(OBJEXT)
\
alt_bn128_g1.
$(OBJEXT)
$(am__objects_1)
$(am__objects_1)
secure_enclave_OBJECTS
=
$(am_secure_enclave_OBJECTS)
...
...
@@ -337,8 +337,8 @@ ENCLAVE_CONFIG = $(ENCLAVE).config.xml
ENCLAVE_KEY
=
test_insecure_private_key.pem
#
$(ENCLAVE)
_private.pem
secure_enclave_SOURCES
=
secure_enclave_t.c secure_enclave_t.h
\
secure_enclave.c
\
Curves.c
DomainParameters.c
NumberTheory.c Point.c Signature.c DHDkg.c AESUtils.c
\
DKGUtils.cpp EnclaveCommon.cpp ../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_init.cpp
\
Curves.c NumberTheory.c Point.c Signature.c DHDkg.c AESUtils.c
\
DKGUtils.cpp EnclaveCommon.cpp
DomainParameters.cpp
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_init.cpp
\
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_g2.cpp
\
../third_party/SCIPR/libff/algebra/curves/alt_bn128/alt_bn128_g1.cpp
$(ENCLAVE_KEY)
$(ENCLAVE_CONFIG)
...
...
sgxwallet.c
View file @
052e94c2
...
...
@@ -36,5 +36,5 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "sgxwallet.h"
sgx_launch_token_t
token
=
{
0
};
sgx_enclave_id_t
eid
;
int
updated
;
sgx_enclave_id_t
eid
=
0
;
int
updated
=
0
;
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