1
$\begingroup$

I cannot find if the two numbers for RSA are tested against an elliptic curve primality test. If not, is there a way to extract the two integers of my private key in order to test it by myself?

If this is not an accurate question why?

$\endgroup$
  • $\begingroup$ In what format does whatever-you're-using store the private key? ​ ​ $\endgroup$ – user991 Nov 16 '16 at 9:19
  • $\begingroup$ I am using GPG, so the only thing I can say is, I can export the private key that contains those prime numbers. $\endgroup$ – Creasixtine Nov 16 '16 at 9:23
3
$\begingroup$

GPG (1.4.21) does not use an elliptic curve primality test. It uses 5 strong pseudoprime tests, with the first to base 2 and the others to a random base. For factors large enough that the key is secure, odds that a composite creep by chance are entirely negligible in practice (for a quantitative estimate see appendix F.1 in FIPS 186-4). Also, the mere fact that an RSA key allows decryption of messages, or generation of signatures that verify, is a fair probabilistic primality test of its factors.

To dump a private key not protected by a passphrase under gpg 1.4.x, use
gpg --export-secret-key -a "john doe" | gpg --list-packets --debug 2

For a key version 4 algo 1, the factors of the public modulus are skey[3] and skey[4].

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.