nextcloud / backup

Backup now. Restore later.
GNU Affero General Public License v3.0
247 stars 37 forks source link

Error: openssl_encrypt() #450

Open mxlutz opened 1 year ago

mxlutz commented 1 year ago

Hi there,

while encrypting the Backup I get a lot of these messages in the log (like every 10s):

[PHP] Fehler: Error: openssl_encrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 at /var/www/nextcloud/apps/backup/lib/Service/EncryptService.php#210

It seems like the Backup still works, I was just wondering what this is about and also found this https://help.nextcloud.com/t/php-openssl-issue-with-backup-kicking-off/138618 but it seems like there aren't any news.

I'm using Nextcloud with Nextcloudpi on a Raspberry Pi 4 (so aes-256-cbc encryption is utilized), Nextcloud 24.0.5 and Backup 1.1.3.

Is this something that can be fixed or should I just ignore it?

kds69 commented 1 year ago

same here with NC 25.0.4, backup 1.2.0 testing on my side with open_ssl "OPENSSL_ZERO_PADDING" option, while encrypting and decrypting... but I am absolutely zero expertise in encryption and my data are not critical and this is a nice to have. So I am just playing around...

kds69 commented 1 year ago

trying differently as the error seems in fact really about the iv, the encryption service is coded to create a 12 bytes key if I read it correctly. Trying to correct this and will let you know.