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
8bd21997
Unverified
Commit
8bd21997
authored
Jun 23, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2794 clean up code
parent
fc1458a2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
102 additions
and
181 deletions
+102
-181
BLSCrypto.cpp
BLSCrypto.cpp
+5
-38
BLSCrypto.h
BLSCrypto.h
+0
-2
BLSPrivateKeyShareSGX.h
BLSPrivateKeyShareSGX.h
+0
-4
CSRManagerServer.cpp
CSRManagerServer.cpp
+0
-9
DKGCrypto.h
DKGCrypto.h
+0
-3
SEKManager.h
SEKManager.h
+0
-4
DHDkg.h
secure_enclave/DHDkg.h
+0
-2
EnclaveCommon.h
secure_enclave/EnclaveCommon.h
+0
-10
secure_enclave.c
secure_enclave/secure_enclave.c
+0
-7
secure_enclave.edl
secure_enclave/secure_enclave.edl
+97
-102
No files found.
BLSCrypto.cpp
View file @
8bd21997
...
...
@@ -119,7 +119,7 @@ bool hex2carray(const char *_hex, uint64_t *_bin_len,
bool
hex2carray2
(
const
char
*
_hex
,
uint64_t
*
_bin_len
,
uint8_t
*
_bin
,
const
int
_max_length
)
{
int
len
=
strnlen
(
_hex
,
_max_length
);
//2 * BUF_LEN);
int
len
=
strnlen
(
_hex
,
_max_length
);
if
(
len
==
0
&&
len
%
2
==
1
)
...
...
@@ -161,13 +161,6 @@ bool sign(const char *_encryptedKeyHex, const char *_hashHex, size_t _t, size_t
strncpy
(
_sig
,
sigShareStr
->
c_str
(),
BUF_LEN
);
//string sigShareStr = keyShare->signWithHelperSGXstr(hash, _signerIndex);
//strncpy(_sig, sigShareStr.c_str(), BUF_LEN);
// string test_sig = "8175162913343900215959836578795929492705714455632345516427532159927644835012:15265825550804683171644566522808807137117748565649051208189914766494241035855:9810286616503120081238481858289626967170509983220853777870754480048381194141:5";
// auto sig_ptr = make_shared<string>(test_sig);
// strncpy(_sig, sig_ptr->c_str(), BUF_LEN);
return
true
;
}
...
...
@@ -269,44 +262,18 @@ char *encryptBLSKeyShare2Hex(int *errStatus, char *err_string, const char *_key)
spdlog
::
debug
(
"errStatus is {}"
,
*
errStatus
);
spdlog
::
debug
(
" errMsg is "
,
errMsg
->
data
());
if
(
*
errStatus
!=
0
)
{
throw
SGXException
(
-
666
,
errMsg
->
data
());
}
if
(
status
!=
SGX_SUCCESS
)
{
*
errStatus
=
-
1
;
return
nullptr
;
}
if
(
*
errStatus
!=
0
)
{
throw
SGXException
(
-
666
,
errMsg
->
data
());
}
char
*
result
=
(
char
*
)
calloc
(
2
*
BUF_LEN
,
1
);
carray2Hex
(
encryptedKey
->
data
(),
encryptedLen
,
result
);
return
result
;
}
char
*
decryptBLSKeyShareFromHex
(
int
*
errStatus
,
char
*
errMsg
,
const
char
*
_encryptedKey
)
{
*
errStatus
=
-
1
;
uint64_t
decodedLen
=
0
;
uint8_t
decoded
[
BUF_LEN
];
if
(
!
(
hex2carray
(
_encryptedKey
,
&
decodedLen
,
decoded
)))
{
return
nullptr
;
}
char
*
plaintextKey
=
(
char
*
)
calloc
(
BUF_LEN
,
1
);
status
=
trustedDecryptKeyAES
(
eid
,
errStatus
,
errMsg
,
decoded
,
decodedLen
,
plaintextKey
);
if
(
status
!=
SGX_SUCCESS
)
{
return
nullptr
;
}
if
(
*
errStatus
!=
0
)
{
return
nullptr
;
}
return
plaintextKey
;
}
BLSCrypto.h
View file @
8bd21997
...
...
@@ -48,6 +48,4 @@ EXTERNC bool hex2carray2(const char * _hex, uint64_t *_bin_len,
char
*
encryptBLSKeyShare2Hex
(
int
*
errStatus
,
char
*
err_string
,
const
char
*
_key
);
char
*
decryptBLSKeyShareFromHex
(
int
*
errStatus
,
char
*
errMsg
,
const
char
*
_encryptedKey
);
#endif //SGXWALLET_BLSCRYPTO_H
BLSPrivateKeyShareSGX.h
View file @
8bd21997
...
...
@@ -29,13 +29,11 @@
#include "BLSPrivateKeyShare.h"
class
BLSPrivateKeyShareSGX
{
size_t
requiredSigners
;
size_t
totalSigners
;
std
::
shared_ptr
<
std
::
string
>
encryptedKeyHex
;
public
:
std
::
shared_ptr
<
BLSSigShare
>
signWithHelperSGX
(
std
::
shared_ptr
<
std
::
array
<
uint8_t
,
32
>>
_hash
,
...
...
@@ -47,8 +45,6 @@ public:
BLSPrivateKeyShareSGX
(
std
::
shared_ptr
<
std
::
string
>
_encryptedKeyHex
,
size_t
_requiredSigners
,
size_t
_totalSigners
);
};
#endif // LIBBLS_BLSPRIVATEKEYSHARE_H
CSRManagerServer.cpp
View file @
8bd21997
...
...
@@ -21,29 +21,21 @@
@date 2019
*/
#include <iostream>
#include <fstream>
#include <jsonrpccpp/server/connectors/httpserver.h>
#include "CSRManagerServer.h"
#include "SGXException.h"
#include "sgxwallet_common.h"
#include "Log.h"
#include "common.h"
shared_ptr
<
CSRManagerServer
>
CSRManagerServer
::
cs
=
nullptr
;
shared_ptr
<
jsonrpc
::
HttpServer
>
CSRManagerServer
::
hs3
=
nullptr
;
CSRManagerServer
::
CSRManagerServer
(
AbstractServerConnector
&
connector
,
serverVersion_t
type
)
:
abstractCSRManagerServer
(
connector
,
type
)
{}
...
...
@@ -113,7 +105,6 @@ Json::Value signByHashImpl(const string &hash, int status) {
return
result
;
}
Json
::
Value
CSRManagerServer
::
getUnsignedCSRs
()
{
LOCK
(
m
)
return
getUnsignedCSRsImpl
();
...
...
DKGCrypto.h
View file @
8bd21997
...
...
@@ -47,9 +47,6 @@ vector<string> GetBLSPubKey(const char * encryptedKeyHex);
vector
<
string
>
mult_G2
(
const
string
&
x
);
bool
TestCreateBLSShare
(
const
char
*
s_shares
);
#endif //SGXD_DKGCRYPTO_H
SEKManager.h
View file @
8bd21997
...
...
@@ -24,14 +24,11 @@
#ifndef SGXD_SEKMANAGER_H
#define SGXD_SEKMANAGER_H
#ifdef __cplusplus
#include <string>
#include <memory>
#endif
void
gen_SEK
();
#ifdef __cplusplus
...
...
@@ -48,5 +45,4 @@ EXTERNC void enter_SEK();
EXTERNC
void
initSEK
();
#endif //SGXD_SEKMANAGER_H
secure_enclave/DHDkg.h
View file @
8bd21997
...
...
@@ -24,7 +24,6 @@
#ifndef SGXD_DRIVE_KEY_DKG_H
#define SGXD_DRIVE_KEY_DKG_H
//void gen_session_keys(mpz_t skey, char* pub_key);
void
gen_session_key
(
char
*
skey
,
char
*
pub_keyB
,
char
*
common_key
);
void
session_key_recover
(
const
char
*
skey_str
,
const
char
*
sshare
,
char
*
common_key
);
...
...
@@ -33,5 +32,4 @@ void xor_encrypt(char* key, char* message, char* cypher);
void
xor_decrypt
(
char
*
key
,
char
*
cypher
,
char
*
message
);
#endif //SGXD_DRIVE_KEY_DKG_H
secure_enclave/EnclaveCommon.h
View file @
8bd21997
...
...
@@ -24,20 +24,14 @@
#ifndef SGXWALLET_ENCLAVECOMMON_H
#define SGXWALLET_ENCLAVECOMMON_H
#ifdef __cplusplus
#define EXTERNC extern "C"
#else
#define EXTERNC
#endif
//#include <stdint.h>
EXTERNC
void
check_key
(
int
*
errStatus
,
char
*
err_string
,
const
char
*
_keyString
);
EXTERNC
bool
enclave_sign
(
const
char
*
_keyString
,
const
char
*
_hashXString
,
const
char
*
_hashYString
,
char
*
_sig
);
EXTERNC
int
char2int
(
char
_input
);
...
...
@@ -49,16 +43,12 @@ EXTERNC bool hex2carray2(const char * _hex, uint64_t *_bin_len,
uint8_t
*
_bin
,
const
int
_max_length
);
EXTERNC
void
enclave_init
();
EXTERNC
void
LOG_INFO
(
char
*
msg
);
EXTERNC
void
LOG_WARN
(
char
*
_msg
);
EXTERNC
void
LOG_ERROR
(
char
*
_msg
);
EXTERNC
void
LOG_DEBUG
(
char
*
_msg
);
EXTERNC
void
LOG_TRACE
(
char
*
_msg
);
extern
uint32_t
globalLogLevel_
;
#endif //SGXWALLET_ENCLAVECOMMON_H
secure_enclave/secure_enclave.c
View file @
8bd21997
...
...
@@ -58,7 +58,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
uint8_t
decryptedDkgPoly
[
DKG_BUFER_LENGTH
];
void
*
(
*
gmp_realloc_func
)(
void
*
,
size_t
,
size_t
);
void
*
(
*
oc_realloc_func
)(
void
*
,
size_t
,
size_t
);
...
...
@@ -71,16 +70,11 @@ void *reallocate_function(void *, size_t, size_t);
void
free_function
(
void
*
,
size_t
);
void
trustedEnclaveInit
(
uint32_t
_logLevel
)
{
LOG_DEBUG
(
__FUNCTION__
);
globalLogLevel_
=
_logLevel
;
oc_realloc_func
=
&
reallocate_function
;
oc_free_func
=
&
free_function
;
...
...
@@ -136,7 +130,6 @@ void trustedEMpzDiv(mpz_t *c_un, mpz_t *a_un, mpz_t *b_un) {}
void
trustedEMpfDiv
(
mpf_t
*
c_un
,
mpf_t
*
a_un
,
mpf_t
*
b_un
)
{}
void
trustedGenerateEcdsaKey
(
int
*
errStatus
,
char
*
errString
,
uint8_t
*
encryptedPrivateKey
,
uint32_t
*
enc_len
,
char
*
pub_key_x
,
char
*
pub_key_y
)
{
LOG_DEBUG
(
__FUNCTION__
);
...
...
secure_enclave/secure_enclave.edl
View file @
8bd21997
#define ECDSA_SKEY_LEN 65
#define ECDSA_SKEY_BASE 16
#define ECDSA_ENCR_LEN 93
...
...
@@ -9,7 +8,6 @@ enclave {
trusted {
include "sgx_tgmp.h"
public void trustedEnclaveInit(uint32_t _logLevel);
public void trustedEMpzAdd(
...
...
@@ -67,21 +65,21 @@ enclave {
[in, count = SMALL_BUF_SIZE] char* hashY ,
[out, count = SMALL_BUF_SIZE] char* signature);
public void trustedGenDkgSecret (
public void trustedGenDkgSecret (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = 3050] uint8_t* encrypted_dkg_secret,
[user_check] uint32_t * enc_len,
size_t _t);
public void trustedDecryptDkgSecret (
public void trustedDecryptDkgSecret (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = 2490] uint8_t* decrypted_dkg_secret,
[user_check] uint32_t* dec_len);
public void trustedGetSecretShares (
public void trustedGetSecretShares (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
...
...
@@ -90,7 +88,7 @@ enclave {
unsigned _t,
unsigned _n);
public void trustedGetPublicShares (
public void trustedGetPublicShares (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
...
...
@@ -99,22 +97,22 @@ enclave {
unsigned _t,
unsigned _n);
public void trustedEcdsaSign(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, count = SMALL_BUF_SIZE] unsigned char* hash,
[out, count = SMALL_BUF_SIZE] char* sig_r,
[out, count = SMALL_BUF_SIZE] char* sig_s,
[user_check] uint8_t* sig_v,
int base);
public void trustedSetEncryptedDkgPoly( [user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly);
public void trustedGetEncryptedSecretShare(
public void trustedEcdsaSign(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, count = SMALL_BUF_SIZE] unsigned char* hash,
[out, count = SMALL_BUF_SIZE] char* sig_r,
[out, count = SMALL_BUF_SIZE] char* sig_s,
[user_check] uint8_t* sig_v,
int base);
public void trustedSetEncryptedDkgPoly( [user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly);
public void trustedGetEncryptedSecretShare(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
...
...
@@ -126,7 +124,7 @@ enclave {
uint8_t _n,
uint8_t ind);
public void trustedDkgVerify(
public void trustedDkgVerify(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 8193] const char* public_shares,
...
...
@@ -137,7 +135,7 @@ enclave {
int _ind,
[user_check] int* result);
public void trustedCreateBlsKey(
public void trustedCreateBlsKey(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 6145] const char* s_shares,
...
...
@@ -146,14 +144,14 @@ enclave {
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[user_check] uint32_t *enc_bls_key_len);
public void trustedGetBlsPubKey(
public void trustedGetBlsPubKey(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = 320] char* bls_pub_key);
public void trustedComplaintResponse(
public void trustedComplaintResponse(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t *encryptedDHKey,
...
...
@@ -165,27 +163,27 @@ enclave {
uint8_t _n,
uint8_t ind1);
public void trustedGenerateSEK(
public void trustedGenerateSEK(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[user_check] uint32_t *enc_len,
[out, count = 65] char* hex_SEK);
public void trustedSetSEK(
public void trustedSetSEK(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[in, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
uint64_t encr_len);
public void trustedSetSEK_backup(
public void trustedSetSEK_backup(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_SEK,
[user_check] uint32_t *enc_len,
[in, count = 65] const char* SEK_hex);
public void trustedGenerateEcdsaKeyAES (
public void trustedGenerateEcdsaKeyAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = ECDSA_ENCR_LEN] uint8_t* encrypted_key,
...
...
@@ -193,7 +191,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_x,
[out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedGetPublicEcdsaKeyAES(
public void trustedGetPublicEcdsaKeyAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
...
...
@@ -201,7 +199,7 @@ enclave {
[out, count = SMALL_BUF_SIZE] char * pub_key_x,
[out, count = SMALL_BUF_SIZE] char * pub_key_y);
public void trustedEcdsaSignAES(
public void trustedEcdsaSignAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
...
...
@@ -212,98 +210,96 @@ enclave {
[user_check] uint8_t* sig_v,
int base);
public void trustedEncryptKeyAES (
public void trustedEncryptKeyAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] const char* key,
[out, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
[user_check] uint32_t *enc_len);
public void trustedDecryptKeyAES (
public void trustedDecryptKeyAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[out, count = SMALL_BUF_SIZE] char* key );
public void trustedGenDkgSecretAES (
public void trustedGenDkgSecretAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[out, count = 3050] uint8_t* encrypted_dkg_secret,
[user_check] uint32_t * enc_len,
size_t _t);
[user_check] uint32_t * enc_len, size_t _t);
public void trustedDecryptDkgSecretAES (
public void trustedDecryptDkgSecretAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
[out, count = 2490] uint8_t* decrypted_dkg_secret,
[user_check] uint32_t* dec_len);
public void trustedSetEncryptedDkgPolyAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly,
[user_check] uint64_t* enc_len);
public void trustedGetEncryptedSecretShareAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[user_check] uint32_t* dec_len,
[out, count = 193] char* result_str,
[out, count = 320] char* s_shareG2,
[in, count = 129] char* pub_keyB,
uint8_t _t,
uint8_t _n,
uint8_t ind);
public void trustedGetPublicSharesAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len,
[out, count = 10000] char* public_shares,
unsigned _t,
unsigned _n);
public void trustedDkgVerifyAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 8193] const char* public_shares,
[in, count = 193] const char* s_share,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
unsigned _t,
int _ind,
[user_check] int* result);
public void trustedCreateBlsKeyAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 6145] const char* s_shares,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[user_check] uint32_t *enc_bls_key_len);
public void trustedBlsSignMessageAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, count = SMALL_BUF_SIZE] char* hashX ,
[in, count = SMALL_BUF_SIZE] char* hashY ,
[out, count = SMALL_BUF_SIZE] char* signature);
public void trustedGetBlsPubKeyAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = 320] char* bls_pub_key);
};
public void trustedSetEncryptedDkgPolyAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly,
[user_check] uint64_t* enc_len);
public void trustedGetEncryptedSecretShareAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char *err_string,
[out, count = SMALL_BUF_SIZE] uint8_t *encrypted_skey,
[user_check] uint32_t* dec_len,
[out, count = 193] char* result_str,
[out, count = 320] char* s_shareG2,
[in, count = 129] char* pub_keyB,
uint8_t _t,
uint8_t _n,
uint8_t ind);
public void trustedGetPublicSharesAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_dkg_secret,
uint32_t enc_len,
[out, count = 10000] char* public_shares,
unsigned _t,
unsigned _n);
public void trustedDkgVerifyAES(
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 8193] const char* public_shares,
[in, count = 193] const char* s_share,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
unsigned _t,
int _ind,
[user_check] int* result);
public void trustedCreateBlsKeyAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 6145] const char* s_shares,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = SMALL_BUF_SIZE] uint8_t * encr_bls_key,
[user_check] uint32_t *enc_bls_key_len);
public void trustedBlsSignMessageAES (
[user_check] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint32_t enc_len,
[in, count = SMALL_BUF_SIZE] char* hashX ,
[in, count = SMALL_BUF_SIZE] char* hashY ,
[out, count = SMALL_BUF_SIZE] char* signature);
public void trustedGetBlsPubKeyAES(
[user_check]int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = SMALL_BUF_SIZE] uint8_t* encrypted_key,
uint64_t key_len,
[out, count = 320] char* bls_pub_key);
};
untrusted {
include "gmp.h"
...
...
@@ -313,4 +309,3 @@ enclave {
void oc_free([user_check] void *optr, size_t sz);
};
};
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