Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

They could if it were a reversible key-based hash.

http://en.wikipedia.org/wiki/Cryptographic_hash_function



I believe you're thinking of a 'cipher'.

Cryptographic hashes (even keyed ones) are expected to be one-way functions.


Could be my bad here, but I said "reversible key-based", which isn't what most cryptographic one-way hashes are.

For ASCII text, modulo 13 is a reversible operation (a/k/a rot13). It's not key-based, may not be a hash, and I'm not aware of any specifically key-based hashes, but that's along the lines of what I was thinking.

Fully admitting winging this one though.


Well your Wikipedia link was about cryptographic hash functions so I figured that's what you intended to refer to.

So when you wrote "key-based hashes", I interpreted that as meaning a cryptographic hash-like function with key input, e.g. HMAC the "Keyed-Hash Message Authentication Code".

Modulo 13 is different than rot13. Modulo 13 is actually a hash function, whereas rot13 is a permutation.

If rot13 took a key (e.g. if it were rotN instead) it would make a primitive cipher. But it doesn't, so it behaves like a cipher that is always used with a fixed key or a cipher the key is already decided in the context of discussion.

The process of applying a specific key to a cipher is called "keying". So just to make things even more confusing, we could perhaps refer to rotN<N = 13> (AKA "rot13") then as a "keyed cipher".

:-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: