On 03/16/2011 01:54 PM, Superpacko wrote:
> Hi, im working on a software that uses GPG as a Key Manager but leaves
> the encryption operations to NSS. I'm having a hard time trying to
> figure out how to import GPG's public and private keys in NSS.
> GPG stores the keys in "PKT_public_key" and "PKT_private_key"
> structures, both have a "MPI pkey[PUBKEY_MAX_NPKEY];" which is what i
> need to import in NSS if im not wrong.
>
> does anyone know how to do this? i woudl really apreciate the help.
>
> thanks a lot!
What does the full struct look like, and what is the length of
PUBKEY_MAX_NPKEY.

RSA public keys have 2 components: Public exponent (typically a small
integer value with 2 one bits. 65537 is the most common value, followed
by 3 and 257). and a modulus (a large integer usually in lengths of 128
bytes, 256 bytes, and 512 bytes, rarely 64 byte are larger then 512
bytes). If there isn't two fields in the structure, then the values are
somehow squashed together in some manner.

Does GPG support non-RSA keys? Those have yet other characteristics.

bob

-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to