59 #define CRYS_DH_SEED_MIN_SIZE_IN_BYTES CRYS_HASH_SHA1_DIGEST_SIZE_IN_BYTES 61 #define CRYS_DH_SEED_MIN_SIZE_IN_BITS (CRYS_DH_SEED_MIN_SIZE_IN_BYTES * 8) 101 #define DH_X942_PRIME_MOD_MIN_VAL 1024 103 #define DH_X942_PRIME_MOD_MAX_VAL 2048 105 #define DH_X942_PGEN_COUNTER_CONST 4096 107 #define DH_X942_HASH_SIZE_BITS 160 109 #define DH_MAX_RATIO_MODULO_TO_ORDER 4 135 uint32_t modPsizeBits,
137 uint32_t orderQsizeBits,
140 uint32_t seedSizeBits,
146 uint8_t *generatorG_ptr,
149 uint32_t *generGsizeBytes_ptr,
152 uint8_t *factorJ_ptr,
155 uint32_t *JsizeBytes_ptr,
161 uint32_t *pgenCounter_ptr,
183 uint32_t modPsizeBytes,
186 uint32_t orderQsizeBytes,
187 uint8_t *generatorG_ptr,
188 uint32_t generatorSizeBytes,
190 uint32_t seedSizeBits,
191 uint32_t pgenCounter,
#define CRYS_DH_MAX_MOD_BUFFER_SIZE_IN_WORDS
struct CRYS_DHKGData_t CRYS_DHKGData_t
uint32_t TempBuff1[(((2048 /8)/sizeof(uint32_t))+2)]
uint32_t TempBuff2[(((2048 /8)/sizeof(uint32_t))+2)]
CRYSError_t CRYS_DH_CreateDomainParams(void *rndState_ptr, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, uint32_t modPsizeBits, uint32_t orderQsizeBits, uint32_t seedSizeBits, uint8_t *modP_ptr, uint8_t *orderQ_ptr, uint8_t *generatorG_ptr, uint32_t *generGsizeBytes_ptr, uint8_t *factorJ_ptr, uint32_t *JsizeBytes_ptr, uint8_t *seedS_ptr, int8_t generateSeed, uint32_t *pgenCounter_ptr, CRYS_DHKGData_t *DHKGbuff_ptr)
This function generates DH domain parameters in Galois prime field according to standard [ANS X9...
uint32_t TempBuff5[(((2048 /8)/sizeof(uint32_t))+2)]
This module defines the API that supports Diffie-Hellman key exchange, as defined in [PKCS3] and in [...
CRYSError_t CRYS_DH_CheckDomainParams(void *rndState_ptr, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, uint8_t *modP_ptr, uint32_t modPsizeBytes, uint8_t *orderQ_ptr, uint32_t orderQsizeBytes, uint8_t *generatorG_ptr, uint32_t generatorSizeBytes, uint8_t *seedS_ptr, uint32_t seedSizeBits, uint32_t pgenCounter, CRYS_DHKG_CheckTemp_t *checkTempBuff_ptr)
This function receives DH domain parameters, seed and prime generation counter and then verifies that...
struct CRYS_DHKG_CheckTemp_t CRYS_DHKG_CheckTemp_t
uint32_t TempBuff3[(((2048 /8)/sizeof(uint32_t))+2)]
uint32_t TempBuff4[(((2048 /8)/sizeof(uint32_t))+2)]
uint32_t TempBuff6[(((2048 /8)/sizeof(uint32_t))+2)]
uint32_t(* SaSiRndGenerateVectWorkFunc_t)(void *rndState_ptr, uint16_t outSizeBytes, uint8_t *out_ptr)