Bug #78628 [NEW]: AES-256-XTS cipher method does not work

From: Date: Thu, 03 Oct 2019 11:10:13 +0000
Subject: Bug #78628 [NEW]: AES-256-XTS cipher method does not work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223019@lists.php.net to get a copy of this message
From:             alec
Operating system: Linux
PHP version:      7.3.10
Package:          OpenSSL related
Bug Type:         Bug
Bug description:AES-256-XTS cipher method does not work

Description:
------------
Tested with various PHP versions (7.3.9 and 7.4.0beta4 and some older
7.x) on Ubuntu 18.04. This originates from on of our users using PHP 7.3
on Debian Stable.

$php -r "print_r(openssl_get_cipher_methods());" | grep -i xts
    [12] => aes-128-xts
    [35] => aes-256-xts

However, if you see the test script openssl_enrypt() does not work,
returns false. No error/warning. The same for AES-128-XTS.

I'm not sure what is expected from OpenSSL in the system, but `openssl
ciphers -v | grep XTS` returns nothing.

Maybe that's not a bug, but I'd like to hear some explanation for this
behavior.

Test script:
---------------
$iv = random_bytes(openssl_cipher_iv_length("aes-256-XTS"));
echo openssl_encrypt("test", "aes-256-XTS", "key", OPENSSL_RAW_DATA,
$iv) === false;

Expected result:
----------------
0

Actual result:
--------------
1

-- 
Edit bug report at https://bugs.php.net/bug.php?id=78628&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=78628&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=78628&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=78628&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=78628&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=78628&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=78628&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=78628&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=78628&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=78628&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=78628&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78628&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=78628&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=78628&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=78628&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=78628&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=78628&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=78628&r=mysqlcfg


Thread (4 messages)

« previous php.bugs (#223019) next »