I was trying to recover some encrypted backups and it turns out libressl and openssl can't decrypt each other's formats.
This works:
$ echo 'hello' | libressl aes-256-cbc -pass pass:foo | libressl aes-256-cbc -d -pass pass:foo
hello
This doesn't:
$ echo 'hello' | openssl aes-256-cbc -pass pass:foo | libressl aes-256-cbc -d -pass pass:foo
bad decrypt
139721145175576:error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt:evp/evp_enc.c:533:
Nor this:
$ echo 'hello' | libressl aes-256-cbc -pass pass:foo | openssl aes-256-cbc -d -pass pass:foo
bad decrypt
139941284783360:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:535:
Here are the versions I've tested with:
$ libressl version
LibreSSL 2.6.4
$ openssl version
OpenSSL 1.1.0f 25 May 2017
I was trying to recover some encrypted backups and it turns out libressl and openssl can't decrypt each other's formats.
This works:
This doesn't:
Nor this:
Here are the versions I've tested with: