Re: Fwd: [php-src] Constant-Time bin2hex() implementation (#909)

From: Date: Wed, 26 Nov 2014 17:46:08 +0000
Subject: Re: Fwd: [php-src] Constant-Time bin2hex() implementation (#909)
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-79196@lists.php.net to get a copy of this message
On 26 November 2014 at 08:49, Ferenc Kovacs <tyra3l@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

« previous php.internals (#79196) next »