diwata11 / bioram-sgx Goto Github PK
View Code? Open in Web Editor NEWA Practical Privacy-Preserving Data Analysis for Personal Genome by Intel SGX. Latest version is in https://github.com/cBioLab/BiORAM-SGX
License: Other
A Practical Privacy-Preserving Data Analysis for Personal Genome by Intel SGX. Latest version is in https://github.com/cBioLab/BiORAM-SGX
License: Other
My machine is SGX supported and enabled in BOIS. but somehow when i run ./run-SGXserver it says the system does not dispaly the result.
There are two problems:
./run-SGXserver: line 45: ./policy: No such file or directory
./run-SGXserver: line 113: ./SGXserver: No such file or directory
Is there any reason.
Thanks !Looking forward to your reply!
hi,sir
in file Enclave/Enclave.cpp
:
sgx_status_t enclave_get_user_key(unsigned char *enc_user_key, size_t enc_user_key_len,
unsigned char *iv, size_t iv_len, sgx_aes_gcm_128bit_tag_t *tag)
{
sgx_status_t ctx;
sgx_ra_key_128_t k;
sgx_status_t get_keys_ret = sgx_ra_get_keys(ctx, SGX_RA_KEY_SK, &k);
if ( get_keys_ret != SGX_SUCCESS ) return get_keys_ret;
unsigned char *user_key = (unsigned char*)malloc(16);
sgx_status_t ret;
//decrypt user's key that was used for encrypting source & data.
ret = sgx_rijndael128GCM_decrypt(&k, enc_user_key, enc_user_key_len, user_key, iv, 12, NULL, 0, tag);
print_hexstring(enc_user_key,16);
print_hexstring(iv,12);
print_hexstring((unsigned char*)tag,16);
print_hexstring(user_key,16); // ==========================>decrypted user_key is leaked by invoking ocall
//for security reason
memset(user_key, 0x00, 16);
free(user_key);
return ret;
}
buf
is only 256 size, but vsnprintf
can write up to BUFSIZ
, cause stack overflow
BiORAM-SGX/Enclave/Enclave.cpp
Lines 104 to 113 in 6e8df40
Although ptr
is in
, when it is null, TBridge will pass it to real ecall
BiORAM-SGX/Enclave/Enclave.edl
Line 33 in 6e8df40
But in cp_source
, not check ptr
is not null
BiORAM-SGX/Enclave/Enclave.cpp
Lines 1052 to 1056 in 6e8df40
My machine is SGX supported and enabled in BOIS. but somehow when i run ./run-SGX server it says the system does not support Intel SGX. fails to connect with SGX. Is there any reason
sgx_status_t enclave_get_user_key(unsigned char *enc_user_key, size_t enc_user_key_len,
unsigned char *iv, size_t iv_len, sgx_aes_gcm_128bit_tag_t *tag)
{
sgx_status_t ctx;
sgx_ra_key_128_t k;
sgx_status_t get_keys_ret = sgx_ra_get_keys(ctx, SGX_RA_KEY_SK, &k);
if ( get_keys_ret != SGX_SUCCESS ) return get_keys_ret;
// doesn't check user_key is not NULL
unsigned char *user_key = (unsigned char*)malloc(16);
sgx_status_t ret;
//decrypt user's key that was used for encrypting source & data.
ret = sgx_rijndael128GCM_decrypt(&k, enc_user_key, enc_user_key_len, user_key, iv, 12, NULL, 0, tag);
print_hexstring(enc_user_key,16);
print_hexstring(iv,12);
print_hexstring((unsigned char*)tag,16);
print_hexstring(user_key,16);
//for security reason
memset(user_key, 0x00, 16);
free(user_key);
return ret;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.