Req #67304 [Com]: openssl_decrypt fails with GCM mode

From: Date: Sat, 06 Feb 2016 01:21:30 +0000
Subject: Req #67304 [Com]: openssl_decrypt fails with GCM mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199076@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=67304&edit=1 ID: 67304 Comment by: mcastelluccio at mozilla dot com Reported by: birki456 at hotmail dot com Summary: openssl_decrypt fails with GCM mode Status: Assigned Type: Feature/Change Request Package: OpenSSL related Operating System: all PHP Version: 5.5.12 Assigned To: bukka Block user comment: N Private report: N New Comment: This is needed to implement the Web Push protocol in PHP: https://tools.ietf.org/html/draft-ietf-webpush-encryption-01 Previous Comments: ------------------------------------------------------------------------ [2015-12-04 20:48:32] lagrange dot louis at gmail dot com If PHP was throwing an error when trying to use openssl_encrypt/decrypt with the cipher set to 'aes-xxx-gcm', I would agree with you that this is a feature request. But here this is more of a bug since it just fail silently with openssl_decrypt and return the CTR with openssl_encrypt... If I can help to backport it to, say, 5.6, please let me know. I'm already aware of your extension, but installing extensions is sadly not possible in every installations (hosted servers for example). ------------------------------------------------------------------------ [2015-12-04 19:15:05] bukka@php.net This patch is just for master which means possibly next minor (7.1). Of course, if there are any objections against it, then I will have to write RFC and it will have to pass to get in... In any case I don't plan any back-port as the patch is relatively big for minor release considering that this is not a bug but more a feature request. If you need to use GCM in 5, you should take a look on my ext called crypto which already has full support for GCM and CCM: https://github.com/bukka/php-crypto ------------------------------------------------------------------------ [2015-12-04 18:57:23] lagrange dot louis at gmail dot com Good news, thanks @bukka! Do you know in which branches this will be merged? (hopefully a 5.x branch) ------------------------------------------------------------------------ [2015-12-03 23:25:07] bukka@php.net I have been slowly working on it and should be hopefuly ready for 7.1: The progress can be seen here: https://github.com/php/php-src/compare/master...bukka:openssl_aead ------------------------------------------------------------------------ [2015-11-16 13:38:29] albertcasademont at gmail dot com This would be indeed very useful. Right now we have to do it in 2 steps with an hmac ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=67304 -- Edit this bug report at https://bugs.php.net/bug.php?id=67304&edit=1

« previous php.bugs (#199076) next »