English subtitles

← 02ps-09 Hash Collision

dummy description

Get Embed Code
1 Language

Showing Revision 1 created 10/24/2012 by Amara Bot.

  1. For this question, your goal is to find a hash collision.
  2. We've defined a bad hash function,
  3. which is using counter mode to encrypt
  4. and then XORing all the blocks of cipher text that come out
  5. and using that as the hash output.
  6. And we've provided the code for our hash function.
  7. Your goal is to find 2 strings where the hash outputs are the same
  8. but the actual strings are different.
  9. For this problem, we've provided an implementation of counter mode
  10. to be used as a hash function.
  11. The counter mode will take in a plaintext input
  12. and calculate the cipher blocks as expected,
  13. which are then XORed together to return the hash.
  14. Your job will be to implement find_collision
  15. to find a collision given an input message.
  16. We've provided 4 test cases for you to use
  17. to see if your code works
  18. along with some utility functions that you might find useful.