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
ae8dbfcd
Unverified
Commit
ae8dbfcd
authored
Sep 03, 2019
by
a72d9e2bad9edfd58d6c0248c12c953b71d409d2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SGX
parent
7c2344ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
sgxd.c
sgxd.c
+2
-8
sgxd_common.h
sgxd_common.h
+8
-1
No files found.
sgxd.c
View file @
ae8dbfcd
...
...
@@ -31,21 +31,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "sgxd_common.h"
#include "create_enclave.h"
#include "secure_enclave_u.h"
#include "sgx_detect.h"
#include <gmp.h>
#include <sgx_urts.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "sgxd_common.h"
#include "BLSCrypto.h"
#define ENCLAVE_NAME "secure_enclave.signed.so"
void
usage
()
{
fprintf
(
stderr
,
"usage: sgxd
\n
"
);
exit
(
1
);
...
...
@@ -162,10 +160,6 @@ int main(int argc, char *argv[]) {
}
printf
(
"Hex key len %d
\n
"
,
dec_len
);
for
(
int
i
=
0
;
i
<
dec_len
;
i
++
)
{
if
(
bin
[
i
]
!=
encryptedKey
[
i
])
{
...
...
sgxd_common.h
View file @
ae8dbfcd
...
...
@@ -5,6 +5,13 @@
#ifndef SGXD_SGXD_COMMON_H
#define SGXD_SGXD_COMMON_H
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
#define BUF_LEN 1024
...
...
@@ -33,7 +40,7 @@ inline int char2int(char _input) {
inline
void
carray2Hex
(
const
unsigned
char
*
d
,
int
_len
,
char
*
_hexArray
)
{
static
char
hexval
[
16
]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
char
hexval
[
16
]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
};
for
(
int
j
=
0
;
j
<
_len
;
j
++
)
{
...
...
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