85 #define CRYS_SRP_MODULUS_SIZE_1024_BITS 1024 87 #define CRYS_SRP_MODULUS_SIZE_1536_BITS 1536 89 #define CRYS_SRP_MODULUS_SIZE_2048_BITS 2048 91 #define CRYS_SRP_MODULUS_SIZE_3072_BITS 3072 94 #define CRYS_SRP_MAX_MODULUS_IN_BITS CRYS_SRP_MODULUS_SIZE_3072_BITS 96 #define CRYS_SRP_MAX_MODULUS (CRYS_SRP_MAX_MODULUS_IN_BITS/SASI_BITS_IN_BYTE) 98 #define CRYS_SRP_MAX_MODULUS_IN_WORDS (CRYS_SRP_MAX_MODULUS_IN_BITS/SASI_BITS_IN_32BIT_WORD) 102 #define CRYS_SRP_PRIV_NUM_MIN_SIZE_IN_BITS (256) 104 #define CRYS_SRP_PRIV_NUM_MIN_SIZE (CRYS_SRP_PRIV_NUM_MIN_SIZE_IN_BITS/SASI_BITS_IN_BYTE) 106 #define CRYS_SRP_PRIV_NUM_MIN_SIZE_IN_WORDS (CRYS_SRP_PRIV_NUM_MIN_SIZE_IN_BITS/SASI_BITS_IN_32BIT_WORD) 108 #define CRYS_SRP_PRIV_NUM_MAX_SIZE_IN_BITS (CRYS_SRP_MAX_MODULUS_IN_BITS) 110 #define CRYS_SRP_PRIV_NUM_MAX_SIZE (CRYS_SRP_PRIV_NUM_MAX_SIZE_IN_BITS/SASI_BITS_IN_BYTE) 112 #define CRYS_SRP_PRIV_NUM_MAX_SIZE_IN_WORDS (CRYS_SRP_PRIV_NUM_MAX_SIZE_IN_BITS/SASI_BITS_IN_32BIT_WORD) 115 #define CRYS_SRP_MAX_DIGEST_IN_WORDS CRYS_HASH_RESULT_SIZE_IN_WORDS 117 #define CRYS_SRP_MAX_DIGEST (CRYS_SRP_MAX_DIGEST_IN_WORDS*SASI_32BIT_WORD_SIZE) 120 #define CRYS_SRP_MIN_SALT_SIZE (8) 122 #define CRYS_SRP_MIN_SALT_SIZE_IN_WORDS (CRYS_SRP_MIN_SALT_SIZE/SASI_32BIT_WORD_SIZE) 124 #define CRYS_SRP_MAX_SALT_SIZE (64) 126 #define CRYS_SRP_MAX_SALT_SIZE_IN_WORDS (CRYS_SRP_MAX_SALT_SIZE/SASI_32BIT_WORD_SIZE) 225 CRYS_SRP_Modulus_t srpModulus,
239 #define CRYS_SRP_HK_INIT(srpType, srpModulus, srpGen, modSizeInBits, pUserName, userNameSize, pPwd, pwdSize, pRndState, rndGenerateVectFunc, pCtx) \ 240 CRYS_SRP_Init(srpType, CRYS_SRP_VER_HK, srpModulus, srpGen, modSizeInBits, CRYS_HASH_SHA512_mode, pUserName, userNameSize, pPwd, pwdSize, pRndState, rndGenerateVectFunc, pCtx) 255 CRYS_SRP_Modulus_t pwdVerifier,
281 size_t ephemPrivSize,
284 CRYS_SRP_Modulus_t pwdVerifier,
285 CRYS_SRP_Modulus_t hostPubKeyB,
301 CRYS_SRP_Modulus_t pwdVerifier,
302 CRYS_SRP_Modulus_t userPubKeyA,
303 CRYS_SRP_Modulus_t hostPubKeyB,
304 CRYS_SRP_Digest_t userProof,
305 CRYS_SRP_Digest_t hostProof,
306 CRYS_SRP_Secret_t sharedSecret,
321 size_t ephemPrivSize,
324 CRYS_SRP_Modulus_t userPubKeyA,
341 CRYS_SRP_Modulus_t userPubKeyA,
342 CRYS_SRP_Modulus_t hostPubKeyB,
343 CRYS_SRP_Digest_t userProof,
344 CRYS_SRP_Secret_t sharedSecret,
356 CRYS_SRP_Secret_t sharedSecret,
357 CRYS_SRP_Modulus_t userPubKeyA,
358 CRYS_SRP_Digest_t userProof,
359 CRYS_SRP_Digest_t hostProof,
#define CRYS_SRP_MAX_DIGEST
CRYSError_t CRYS_SRP_HostProofVerifyAndCalc(size_t saltSize, uint8_t *pSalt, CRYS_SRP_Modulus_t pwdVerifier, CRYS_SRP_Modulus_t userPubKeyA, CRYS_SRP_Modulus_t hostPubKeyB, CRYS_SRP_Digest_t userProof, CRYS_SRP_Digest_t hostProof, CRYS_SRP_Secret_t sharedSecret, CRYS_SRP_Context_t *pCtx)
Verifies the user Proof and calculates the Host message proof.
CRYSError_t CRYS_SRP_UserProofVerify(CRYS_SRP_Secret_t sharedSecret, CRYS_SRP_Modulus_t userPubKeyA, CRYS_SRP_Digest_t userProof, CRYS_SRP_Digest_t hostProof, CRYS_SRP_Context_t *pCtx)
This function verifies the host proof.
CRYSError_t CRYS_SRP_UserPubKeyCreate(size_t ephemPrivSize, CRYS_SRP_Modulus_t userPubKeyA, CRYS_SRP_Context_t *pCtx)
This function generates user public & private ephemeral key, known as A & a in RFC.
CRYS_SRP_Digest_t credDigest
#define CRYS_PKA_BARRETT_MOD_TAG_BUFF_SIZE_IN_WORDS
The file contains all of the enums and definitions that are used in the PKA related code...
CRYS_HASH_OperationMode_t
CRYS_SRP_Modulus_t modulus
CRYSError_t CRYS_SRP_Init(CRYS_SRP_Entity_t srpType, CRYS_SRP_Version_t srpVer, CRYS_SRP_Modulus_t srpModulus, uint8_t srpGen, size_t modSizeInBits, CRYS_HASH_OperationMode_t hashMode, uint8_t *pUserName, size_t userNameSize, uint8_t *pPwd, size_t pwdSize, void *pRndState, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, CRYS_SRP_Context_t *pCtx)
This function initiates the SRP context.
SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc
uint8_t CRYS_SRP_Modulus_t[(3072/8)]
CRYS_SRP_Modulus_t ephemPriv
CRYSError_t CRYS_SRP_PwdVerCreate(size_t saltSize, uint8_t *pSalt, CRYS_SRP_Modulus_t pwdVerifier, CRYS_SRP_Context_t *pCtx)
This function calculates pSalt & password verifier.
CRYS_RND_State_t * pRndState
uint8_t CRYS_SRP_Digest_t[(16 *(sizeof(uint32_t)))]
CRYS_SRP_GroupParam_t groupParam
struct CRYS_SRP_Context_t CRYS_SRP_Context_t
struct CRYS_SRP_GroupParam_t CRYS_SRP_GroupParam_t
This file contains all of the enums and definitions that are used for the CRYS HASH APIs...
CRYS_HASH_OperationMode_t hashMode
This file contains the CRYS APIs used for random number generation. The random-number generation modu...
CRYSError_t CRYS_SRP_Clear(CRYS_SRP_Context_t *pCtx)
Clears the SRP context.
uint8_t CRYS_SRP_Secret_t[2 *(16 *(sizeof(uint32_t)))]
CRYS_SRP_Digest_t userNameDigest
This file contains the platform dependent definitions and types.
CRYSError_t CRYS_SRP_UserProofCalc(size_t saltSize, uint8_t *pSalt, CRYS_SRP_Modulus_t userPubKeyA, CRYS_SRP_Modulus_t hostPubKeyB, CRYS_SRP_Digest_t userProof, CRYS_SRP_Secret_t sharedSecret, CRYS_SRP_Context_t *pCtx)
This function calculates the user proof.
#define CRYS_SRP_MAX_MODULUS
CRYS_SRP_Version_t srpVer
CRYS_SRP_Entity_t srpType
CRYSError_t CRYS_SRP_HostPubKeyCreate(size_t ephemPrivSize, CRYS_SRP_Modulus_t pwdVerifier, CRYS_SRP_Modulus_t hostPubKeyB, CRYS_SRP_Context_t *pCtx)
This function generates host public & private ephemeral key, known as B & b in RFC.
uint32_t(* SaSiRndGenerateVectWorkFunc_t)(void *rndState_ptr, uint16_t outSizeBytes, uint8_t *out_ptr)
This module defines the error return code types and the numbering spaces of the error codes for each ...