I
I
igorloadgame2021-12-10 08:31:25
Information Security
igorloadgame, 2021-12-10 08:31:25

Which values ​​have the same hash?

What numbers have the same hash?
I’m solving the IS Olympiad and I don’t rummage for the hash, the code is given:

function firstGame(){
  if (isset($_GET['game1_green']) and isset($_GET['game1_red'])){
      if ($_GET['game1_green'] == $_GET['game1_red'])
        echo "Not so easy!";
      else if (sha1($_GET['game1_green']) === sha1($_GET['game1_red'])){
        echo "Good job! You've past the first game! <br>";
        return;
      }
  }
  die();
}

in line:
else if (sha1($_GET['game1_green']) === sha1($_GET['game1_red'])){

As I understand it, values ​​with the same hash are needed, but the values ​​should not be the same.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Ocelot, 2021-12-10
@Ocelot

You need to find the SHA1 collision. Or use a collision that someone already found: https://shattered.it/static/shattered.pdf

S
Saboteur, 2021-12-10
@saboteur_kiev

what numbers have the same hash?

Well, it's your job to find them. Have you tried to do anything, or do you just want it done for you?
Then freelance for you.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question