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.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
CryptoCell RSA key generation APIs
[CryptoCell RSA APIs]
Functions | |
CIMPORT_C CRYSError_t | CRYS_RSA_KG_GenerateKeyPair (void *rndState_ptr, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, uint8_t *pubExp_ptr, uint16_t pubExpSizeInBytes, uint32_t keySize, CRYS_RSAUserPrivKey_t *userPrivKey_ptr, CRYS_RSAUserPubKey_t *userPubKey_ptr, CRYS_RSAKGData_t *keyGenData_ptr, CRYS_RSAKGFipsContext_t *pFipsCtx) |
CRYS_RSA_KG_GenerateKeyPair generates a Pair of public and private keys on non CRT mode according to [ANS X9.31]. | |
CIMPORT_C CRYSError_t | CRYS_RSA_KG_GenerateKeyPairCRT (void *rndState_ptr, SaSiRndGenerateVectWorkFunc_t rndGenerateVectFunc, uint8_t *pubExp_ptr, uint16_t pubExpSizeInBytes, uint32_t keySize, CRYS_RSAUserPrivKey_t *userPrivKey_ptr, CRYS_RSAUserPubKey_t *userPubKey_ptr, CRYS_RSAKGData_t *keyGenData_ptr, CRYS_RSAKGFipsContext_t *pFipsCtx) |
Generates a pair of public and private keys on CRT mode according to [ANS X9.31]. |
Function Documentation
CIMPORT_C CRYSError_t CRYS_RSA_KG_GenerateKeyPair | ( | void * | rndState_ptr, |
SaSiRndGenerateVectWorkFunc_t | rndGenerateVectFunc, | ||
uint8_t * | pubExp_ptr, | ||
uint16_t | pubExpSizeInBytes, | ||
uint32_t | keySize, | ||
CRYS_RSAUserPrivKey_t * | userPrivKey_ptr, | ||
CRYS_RSAUserPubKey_t * | userPubKey_ptr, | ||
CRYS_RSAKGData_t * | keyGenData_ptr, | ||
CRYS_RSAKGFipsContext_t * | pFipsCtx | ||
) |
CRYS_RSA_KG_GenerateKeyPair generates a Pair of public and private keys on non CRT mode according to [ANS X9.31].
- Note:
- To be FIPS 186-4 [5.1] compliant use only the following key sizes (in bits): 1024, 2048 and 3072.
- Returns:
- CRYS_OK on success.
- A non-zero value from crys_rsa_error.h or crys_rnd_error.h on failure.
- Parameters:
-
[in,out] rndState_ptr Pointer to the RND state structure. [in] rndGenerateVectFunc Pointer to the random vector generation function. [in] pubExp_ptr The pointer to the public exponent (public key). [in] pubExpSizeInBytes The public exponent size in bytes. [in] keySize The size of the key, in bits. Supported sizes are 512, 1024, 2048, 3072 and 4096 bit. [out] userPrivKey_ptr Pointer to the private key structure. [out] userPubKey_ptr Pointer to the public key structure. [in] keyGenData_ptr Pointer to a temporary structure required for the KeyGen operation. [in] pFipsCtx Pointer to temporary buffer used in case FIPS certification if required.
CIMPORT_C CRYSError_t CRYS_RSA_KG_GenerateKeyPairCRT | ( | void * | rndState_ptr, |
SaSiRndGenerateVectWorkFunc_t | rndGenerateVectFunc, | ||
uint8_t * | pubExp_ptr, | ||
uint16_t | pubExpSizeInBytes, | ||
uint32_t | keySize, | ||
CRYS_RSAUserPrivKey_t * | userPrivKey_ptr, | ||
CRYS_RSAUserPubKey_t * | userPubKey_ptr, | ||
CRYS_RSAKGData_t * | keyGenData_ptr, | ||
CRYS_RSAKGFipsContext_t * | pFipsCtx | ||
) |
Generates a pair of public and private keys on CRT mode according to [ANS X9.31].
- Note:
- To be FIPS 186-4 [5.1] compliant use only the following key sizes (in bits): 1024, 2048 and 3072.
- Returns:
- CRYS_OK on success.
- A non-zero value from crys_rsa_error.h or crys_rnd_error.h on failure.
- Parameters:
-
[in,out] rndState_ptr Pointer to the RND state structure. [in] rndGenerateVectFunc Pointer to the random vector generation function. [in] pubExp_ptr The pointer to the public exponent (public key). [in] pubExpSizeInBytes The public exponent size in bytes. [in] keySize The size of the key, in bits. Supported sizes are 512, 1024, 2048, 3072 and 4096 bit. [out] userPrivKey_ptr Pointer to the private key structure. [out] userPubKey_ptr Pointer to the public key structure. [in] keyGenData_ptr Pointer to a temporary structure required for the KeyGen operation. [in] pFipsCtx Pointer to temporary buffer used in case FIPS certification if required.
Generated on Tue Jul 12 2022 13:55:21 by
