#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    6
    Rep Power
    0

    Hashing question


    Bob believes that he has come up with a nifty hash function. He assigns a numeric value VChar to each letter in the alphabet equal to the letter’s position in the alphabet, i.e., VA = 1, VB = 2, …, VZ = 26. For a message, he calculates the hash value H = (VChar 1 x VChar 2 x VChar 3 …x VChar N) mod(26). Bob uses this function to send a one-word message, PLANE, to his banker Bill, along with his calculated hash value for the message. Alice is able to intercept the message, and generates an alternative message that has a hash value that collides with Bob’s original hash value. Show a message that Alice may have spoofed, and demonstrate that its hash value collides with Bob’s original hash.

    Can anyone help?
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    There are two mathematical properties of multiplication that make finding a collision trivial, pick one:
    http://en.wikipedia.org/wiki/Commutative
    http://en.wikipedia.org/wiki/Identity_element
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    6
    Rep Power
    0

    Explain more please AS I'M BEGINNER


    Explain more please AS I'M BEGINNER
  6. #4
  7. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,301
    Rep Power
    7170
    OK, let me ask two questions as a starting point:

    (1) What is the hash value of Bob's message?

    (2) Do you understand what a hash collision is?
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2012
    Posts
    6
    Rep Power
    0
    That's my answer but I can't know exactlt wat's the message
    For the word "PLANE", its hash value is H = (16 * 12 * 1 * 14 * 5) mod 26 = 24.
    Alice need to find an alternative message with the same hash value.
    So I can try words in dictionary and can always find some words with hash value 24.
    For example:
    "lab": 12*1*2 mod 26 = 24
    "bee": 2*5*5 mod 26 = 50 mod 26 = 24
    "sad": 19*1*4 mod 26 = 76 mod 26 = 24
    "up": 21*16 mod 26 = 24
    "letter" 12*5*20*20*5*18 mod 26 = 24
    "calculate" 3*1*12*3*21*12*1*20*5 mod 26 = 24

IMN logo majestic logo threadwatch logo seochat tools logo