All fields for the context structure are internal.
Firmware never reads or writes these values. Firmware allocates the structure and provides the address of the structure to the driver in the function calls. Firmware must ensure that the defined instance of this structure remains in scope while the drive is in use.
The driver uses this structure to store and manipulate the RSA public key and additional coefficients to accelerate RSA calculation.
RSA key contained from two fields:
Other fields are accelerating coefficients and can be calculated by Cy_Cryptolite_Rsa_Coef API.
Data Fields | |
uint8_t * | moduloPtr |
The pointer to the modulus part of public key. More... | |
uint32_t | moduloLength |
The modulus length, in bits, maximum supported size is 4096 Bits. | |
uint8_t * | pubExpPtr |
The pointer to the exponent part of public key. | |
uint32_t | pubExpLength |
The exponent length, in bits, maximum supported size is 256Bit. | |
uint8_t * | barretCoefPtr |
The pointer to the Barrett coefficient. More... | |
uint8_t * | inverseModuloPtr |
The pointer to the binary inverse of the modulo. More... | |
uint8_t * | rBarPtr |
The pointer to the (2^moduloLength mod modulo). More... | |
bool | preCalculatedCoeff |
when set to 'true', pre-calculated coefficients must be provided in 'barretCoefPtr, 'inverseModuloPtr' and 'rBarPtr', can be calculated by Cy_Cryptolite_Rsa_Coef API . More... | |
uint8_t* cy_stc_cryptolite_rsa_pub_key_t::moduloPtr |
The pointer to the modulus part of public key.
uint8_t* cy_stc_cryptolite_rsa_pub_key_t::barretCoefPtr |
The pointer to the Barrett coefficient.
Memory for it should be allocated by user with size moduloLength + 1.
uint8_t* cy_stc_cryptolite_rsa_pub_key_t::inverseModuloPtr |
The pointer to the binary inverse of the modulo.
Memory for it should be allocated by user with size moduloLength.
uint8_t* cy_stc_cryptolite_rsa_pub_key_t::rBarPtr |
The pointer to the (2^moduloLength mod modulo).
Memory for it should be allocated by user with size moduloLength
bool cy_stc_cryptolite_rsa_pub_key_t::preCalculatedCoeff |
when set to 'true', pre-calculated coefficients must be provided in 'barretCoefPtr, 'inverseModuloPtr' and 'rBarPtr', can be calculated by Cy_Cryptolite_Rsa_Coef API .
When set to 'false', all the acceleration step coefficients will be calculated as part of Cy_Cryptolite_Rsa_Proc