-3

Suppose I have an AES CBC 256 encrypted string with the key, how do I go about getting the original message?

forest
  • 64,616
  • 20
  • 206
  • 257
Trey
  • 113
  • 1
  • 9

1 Answers1

1

If it is raw AES256 in CBC mode, you can use the openssl utility to decrypt it.

openssl aes-256-cbc -d -in encrypted -out decrypted -K $hex_key -iv $hex_iv

Replace $hex_key with the hex representation of the 256 bit key. As CBC mode uses an initialization vector, or IV, you also have to specify the hex representation of the IV, which is 128 bits.

forest
  • 64,616
  • 20
  • 206
  • 257