Extract numbers from a key

Werner Koch wk at gnupg.org
Wed Aug 3 14:23:09 CEST 2011


On Tue,  2 Aug 2011 20:10, tigresetdragons at yahoo.fr said:

> 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)

Import the key and then:

$ gpg --list-keys --with-key-data KEYID

In the output look for pkd records:

If field 1 has the tag "pkd", a listing looks like this:
pkd:0:1024:B665B1435F4C2 .... FF26ABB:
    !  !   !-- the value
    !  !------ for information: number of bits in the value
    !--------- index (eg. DSA goes from 0 to 3: p,q,g,y)

The entire format is decribed in doc/DETAILS.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gnupg-users mailing list