Re: [VOTE] Timing attack safe string comparison function

From: Date: Thu, 06 Feb 2014 04:31:17 +0000
Subject: Re: [VOTE] Timing attack safe string comparison function
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-72316@lists.php.net to get a copy of this message
Sorry for multiple posts. On Thu, Feb 6, 2014 at 1:20 PM, Yasuo Ohgaki <yohgaki@ohgaki.net> wrote: > Since comparison of short and/or not hashed data (e.g. user supplied raw > password) should > not be done as the function name imply, we may better to document so that > users always > compare hashed values even when they store raw password/etc. > So randomized delay may be overkill. > Because user should not pass other than hashed values, we may return FALSE simply when length mismatches. Generated hashed length should not be a secret. This get rid of length leak issue and the function name is good for this purpose and make the operation always constant. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.netSo

« previous php.internals (#72316) next »