Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Cryptography: RSA key validation

achrzesz2
New Contributor I
91 Views
Hello
In the example from IPP Reference Manual, Vol 4: Cryptography, p. 390
one can find the line:

ippsRSAValidate(E, 50, &result, pRSAprv2, ippsPRNGen, pRand);

which validates the RSA key pRSAprv2 (CRT version).
In that case the validation is OK.

My problem is:
When I try to validate the pRSAprv1 key (no-CRT version)
which is also set in the same code, ie.
when I replace the previous validation by:

ippsRSAValidate(E, 50, &result, pRSAprv1, ippsPRNGen, pRand);

then the validation fails.

Can somebody clarify the difference.
Does the validation function accept the no-CRT version of RSA keys?

Andrzej Ch.
0 Kudos
2 Replies
Chao_Y_Intel
Employee
91 Views

Hi Andrzej,

ippsRSAValidate only validates pRSAprv2 ( (E,P,Q,D) data).

pRSAprv1 ((E,N,D) data) is unlike pRSAprv2. It can not be validated by some mathematics.

Thanks,

Chao

achrzesz2
New Contributor I
91 Views
Hi Chao
Thank you for replay

I have two remarks

1. I think, the function RSAValidate should not return:

ippStsNoErr: No error, it's OK

when the appropriate P,Q are not set (and the validation fails-
-the case of pRSAprv1)

2. I think that the user should be warned (for example in the manual)
that if she/he sets the private key as the pair N,D, then the
validation is impossible

3. I can understand the present approach (for its efficiency)
(from purely mathematical point of view, the person who knows D
has to know P,Q but one can cipher without setting these parameters)

Andrzej Ch.
Reply