|
|
|
|
|
by jlokier
2081 days ago
|
|
> Or maybe it's impossible to implement that hash function reversibly without preserving a copy of the input in the output. Cryptographic hash functions rely on locally non-reversible non-linear operations.[1] So you don't need to copy the original input, but you will need to copy bits here and there throughout the hash function, which allow the input to be reconstructed. But that's not surprising, even a humble AND gate is non-reversible. So even a humble AND gate program will need to copy its inputs to the output if it's to be reversible. [1] (As well, cryptographic hash functions are generally not reversible anyway. As in, different inputs hash to the same output value, so there's no unambiguous reversal.) |
|
It's been 20 years since I had to think closely about reversible computing, and I've forgotten lots of the details. When I said "implement a hash function", I actually meant "implement exclusive-or with the result of the hash function" or something similar.
> As well, cryptographic hash functions are generally not [invertible] anyway.
Good point. But aren't there one-to-one equivalents, called one-way functions, trapdoor functions or something like that? My cryptography is even rustier.