sebastianfeldmann / phpbu

PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process
https://phpbu.de
Other
1.29k stars 110 forks source link

SSL decryption issue #359

Closed sebastianfeldmann closed 7 months ago

sebastianfeldmann commented 8 months ago

I know almost nothing about SSL stuff like this; but is this the reason why I get this error when trying to decrypt an encrypted backup using the decrypt example in the docs?

OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)

encoding:

      "crypt": {
        "type": "openssl",
        "options": {
          "password": "kkwMZ",
          "algorithm": "aes-256-cbc"
        }
      }

decrypt:

openssl enc -d -a -aes-256-cbc -in mi-2024-01-11-1455.sql.bz2.enc -out backup.tar.bz2 -pass pass:kkwMZ
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
68140000:error:1C800064:Provider routines:ossl_cipher_unpadblock:bad decrypt:providers\implementations\ciphers\ciphercommon_block.c:112:

_Originally posted by @YouveGotMeowxy

sebastianfeldmann commented 8 months ago

@YouveGotMoewxy

Not critical but will be fixed with the next release if you set the keyDerivation option to true.

YouveGotMeowxy commented 8 months ago

I downloaded an old version of OpenSSL (v1-something) and the code example from the website works.