SGX

parent 7c2344ba
...@@ -31,21 +31,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -31,21 +31,19 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#include "sgxd_common.h"
#include "create_enclave.h" #include "create_enclave.h"
#include "secure_enclave_u.h" #include "secure_enclave_u.h"
#include "sgx_detect.h" #include "sgx_detect.h"
#include <gmp.h> #include <gmp.h>
#include <sgx_urts.h> #include <sgx_urts.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "sgxd_common.h"
#include "BLSCrypto.h" #include "BLSCrypto.h"
#define ENCLAVE_NAME "secure_enclave.signed.so" #define ENCLAVE_NAME "secure_enclave.signed.so"
void usage() { void usage() {
fprintf(stderr, "usage: sgxd\n"); fprintf(stderr, "usage: sgxd\n");
exit(1); exit(1);
...@@ -162,10 +160,6 @@ int main(int argc, char *argv[]) { ...@@ -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++) { for (int i=0; i < dec_len; i++) {
if (bin[i] != encryptedKey[i]) { if (bin[i] != encryptedKey[i]) {
......
...@@ -5,6 +5,13 @@ ...@@ -5,6 +5,13 @@
#ifndef SGXD_SGXD_COMMON_H #ifndef SGXD_SGXD_COMMON_H
#define 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> #include <stdbool.h>
#define BUF_LEN 1024 #define BUF_LEN 1024
...@@ -33,7 +40,7 @@ inline int char2int(char _input) { ...@@ -33,7 +40,7 @@ inline int char2int(char _input) {
inline void carray2Hex(const unsigned char *d, int _len, char* _hexArray) { 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'}; '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
for (int j = 0; j < _len; j++) { for (int j = 0; j < _len; j++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment