Categories:
Android (13)
Apple Mac (27)
DH Keys (39)
DSA Keys (71)
EC Keys (2157)
Firefox (30)
General (10)
Google Chrome (25)
Intermediate CA (152)
Java VM (29)
JDK Keytool (28)
Microsoft CertUtil (29)
Microsoft Edge (9)
Mozilla CertUtil (21)
OpenSSL (236)
Other (7)
Portecle (38)
Publishers (6123)
Revoked Certificates (16)
Root CA (85)
RSA Keys (5000)
Tools (46)
Tutorial (1)
What Is (22)
Windows (127)
Collections:
Other Resources:
OpenSSL "rsautl" - Decrypt Large File with RSA Key
How to decrypt a large file with an RSA private key using OpenSSL "rsautl" command? I received a large encrypted file from my friend who used the RSA-AES hybrid encryption process with my public key.
✍: FYIcenter.com
If your friend encrypted a large file with the RSA-AES
hybrid encryption process with your public key,
you should receive the large encrypted file and an encrypted AES password from him/her.
Decrypting the large encrypted file can be done use the process described blow:
1. Decrypt the encrypted AES password file to get the AES password with your RSA private key. This can be done using the OpenSSL "rsa -decrypt" command.
2. Decrypt the large encrypted with the AES password. This can be done using the OpenSSL "enc -d -aes*" command.
For example, if you are the owner of the RSA public key and received two encrypted files from your friend described in the last tutorial, you can decrypt them as shown below:
C:\Users\fyicenter>dir *cipher.txt 128 aes_pass_cipher.txt 160 cipher.txt C:\Users\fyicenter>\local\openssl\openssl.exe OpenSSL> rsautl -decrypt -inkey my_rsa.key -in aes256_pass_cipher.txt -out aes256_pass_decipher.txt OpenSSL> enc -d -aes256 -pass file:./aes256_pass_decipher.txt -in cipher.txt -out decipher.txt C:\Users\fyicenter>type decipher.txt The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
Commands used in this test:
⇒ OpenSSL "rsautl" Using PKCS#1 v1.5 Padding
⇐ OpenSSL "rsautl" - Encrypt Large File with RSA Key
2017-05-20, 4675👍, 0💬
Popular Posts:
Certificate summary - Owner: Google Internet Authority, Google Inc, US Issuer: Equifax Secure Certif...
How can I use Microsoft "certutil -viewstore" command? What are command options supported by "certut...
Certificate summary - Owner: *.vimeo.com, "Vimeo, LLC", L=New York, ST=New York, US Issuer: DigiCert...
What can I use OpenSSL "genpkey" command for? What are options supported by the "genpkey" command? O...
Certificate summary - Owner: Network Solutions Certificate Authority, Network Solutions L.L.C., US I...