Follow

Does anyone know a 'proof of concept' function? Something really simple, that demonstrates the principal, but can be done by hand and understandably followed.

· · Web · 5 · 3 · 1

@douginamug mod n is pretty cool imo. E.g. sum up the bytes that have to be hashed and take the mod n of the result. It's really simple but it does the job

@douginamug A cryptographic hash function is a pseudorandom function

So.. off the top of my head...

any pseudorandom number generator should work, with the input acting as the seed.

So maybe a linear congruence generator would be a simple example.

en.wikipedia.org/wiki/Linear_c

you might need to think a bit harder about this!

Maybe something like, your random number generator, acting as a block cipher and doing a Merkle Damgard constructed hash function

en.wikipedia.org/wiki/Merkle%E

@douginamug I guess it depends on what properties you would like to "show" form a cryptographic hash too!

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!