On 26 November 2014 at 08:49, Ferenc Kovacs <tyr...@gmail.com> wrote:
>> That's a rather extreme reaction to trying to patch string operations that
>> real-world frameworks use to handle crypto secrets, don't you think?
>>
> and there are at least that much, but probably lot more usages in the
> wild(see https://github.com/search?l=php&q=bin2hex&type=Code&utf8=%E2%9C%93
> for example) where there is nothing to do with security so there is no gain
> for being constant time, but those users would get the performance
> degradation.

Agreed. I've never really thought of those functions as being
cryptographically significant.

> I think it would be better to introduce constant time alternatives for
> functions like this instead of trying to replace them and require everybody
> to pay the performance price.

+1 on this too: if we added a new function for constant time string
comparison (which is, IMO, the far more common crypto case requiring
this sort of work) rather than modifying strcmp(), I don't see why any
of these should be different.

I do wonder if these need to be in core, or if a PECL extension would
be more appropriate.

Adam

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to