ChristopherSchultz commented on PR #1028:
URL: https://github.com/apache/tomcat/pull/1028#issuecomment-4982514405

   I actually had this backward in my mind, thinking that user-input-first was 
better because it would mean that runtime is based upon the user's input, which 
they already know and wouldn't learn anything about the secret. But I think 
that constant-time across calls is actually better, where regardless of the 
user-input, the comparison always takes the same amount of time.
   
   It also means that the attacker can't send unreasonably-large values and 
cause `equals()` to run longer than necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to