Password protected RSA keys and PKI package
- From: Eugene <eugene.mindrov@xxxxxxxxx>
- Date: Mon, 21 May 2012 16:54:26 +0400
Hi everyone,
I'm trying to use RSA public keys protected by a password, seems the latest PKI package allows to do this, but I'm encountering strange issues.
Simple unencrypted RSA keys work ok:
% package require pki
0.3
% set key [ ::pki::pkcs::parse_key [ ::fileutil::cat normal.key ] ]
l 1024 d 896...<skipped>...217 e 65537 type rsa n 140...<skipped>...431
normal.key is just a simple base64-encoded public key:
-----BEGIN RSA PRIVATE KEY-----
MII...<skipped>...Ioc=
-----END RSA PRIVATE KEY-----
Now I try to protect it with a password:
% openssl rsa -in normal.key -out encrypted.key -des3
writing RSA key
Enter PEM pass phrase: password
Verifying - Enter PEM pass phrase: password
This is how the encrypted key looks like:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,553FB844B17CCBBC
p3e...<skipped>...w==
-----END RSA PRIVATE KEY-----
And when I try to parse it I get the following:
% set key [ ::pki::pkcs::parse_key [ ::fileutil::cat encrypted.key ] ] password
can't read "parsed_key(data)": no such element in array
Am I missing something?
--
Best regards, Eugene.
.
- Follow-Ups:
- Re: Password protected RSA keys and PKI package
- From: Eugene
- Re: Password protected RSA keys and PKI package
- Prev by Date: Re: TCOM: Referencing cols with numbers instead of letters
- Next by Date: Re: Password protected RSA keys and PKI package
- Previous by thread: help required with tcom, tcomexcel ,twapi
- Next by thread: Re: Password protected RSA keys and PKI package
- Index(es):
Relevant Pages
|