OpenSSL Symmetric Key Encryption Methods (AES, ARIA, Blowfish, Camellia, ChaCha20, Cast, DES, ...)In this case we will create cipher text from OpenSSL using a key derived from a password, and a salt value (defined in hex). Details of ARIA are [here][Decrypt]. |
Plaintext: Hello, Ciphertext: U2FsdGVkX18kH6hnY7hTQfCHt5uPKTY2riacbC3zhvw= Mode: aes-128-cbc Password: qwerty
Plaintext: Hello, Ciphertext: U2FsdGVkX18kH6hnY7hTQZ+x9aQ/9b8/DHe9E5n6lxA= Mode: aes-256-cbc Password: qwerty
Outline
For example for "Hello" with 256-bit AES CBC with a passphrase of "qwerty" and a salt value of "241fa86763b85341":
% echo -n "hello" | openssl enc -aes-128-cbc -pass pass:"qwerty" -e -base64 -S 241fa86763b85341 U2FsdGVkX18kH6hnY7hTQfCHt5uPKTY2riacbC3zhvw=
The value of "U2FsdGVkX18" is the word: "Salted__", and defines that the next part of the salt value. We can now decrypt the ciphertext with:
echo "U2FsdGVkX18kH6hnY7hTQfCHt5uPKTY2riacbC3zhvw=" | openssl enc -aes-128-cbc -base64 -d -pass pass:"qwerty" hello