Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Functions
crys_dh_kg.h File Reference

This module defines the API that supports Diffie-Hellman domain. More...

#include "crys_dh.h"

Go to the source code of this file.

Data Structures

struct  CRYS_DHKGData_t
 
struct  CRYS_DHKG_CheckTemp_t
 

Macros

#define CRYS_DH_SEED_MIN_SIZE_IN_BYTES   CRYS_HASH_SHA1_DIGEST_SIZE_IN_BYTES
 
#define CRYS_DH_SEED_MIN_SIZE_IN_BITS   (CRYS_DH_SEED_MIN_SIZE_IN_BYTES * 8)
 
#define DH_X942_PRIME_MOD_MIN_VAL   1024
 
#define DH_X942_PRIME_MOD_MAX_VAL   2048
 
#define DH_X942_PGEN_COUNTER_CONST   4096
 
#define DH_X942_HASH_SIZE_BITS   160
 
#define DH_MAX_RATIO_MODULO_TO_ORDER   4
 

Typedefs

typedef struct CRYS_DHKGData_t CRYS_DHKGData_t
 
typedef struct CRYS_DHKG_CheckTemp_t CRYS_DHKG_CheckTemp_t
 

Functions

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. More...
 
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. More...
 

Detailed Description

This module defines the API that supports Diffie-Hellman domain.

Definition in file crys_dh_kg.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.