ica_rsa_crt_key_check

Purpose

Analyzes an RSA CRT key and checks if the components are conform with the IBM® cryptographic architecture. If necessary the key is converted to a conform format that can be used for IBM cryptographic hardware acceleration.

Checks if the RSA key credentials in CRT format are presented in privileged form, respectively whether prime p is greater than prime q (p > q) In case of p < q, key credentials p and q as well as dp and dq are swapped and qInverse is recalculated.

Format

unsigned int ica_rsa_crt_key_check(ica_rsa_key_crt_t *rsa_key);

Parameters

ica_rsa_key_crt_t *rsa_key
Pointer to the key to be used in CRT format.

Return codes

0
All key credentials are in the correct format.
1
Key credentials were recalculated.
ENOMEM
Memory allocation fails.
EPERM

Used RSA key is > 4K.

For return codes indicating exceptions, see Return codes.