string1 = "string"
string2 = "strung"


a = []
if string1.length == string2.length then
string1.length.times do |i|
a += [string1[i] == string2[i]]
end
puts a.inject(:==)
end


I need a way to verify MAC that has timing characteristics that scale
exactly, proportional to the size of the MAC is okay constant rate is
not required. So for a input of two different sizes it can vary but for
the same size it needs to be constant rate. I probably explained that
poorly but hopefully people understand what I am trying to achieve.

One attack against a poorly implemented MAC system worked because python
returned false as soon as the compared strings had a mismatch, and an
attacker could use this information to determine how many correct bytes
they had guessed.

-- 
Posted via http://www.ruby-forum.com/.