algorithms • Don’t invent your own protocols • Don’t implement algorithms or protocols • Use the highest-level abstraction possible Monday, March 4, 13
!= other.bytesize pairs = self.bytes.zip(other.bytes) xors = pairs.map {|left, right| left ^ right } sum = xors.inject {|sum, i | sum + i } sum == 0 end end (in constant time) Monday, March 4, 13
corruption propagates 1998 CTR random access, parallelizable security lost if IV reused 2001 GCM authenticated security lost if IV reused, not widely available 2007 Monday, March 4, 13
DB 3F Step 2: Break the plaintext into blocks plaintext = AF 3C 26 0C C1 Step 3: Pad the plaintext plaintext = AF 3C 26 0C C1 03 03 03 Monday, March 4, 13
2D A3 84 E3 AD BC 4F D3 Step 2: Set the preceding block to all zeroes 2D A3 84 E3 00 00 00 00 Step 3: Submit this “guess” to the Padding Oracle Monday, March 4, 13