problem generating pgp keys?
Posted
by pavankumar
on Stack Overflow
See other posts from Stack Overflow
or by pavankumar
Published on 2009-05-21T10:24:14Z
Indexed on
2010/04/23
10:03 UTC
Read the original article
Hit count: 394
bouncycastle
|c#
I'm using RSACryptoServiceProvider I've generated public key and private key. The keys generated by it are in the following format:
Public key:
<RSAKeyValue>
<Modulus>m9bAoh2...eGNKYs=</Modulus>
<Exponent>AQAB</Exponent>
</RSAKeyValue>
Private key:
<RSAKeyValue>
<Modulus>m9bAo...ZAIeGNKYs=</Modulus>
<Exponent>AQAB</Exponent>
<P>xGj/UcXs...R1lmeVQ==</P>
<Q>yx6e18aP...GXzXIXw==</Q>
<DP>NyxvnJ...1xAsEyQ==</DP>
<DQ>La17Jycd...FhApEqwznQ==</DQ>
<InverseQ>JrG7WCT...Hp3OWA==</InverseQ>
<D>RdWsOFn....KL699Vh6HK0=</D>
</RSAKeyValue>
but using PGP Desktop i've generated keys like this -
Public key:
mQCNBEoOlp8BBACi/3EvBZ83ZduvG6YHu5F0P7Z3xOnpIsaPvTk0q+dnjwDUa5sU
lEFbUZgDXSz7ZRhyiNqUOy+IG3ghPxpiKGBtldVpi33qaFCCEBiqsxRRpVCLgTUK
HP2kH5ysrlFWkxTo
=a4t9
Private key:
lQHgBEoOlp8BBACi/3EvBZ83ZduvG6YHu5F0P7Z3xOnpIsaPvTk0q+dnjwDUa5sU
lEFbUZgDXSz7ZRhyiNqUOy+IG3ghPxpiKGBtldVpi33qaFCCEBiqsxRRpVCLgTUK
waBnEitQti3XgUUEZnz/rnXcQVM0QFBe6H5x8fMDUw==
=CVPD
So when I'm passing the keys generated by PGP Desktop it is able to do encryption and decryption perfectly but when im passing the keys generated by RSACryptoServiceProvider I'm not able to encrypt and decrypt?
Can anyone please tell me how to generate keys in the pattern generated by PGP?
© Stack Overflow or respective owner