1

I have these files that I encrypted with the following command in Oct 2016 :

tar cz folder_to_encrypt | openssl enc -aes-256-cbc -e > out.tar.gz.enc

I am often late with updates so at the time I was could have been running anything from Mavericks to Sierra.

By my records, I was able to decrypt these files in June 2018--I think I was running High Sierra at the time but not sure. Now I am not able to decrypt these files using the command I always used:

openssl enc -aes-256-cbc -d -in out.tar.gz.enc | tar xz

I get the following error:

bad decrypt
4435975788:error:06FFF064:digital envelope routines:CRYPTO_internal:bad decrypt:/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-47.140.1/libressl-2.8/crypto/evp/evp_enc.c:521:

Someone said it might be due to versions and to run the same version that I used before. So I was hoping someone could tell how to install old versions of LibreSSL or OpenSSL for Mac (I don't know what was used during the time period in question), and better yet tell me which version I can try to match the time period from before.

5
  • It seems that the default digest has changed between versions from md5 to sha256. Try to specify the default digest on the openssl command as -md sha256 or -md md5.
    – harrymc
    Commented Oct 27, 2020 at 8:45
  • like this? openssl enc -aes-256-cbc -d -md sha256 -in out.tar.gz.enc | tar xz
    – Cb32019
    Commented Oct 27, 2020 at 8:46
  • Whatever works on your version.
    – harrymc
    Commented Oct 27, 2020 at 8:48
  • forgive me im very unfamiliar with openssl. I was asking more about the placement of the -md option. If I put it after -d, is that correct? Also, what would be the default in 2016?
    – Cb32019
    Commented Oct 27, 2020 at 8:51
  • I'm working from the documentation like you, but I don't think the order of the parameters is important, as long as it's not the first or last.
    – harrymc
    Commented Oct 27, 2020 at 9:21

1 Answer 1

-1

This works.

Using -md sha256 or -md md5 digest for openssl on Big Sur (MacOS Version 11.0.1), I'm able to decrypt a file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .