This is a repository for decryption using OpenSSL
- Generate the private key using RSA
openssl genrsa -aes256 -out private2.pem 2048
- Generate the public key using RSA
openssl rsa -in private2.pem -pubout > public2.pem
- Decrypt the session key using the private key
openssl rsautl -decrypt -inkey private2.pem -in session.enc -out session.txt cat session.txt
- Decrypt the message using 256-bit AES in CBC mode
openssl enc -d -aes-256-cbc -salt -in message.enc -out message.txt
- Decrypt the session key using 256-bit AES in CBC mode with session key
openssl enc -d -aes-256-cbc -salt -in signature.enc -out signature.txt
- Compare the expected signiture with the original signiture
openssl dgst -sha256 -verify public.pem -signature signature.txt message.txt