# Do hand-based hash functions / MACs exist?

Is there research on a hash function or a MAC that can be executed without computers?

I know there's a lot of history on hand-based ciphers and the OTP can easily be excecuted by hand. (By using numbers / letters) But modern cryptography requires authentication as well as encryption.

Now I'm asking myself, is there a (simple) well-studied hash function or a similar MAC that can be executed by hand and operates on letters rather than bits?

Reformulation: Is there a "classical" analogon for hash functions to the classical ciphers.

Note: Resistance against computer-based attacks isn't a neccessary requirement (just like classical ciphers do not resist such attacks).

• You can use a simple 4-letter format preserving block cipher (base 64?) in CBC-MAC mode, if the output domain needs to be all caps/numbers, you can reformat the 24-bit output to 6 4-bit values or 5 5-bit values. – Richie Frame May 20 '15 at 4:37
• @RichieFrame, so you're saying: "just run some nice classical cipher in CBC-MAC mode and you'll be (somewhat) fine"? – SEJPM May 20 '15 at 20:31
• as long as the "block size" (domain*char count) is large enough. 4 character Base64 gives you 16 million different outputs. Using table lookups can make it human calculable within a reasonable timeframe – Richie Frame May 21 '15 at 1:36
• – e-sushi Sep 4 '16 at 17:26

It depends on the time you want to spend. But most likely, there is nothing with reasonable efficiency. For arithmetic operations, humans are really bad compared to computers, and the difference is at least a factor of $10.000.000$ (very very rough guess, probably even 1+ additional zeros there).

So, since you have to assume that the attacker has access to a computer and will use it, you will have to use a modern scheme and consider classical ones broken.

Anyway, for security in a modern sense, you need a modern scheme, and those require modern tools like computers to achieve any reasonable performance. Of course you can calculate SHA256 by hand... but it will probably take you hours to go through all rounds for a single hash value.

Considering your remark about letters instead of bits: Mostly that is just interpretation, but there is also format-preserving encryption (there are quite a few questions on that on cryptoSE), which operates on arbitrary sets of symbols. If you want to transfer this into a hash fucntion, see this question.

Hash functions in the classic crypto-era?

At the time when classic ciphers were created, cryptography was (as far as I can tell) almost only looking at encryption methods. The idea of hash functions - or its ideal counter part the one-way function - might have been known, but not its range of application. E.g. integrity was not much of a concern: Someone without the key couldn't possibly modify a message in a meaningful way. Other applications of hash functions might seem trivial these days, but as always: developing something new and understanding something in hindsight is entirely different.

I doubt there is a genuine classical hash function.

• I'm very sorry, my question maybe was not as clear as it could have been. I asked for some sort of a "classical hash function" just like the classical ciphers like hill and co. Calculating hash values by hand is nonetheless an option and I'll probably accept it as answer. – SEJPM May 19 '15 at 19:16
• If you consider hash functions to be realizations of one-way functions, it raises the question: Did they think of it back then, when classical ciphers were created? And if they had any use? The historic point of view of cryptography was quite different from today, and as far as I know, pretty much limited to encryption. So I doubt there is a classic hash algorithm, because it had no application. – tylo May 26 '15 at 9:10
• So you're saying: "Classical hash-functions do not exist because people trusted their couriers in not tampering the message. And if those couriers got caught, they usually died anyway and an advesary didn't try to deliver "gibberish" because it was pointless." Well I think that's a reasonable explanation. Please don't forget to edit your answer to include that :) – SEJPM May 26 '15 at 17:12