Extract numbers from a key

Melvin Carvalho melvincarvalho at gmail.com
Wed Aug 3 12:23:11 CEST 2011


On 2 August 2011 20:10, Sébastien <tigresetdragons at yahoo.fr> wrote:
> Hello,
> I would like to know an easy way to get numbers used in a key.
> For example, in a RSA key, N and e (used like this: message^e modulus N)

Why do you want N and E?

I think exponent is almost always 65537

Some apps display these numbers, e.g. firefox does for X.509 RSA keys.
  Maybe the app you are using has the value.

Not sure the easiest way to get the modulus otherwise but I know you
can do it with the bouncycastle java library.

>
> Here is one RSA 1024 bits public key:
> -----BEGIN PGP PUBLIC KEY BLOCK-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> mI0ETjgHawEEAMy2xBB1f2tQBd5pIlztN9FrtS3pHEzT73tgOLVLat4h5rhIjMo4
> 9zx7PSucB+v/W/l4w1OuABwXwbiyZmYs6xrXsHWLWS3HQzz1c7Kqytr2yLUn8+Ua
> oZfHnHfHXBVen7r3fCF6HmLoUt6i6EMIdKeXgLgw56Imi+vuUP4Tk+T/ABEBAAG0
> PnRvdG8gYmlzICgyw6htZSBlc3NhaSBkZSBjcsOpYXRpb24gZGUgY2zDqSkgPHRv
> dG8yQG91aS1vdWkuZnI+iLgEEwECACIFAk44B2sCGwMGCwkIBwMCBhUIAgkKCwQW
> AgMBAh4BAheAAAoJEPL2A707YVbW198D/3zFEv9BBwaU1c4ynOzpA7snpe1my79y
> FPmPtZ+hA1KIMQjEVhGX2Frg9gI0Ctruoyg6xKnxup/lD90MFGstVg+4NQNrQ69p
> oXGV/VlrT0iM0vvN55WIu5Kdqpg2/OHyrABe9mxvRbQRFCXmPSQ5u4V6MJw29W5i
> 2jhWZbrxGDASuI0ETjgHawEEALsT4E4TiLKyt7vRADTY2gHOoLISC0Raw/Idxqph
> WtMw/onfa75GS8tx6DzTueVULyyWwh+iMMUbX5ZoMvFmpft32NdJBF7FPhFYTfoQ
> /qTshjUHMAVsdgjJ4INBUNj8+2TiLdXS1aGxv7chg1OJynGCV3Uw5VFgTVS1GQku
> HknJABEBAAGInwQYAQIACQUCTjgHawIbDAAKCRDy9gO9O2FW1nHlA/4p9H+ko3y/
> cuLWUmT5ytq1TYSvFzp7vP2NRlNtgL9RgUSO3T+Qi83RiCrqI6XIGH92cKG661kn
> ZFdkD5KUVzyCUV+Aotp10KDlzb9yEPxjULkvgGy7RR5tsP0yDHSdcdZ0qI7Uikla
> gfwM5a1NqG2nerqlcvzx4t+Qw/P6OsdcwA==
> =lNKN
> -----END PGP PUBLIC KEY BLOCK-----
>
> What are N and e ?
>
> _______________________________________________
> Gnupg-users mailing list
> Gnupg-users at gnupg.org
> http://lists.gnupg.org/mailman/listinfo/gnupg-users
>



More information about the Gnupg-users mailing list