Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
crys_dh_kg.h File Reference
This module defines the API that supports Diffie-Hellman domain. More...
Go to the source code of this file.
Data Structures | |
struct | CRYS_DHKGData_t |
struct | CRYS_DHKG_CheckTemp_t |
Typedefs | |
typedef struct CRYS_DHKGData_t | CRYS_DHKGData_t |
typedef struct CRYS_DHKG_CheckTemp_t | CRYS_DHKG_CheckTemp_t |
Functions | |
CIMPORT_C 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.42]. It receives the required sizes (in bits) of the modulus, the generator's order, and the seed, and then generates the prime modulus and the generator according to given sizes. If generateSeed argument is set to 1, the function generates and outputs the random seed. Otherwise (if set to 0), the seed has to be passed as an input argument. According to implementation the seed should be not greate, than (2^seedSizeBits - 2^32). The seed and some additional parameters, generated by the function (factorJ, pgenCounter), are used for checking that all domain parameters are generated according to the standard and not forged. | |
CIMPORT_C 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 the domain was created according to the standard [ANS X9.42]. According to implementation, the value of the user passed seed should be not greate, than (2^seedSizeBits - 2^32), otherwise an error is returned. |
Detailed Description
This module defines the API that supports Diffie-Hellman domain.
Definition in file crys_dh_kg.h.
Generated on Tue Jul 12 2022 12:46:24 by
