-   Linux - Security (
-   -   can't decrypt using openssl (

methodtwo 04-27-2010 09:59 AM

can't decrypt using openssl
Hi i need to decrypt things with my privatekey using openssl:
As an example this is the command i'm using to try and decrypt things that were encrypted with my public key:


#openssl rsautl -decrypt -in encrypted.txt -out result.txt -inkey privatekey.pem
and this is the result that i get:


RSA operation error
17812:error:0406506C:rsa routines:RSA_EAY_PRIVATE_DECRYPT:data greater than mod len:/on10/build-nd/G10U4B0/usr/src/common/openssl/crypto/rsa/rsa_eay.c:393:

The private key is in my PATH.The results are the same on solaris and linux.What am i doing wrong?.How should i decrypt files with my privatekey(which is pem format and is the right value)
Thankyou for your time
regards mathodtwo

anomie 04-27-2010 03:34 PM

Well, perhaps the encrypted file or the key (or both) are corrupted.

Try encrypting and then decrypting a new, arbitrary file. Does that work?

Noway2 04-28-2010 04:37 PM

Please see my response to your thread on this forum:

All times are GMT -5. The time now is 07:35 PM.