Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

bloritsch's latest activity

Friday, September 11 2009
3144 undefined method `^' for String - RoR 2.3.4 was updated in Ruby on Rails
  • bloritsch
    bloritsch commented at 1:41 PM
      def 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
    bloritsch commented at 1:40 PM
      def 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
    bloritsch commented at 1:39 PM

    I 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
    bloritsch commented at 4:32 PM

    OK, 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 ...