it would probably be a very lame question but could someone point me
to the infromation on hwo public and private keys are encoded in
rsa1024.dat, rsa2048.dat, rsa400pb.dat, rsa400pv.dat.
I have some public key files to use with RSA Crypto-C ME. They are
coded similarily: 0x30 as SEQUENCE_TAG and 0x02 as INTEGER_TAG but
Crypto++ refuses to accept them.
Thanks in advance,
Regards,
Nicolai
I would also be interested in this. I generated RSA keys using
ssh-keygen and I can get Crypto++ to accept the private key but not
the public one. Maybe I just can't do this?
Kevin
Hi Kevin,
I recently had to work out a procedure for generating keypairs with openssl
but loading them with crypto++. Here's what I did to get DSA keys working :
Generate the private key in DER format:
# openssl dsaparam -noout -outform DER -out dsakey.der -genkey 1024
Convert it to pkcs8 :
# openssl pkcs8 -topk8 -nocrypt -inform DER -in dsakey.der -outform DER -out
dsaprivkey.pk8
Create the pubkey :
# openssl dsa -inform DER -in dsakey.der -outform DER -out dsapubkey.der
-pubout
You should be able to load dsaprivkey.pk8 and dsapubkey.der from a FileSource
without problem. I think you should be able to convert your ssh keys in a
similar fashion.
Hope this helps,
--
Bryan Mongeau, BroadSign Inc.
--
"The genes are the master programmers: they are programming for their lives."
- Richard Dawkins
I will post an update when I figure out what is the format exactly.