This is the cops thread of this cops and robbers challenge. The robbers thread is here.
A hash collision is when two different strings produce the same hash.
In this challenge, the cops will make a hash function, with a collision they know of. Then, the robbers will try to crack it by finding a hash collision in the cop's hash algorithm. To crack an answer, the hash collision the robber finds does not have to be the intended solution.
If a cop submission is not cracked for 7 days, it is safe, so mark it as such and reveal the intended crack and the score.
If a cop submission is cracked, mark it as such and edit in a link to the crack.
- Cryptographic functions are allowed only if you know a collision in them. If it is a famous and secure hash algorithm like SHA-256, you must post the hashes of each string in a different, specified hash algorithm (ideally also in a secure hash algorithm), like Keccak-512.
A cop answer has to contain the language and the source code.
The score of a safe cop answer is the sum of the number of bytes of the two strings with the hash collision, with the lower score being better.
With robbers and cops being ranked separately, the winner is the person with the best scoring answer.
from hashlib import* def singlecharhash(x): a = blake2b(digest_size=1) a.update(x) return a.hexdigest()
4 Points, Cracks cop's answer
É, both 2 bytes.
I am thinking of changing the scoring system to make it the minimum of the two strings. Any thoughts?