Re: [Botan-devel] Read Private RSA key
Brought to you by:
randombit
|
From: Jack L. <ll...@ac...> - 2003-07-20 17:25:06
|
The problems is that by default OpenSSL will create keys in it's own undocumented format. That is why the decoding fails - the private key isn't PKCS #8 at all. The following sequence of commands will create a PKCS #8 private key with OpenSSL, encrypted with a passphrase of 'foo': openssl genrsa | openssl pkcs8 -topk8 -passout pass:foo > pkcs8.pem On Sat, 19 Jul 2003, Marcus Meyer wrote: > Hello, > I use Botan-1.2.6, I'll open a Private-Key-PEM file (create with openssl). > When read the file without change the folling Excepton is rise "PKCS #8: > Unkown PEM label RSA PRIVATE KEY" > then I change the start und end line to ----BEGIN|END PRIVATE KEY--- and > then i have the folling Exception > "PKCS #8 private key decoding failed" > > her ist es sample key ( is not my key ) > -----BEGIN PRIVATE KEY----- > MIICXgIBAAKBgQDRT/S9lJXfkDlpHZbyeaYsI48xB0PDYx+F4oo9NxVR+Wny0leW > QI+EV6p0Mv6Ypfqhq7U+uU4gMPTBhA62LniyfVPWoe3WWZbS7/+JYUB4zC9meHxh > jUSoNtuYm44wIqO5PMRqiz51OTzKXuWKcwfsLTVdyvL+SkqhPoTkTr1h8QIDAQAB > AoGBAJH520vkNmoGYaOnmUBeCsA5xIGC+YVoufFbvuFWay4SbguFGsSVHgJESYJk > lh7LkvHxmKO4BH565heYC9KOsmk09KNQI06cAX7PSge39z44BAFqRp4Sjs+ikYH1 > hoUFl0M+PrTWP4MSWOqOYsrJICBelZVjaONU02a1mSNm6dwBAkEA+4NMMB780fdc > u5c89zyHybeXwsen2jT1FsAAaSuqqFIuqqWDPJpTgkjQDsdms/wat0iaMDWvbuTz > ldNzEwWPkQJBANUL69eE2ytLkK6ScjLXCuyRF/gwmHH72T/ZEuukL0QwT7fTuH0S > VHMOvt4hKFnMDx+z/go1l16OwkD/LcY8PGECQQDUiXZXb8grUkINz9bYAlGo9zkK > gxdnwLqf1+5A8YKMLK58y9Lj4nHRNeCDrKMwU0jsOzD4rlUqe9UPdhjXKSrRAkAx > 0KPItQv6R6UA7MU/FgE754FPSy2aGWVnBH7kEnPq4dECDsNom0ybyqrejao9tPUk > WJXiFT3bok3RnNk7LQKBAkEAvOIyHQpz/PwNr5eK6SXxpzGll+9lpNxkdMm+S5lN > NRsMHWpCyMHjBkTphldx4jDngWrE08lDRqOVWqc72zOj9A== > -----END PRIVATE KEY----- > > can anybody help? > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > |