Hi,

I have a rather complicated situation in the sense that I need to realize licensing checks of software. This is done through a config file that is signed through a USB smartcard (crypto-token). Next to that, I have a symmetric blowfish key that I need for that. This key has been encrypted (yes, an encrypted encryptionkey :-)) by an RSA-private key. However, when I try to use openssl to decrypt using the corresponding RSA-public key, I get:

A private key is needed for this operation

The command used is:

openssl rsautl -decrypt -pubin -inkey myrsakey.pub -in blowfish.enc

The blowfish.enc file was generated through:

dd if=/dev/random of=blowfishkey bs=16 count=1
openssl rsautl -encrypt -in blowfishkey -out blowfishkey.enc \
-inkey myrsakey.key

I use:
OpenSSL 0.9.7g 11 Apr 2005

I know RSA encryption and decryption can only be used for very small pieces of data. I need to encrypt more data, so I use a symmetric key to encrypt and decrypt data and I make sure the key used to encrypt stuff was encrypted by myself.

So in short: why can't I decrypt data with an RSA public key that has been encrypted with the corresponding RSA private key?

BTW: I have to do this in Python (sorry, wasn't my choice :-( ), so I can't use the RSA_public_decrypt() subroutine which, judging from internet comments, *can* actually decrypt data with an RSA public key...

Any comments are welcome. Thanks in advance.

Kind regards,

Simon de Hartog
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to