Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-02 Thread Leigh
I should have stated my intent more clearly in the original mail. I would be targeting 5.5 and above for a core change, and would provide a an extension to back-fill 5.3 and 5.4. I think people should be able to use authenticated modes of operation _now_, not when PHP 7 is released and / or when

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-02 Thread Leigh
On 2 February 2015 at 14:30, Daniel Lowrey rdlow...@php.net wrote: The extra params aren't really _that_ bad. Okay, I'd like to reset the conversation a bit here. It's clear that the current API does not fit the problem domain very well. Tacking on more parameters only creates a bigger mess.

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-02 Thread Daniel Lowrey
The extra params aren't really _that_ bad. Okay, I'd like to reset the conversation a bit here. It's clear that the current API does not fit the problem domain very well. Tacking on more parameters only creates a bigger mess. Six parameters to a stateless function call is a completely incoherent

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-02 Thread Jakub Zelenka
On Mon, Feb 2, 2015 at 2:30 PM, Daniel Lowrey rdlow...@php.net wrote: The extra params aren't really _that_ bad. Okay, I'd like to reset the conversation a bit here. It's clear that the current API does not fit the problem domain very well. Tacking on more parameters only creates a bigger

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Daniel Lowrey
On Sun, Feb 1, 2015 at 1:07 PM, Jakub Zelenka bu...@php.net wrote: Hey, On Sun, Feb 1, 2015 at 5:49 PM, Daniel Lowrey rdlow...@php.net wrote: - openssl_decrypt() now returns mixed ... if $options['get_tag'] == true then return [$decryptedString, $tag], otherwise return $decrypted string

[PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Daniel Lowrey
Hi list, A couple of bug reports have highlighted the fact that our openssl_encrypt and openssl_decrupt functions have no way of getting or setting tags required for authenticated cipher modes (i.e. GCM, CCM, OCB (not sure if this is available in OpenSSL)).

Re: [PHP-DEV] Re: OpenSSL ext. improvements for authenticated cipher modes.

2015-02-01 Thread Jakub Zelenka
Hey, On Sun, Feb 1, 2015 at 5:49 PM, Daniel Lowrey rdlow...@php.net wrote: - openssl_decrypt() now returns mixed ... if $options['get_tag'] == true then return [$decryptedString, $tag], otherwise return $decrypted string as before to preserve BC. - the encrypt function could use