What are the required steps to properly generate RSA cryptographic systems key pairs?

Published:05/05/2010   Last Updated:05/04/2010

1) Establish pseudo random generator.

2) Define size of RSA cryptosystem - size of N (kn) and size of P (kp) in bits

3) Define private RSA using 

      √ ippsRSAGetSize(kn, kp, IppRSAprivate, &rsaCtxSize);

      √ ippsRSAInit(kn, kp, IppRSAprivate, pRSActx);

function calls. Where pRSActx is the memory allocated for RSA context

4) Define initial value of the public key E and call

    ippsRSAGenerate(pE, kn, kp, nTrials, pRSActx, rndFunc, pRndParam);

If ippsRSAGenerate returns IppNoErr, then keys are generated.

If  ippsRSAGenerate returns ippStsInsufficientEntropy, then repeat ippsRSAGenerate procedure.
note that ippsRSAGenerate may change initial value of public key E.

When RSA keys are generated by ippsRSAGenerate one may verify generated RSA cryptosystem by ippsRSAValidate call.

If fact both ippsRSAGenerate and ippsRSAValidate are using similar algorithms and usually ippsRSAValidate is unnecessary if RSA is generated by the ippsRSAGenerate.

The ippsRSAValidate call is useful when RSA keys are get from outside and one is not 100% sure that they are valid.



Product and Performance Information


Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804