I want to perform a collision attack using hash function of my student number and another possible student number with same hash value. How can I perform this? is there any online tools that can help me to find same hash value

For example

My student number is s3412347; Sha-1: 6b9e8b6fd49df67a7a770c28072e8b807cd2070e Possible student: sXXXXXXXX; Sha-1: 6b9e8b6fd49df67a7a770c28072e8b807cd2070e

  • $\begingroup$ Study, it will take too long to impersonate another student successfully $\endgroup$ – kodlu Apr 24 at 3:38

I want to perform a collision attack

Actually, the problem you cited is not a collision attack, but a second preimage attack.

In a collision attack, the attacker gets to select both messages; as long as they are distinct and hash to the same value, the attacker wins.

In a second preimage attack, the attacker is given one message, and is asked to find another message that hashes to the same value; if he can, he wins.

You have already specified one of the messages "s3412347"; the only flexibility the attacker is allowed is in the second message. Hence, this falls under "second preimage attack".

Here's why the distinction is important: for SHA-1, there are knowns ways to do collision attacks (which require rather more computational effort than what a student is likely able to get his hands on, and certainly not something you can find online for free); however there are no known feasible ways to do second preimage attacks.

| improve this answer | |
  • 1
    $\begingroup$ And we'd need student numbers to be valid up to about 48 decimal digits to make it reasonably probable that a second preimage of the form sXX…XX exists, under reasonable assumptions about SHA-1. $\endgroup$ – fgrieu Apr 23 at 12:52
  • $\begingroup$ I tried XORing still no help. I know this question takes lots of trial and error $\endgroup$ – Denver1212 Apr 23 at 12:58
  • $\begingroup$ If the length is limited to 8 digits, a student probably has enough computational power and storage to brute force it. $\endgroup$ – Aman Grewal Apr 23 at 13:00
  • 2
    $\begingroup$ @AmanGrewal ... and notice that there are no such collisions... $\endgroup$ – SEJPM Apr 23 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.