34.6k views
4 votes
Suppose Bob wants to securely store his random password (consisting of 4 numbers from 0 to 9) by hashing it in the following way. He uses a simple hash algorithm y= (7∗x+5)mod10, to hash each number x in his password into another number. The final hash is the concatenation of all the hashed numbers, which is equal to 9562. Let's find out Bob's password suppose that we obtain the hash, and know the hash algorithm. Write down each number in sequence, in the following boxes.

1 Answer

2 votes

Final answer:

Bob's password can be found by reversing the hash algorithm using the inverse function. The password is 2483.

Step-by-step explanation:

Bob's password consists of 4 numbers from 0 to 9, which are hashed using the algorithm y = (7*x + 5) mod 10. The final hash is the concatenation of all the hashed numbers, which is 9562. To find out Bob's password, we need to reverse the hashing process.

To reverse the hashing process, we can use the inverse function of the hash algorithm. In this case, the inverse function is x = (3*(y+5)) mod 10.

By applying the inverse function to each digit of the hash, we can find the original password. For example, for the first digit of the hash (9), we have x = (3*(9+5)) mod 10, which equals 2. Similarly, for the second digit (5), x = (3*(5+5)) mod 10 equals 4. Continuing this process for all digits of the hash, we can find the password as 2483.

User Hero
by
7.0k points