Visible to Intel only — GUID: GUID-1F29989A-F3CA-4E40-B6DF-8D1C73AB63E5
Visible to Intel only — GUID: GUID-1F29989A-F3CA-4E40-B6DF-8D1C73AB63E5
RSA_GetPublicKey, RSA_GetPrivateKeyType1, RSA_GetPrivateKeyType2
Extracts key components from an RSA key context.
Syntax
IppStatus ippsRSA_GetPublicKey(IppsBigNumState* pModulus, IppsBigNumState* pPublicExp, const IppsRSAPublicKeyState* pKey);
IppStatus ippsRSA_GetPrivateKeyType1(IppsBigNumState* pModulus, IppsBigNumState* pPrivateExp, const IppsRSAPrivateKeyState* pKey);
IppStatus ippsRSA_GetPrivateKeyType2(IppsBigNumState* pFactorP, IppsBigNumState* pFactorQ, IppsBigNumState* pCrtExpP, IppsBigNumState* pCrtExpQ, IppsBigNumState* pInverseQ, const IppsRSAPrivateKeyState* pKey);
Include Files
ippcp.h
Parameters
pModulus |
The composite RSA modulus n. |
pPublicExp |
The e component of the RSA public key. |
pPrivateExp |
The d component of the type 1 RSA private key. |
pFactorP, pFactorQ |
The p and q factors of the RSA modulus n = p*q. |
pCrtExpP, pCrtExpQ |
The dP and dQ components of the quintuple (p,q,dP,dQ,qInv). |
pInverseQ |
The qInv component of the quintuple (p,q,dP,dQ,qInv). |
pKey |
Pointer to the IppsRSAPublicKeyState or IppsRSAPrivateKeyState context. |
Description
The RSA_GetPublicKey function extracts components of the RSA public key (n, e) from the IppsRSAPublicKeyState context. The RSA_GetPrivateKeyType1 and RSA_GetPrivateKeyType2 functions extract components of the RSA private key of the respective type from the IppsRSAPrivateKeyState context.
To extract key components selectively, set pointers to the key components that do not need to be extracted to NULL.
Return Values
ippStsNoErr |
Indicates no error. Any other value indicates an error or warning. |
ippStsNullPtrErr |
Indicates an error condition if any of the specified pointers is NULL. |
ippStsContextMatchErr |
Indicates an error condition if any of the context parameters does not match the operation. |
ippStsSizeErr |
Indicates an error condition if the bit length of any specified key component is not sufficient to hold the value. |
ippStsIncompleteContextErr |
Indicates an error condition if the public or private key is not set up. |
Related Information