Hacker News new | ask | show | jobs
by drexlspivey 1536 days ago
The one way function (or trapdoor function) in a cryptography context still needs to be reversible given the decryption key so a hash won’t do.
2 comments

As I mentioned in my reply to the sibling comment, a hash function is enough. For example, you could encrypt by feeding a key + block counter to a hash function and XORing the plaintext blocks with the output. The recipient with the same key can generate the same digests and XOR to decrypt.

That's not a proof, of course, it's just to give an intuition for how all symmetric cryptography can be constructed from a one-way function.

One way functions do not need to be reversible.