diff --git a/trial4/defines.h b/trial4/defines.h index f4b1ada..5d8e631 100644 --- a/trial4/defines.h +++ b/trial4/defines.h @@ -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 diff --git a/trial4/main.c b/trial4/main.c index f6e78c4..6a1581f 100644 --- a/trial4/main.c +++ b/trial4/main.c @@ -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"); diff --git a/trial4/out/main b/trial4/out/main index e73f4e2..aa8be77 100755 Binary files a/trial4/out/main and b/trial4/out/main differ