bloritsch
Not a member
bloritsch's latest activity
Friday, September 11 2009
3144
undefined method `^' for String - RoR 2.3.4
was updated
in Ruby on Rails
-
bloritsch commented at 1:41 PMdef secure_compare(a, b) result = a.length ^ b.length for i in 0..99 # or some other constant result |= a[i].to_i ^ b[i].to_i end resul... -
bloritsch commented at 1:40 PMdef secure_compare(a, b) result = a.length ^ b.length for i in 0..([a.length, b.length].max - 1) result |= a[i].to_i ^ b[i].to_i end re... -
bloritsch commented at 1:39 PMI just thought of something last night. Using the length of the requester provided HMAC to control the loop opens the door for a possible Denial of Service atta...
Thursday, September 10 2009
3144
undefined method `^' for String - RoR 2.3.4
was updated
in Ruby on Rails
-
bloritsch commented at 4:32 PMOK, after reading up on the timing attack, and found out that Ruby 1.9 likes to automatically convert bytes to characters, I found an approach that will always ...