Until recently I was able to encrypt/decrypt files using the following commands:
Encrypt:
openssl enc -aes-256-cbc -pbkdf2 -in un_encrypted.yml -out encrypted.data
Decrypt:
openssl enc -d -aes-256-cbc -pbkdf2 -in encrypted.data -out un_encrypted.yml
I recently updated my Homebrew packages and it seems the -pbkdf2
option is no longer supported? I cannot get it to work and I keep getting a help prompt on how to use the openssl command (I’ve been using the above commands for several years now). Simply removing the -pbkdf2
option results in a corrupt output file.
Does anyone know how I can decrypt files again?
Thanks in advance
Installation. openssl is installed by default on Arch Linux (as a dependency of coreutils). There are various OpenSSL library bindings available for developers: python-pyopenssl.
More than likely you are using the default openssl, which is LibreSSL, that comes with MacOS. LibreSSL does not support pbkdf2 as far as I could tell, so you should upgrade to full blown openssl.
To find out if you are using LibreSSL run: openssl version
To upgrade to openssl:
brew update
brew install openssl
# if it is already installed, update it:
brew upgrade [email protected]
The last step is to ensure that it is in your path before the default:
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With