backup icon indicating copy to clipboard operation
backup copied to clipboard

Error: openssl_encrypt()

Open mxlutz opened this issue 3 years ago • 2 comments

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?

mxlutz avatar Nov 15 '22 20:11 mxlutz

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 avatar Feb 27 '23 07:02 kds69

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.

kds69 avatar Mar 02 '23 19:03 kds69