OpenSSL encrypt and decrypt a file

From Luniwiki
Jump to: navigation, search

Encrypt

openssl enc -aes-256-cbc -salt -in <FILE> -out <FILE>.enc

to avoid deprecated key derivation.

openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -in <FILE> -out <FILE>.enc

Decrypt

openssl enc -aes-256-cbc -d -in <FILE>.enc -out <FILE>


References

Daniel Simao 12:41, 22 February 2020 (EST)