Final answer:
The function f(x) = x mod 10000 is not a good one-way hash function because it lacks several important properties such as resistance to collision and preimage attacks, and uniform distribution of hash values.
Step-by-step explanation:
The function f(x) = x mod 10000 is not a good one-way hash function because it lacks several important properties that a good hash function should have.
- Resistance to collision: The function may produce the same hash value for different inputs, leading to collisions. For example, f(10000) and f(20000) would both result in the hash value 0.
- Resistance to preimage attacks: Given a hash value, it is relatively easy to find an input that produces that hash value. For example, if the hash value is 5000, we can find an input such as 15000 or 25000 that gives us the same hash value.
- Distribution: The function does not distribute the hash values uniformly. The number of possible hash values is limited to 10000, and as the inputs increase, the hash values repeat in a cycle.
Overall, the function fails to provide the security and reliability required for a good hash function.