test 2
This commit is contained in:
parent
f92dcf0f5b
commit
20500fbb58
@ -47,11 +47,11 @@
|
||||
|
||||
/* DEFAULT CONFIGURATIONS */
|
||||
|
||||
#define DEBUG 1 //print all values when 1
|
||||
#define DEBUG 0 //print all values when 1
|
||||
|
||||
#define isRSA 0
|
||||
#define isECC 1
|
||||
#define DFL_PKC isRSA // isECC, 1 = ECC, 0= RSA
|
||||
#define DFL_PKC isECC // isECC, 1 = ECC, 0= RSA
|
||||
|
||||
//#define BIN 2
|
||||
#define PEM 0
|
||||
|
@ -70,18 +70,18 @@ void main()
|
||||
//Session key creation
|
||||
//receive session nonce from verifier?
|
||||
//placeholder
|
||||
char * nonce = "session1";
|
||||
char * NONCE = "session1";
|
||||
|
||||
KeyDrv_context SSN_ctx;
|
||||
SSN_ctx.ENT_MODE = SW_PRNG;
|
||||
SSN_ctx.PKC_MODE = DFL_PKC;
|
||||
SSN_ctx.seed = FWKEY;
|
||||
SSN_ctx.phrase = nonce;
|
||||
SSN_ctx.KEY_FORM = DFL_FORM;
|
||||
KeyDrv_context SSN1_ctx;
|
||||
SSN1_ctx.ENT_MODE = SW_PRNG; //non determ, gen new key for every session
|
||||
SSN1_ctx.PKC_MODE = DFL_PKC;
|
||||
SSN1_ctx.seed = NULL;
|
||||
SSN1_ctx.phrase = NONCE;
|
||||
SSN1_ctx.KEY_FORM = DFL_FORM;
|
||||
|
||||
printf("Generating Session keys\n");
|
||||
|
||||
ret = AsymmKeyGen(&SSN_ctx);
|
||||
ret = AsymmKeyGen(&SSN1_ctx);
|
||||
if(ret < DIMASUCCESS)
|
||||
{
|
||||
perror("DIMAFAILURE : SESSION key gen failed\n");
|
||||
|
BIN
trial4/out/main
BIN
trial4/out/main
Binary file not shown.
Loading…
Reference in New Issue
Block a user