<p>When it comes to doing an easy calculation by hand, you are going to run into a problem.  An important part of a cryptographic hash function is <em>unpredictability</em>.  It is this unpredictability that allows us to use a cryptographic hash function as a proof of work.</p>

<p>For comparison, let's use a simple checksumming method on the alphabet.  Normally, a checksum is used to detect copy errors during a transmission or copy of data.  A simple method would be to count the number of vowels in the message, and append this number to end.  For example:</p>

<pre><code>This message is checksummed
</code></pre>

<p>becomes</p>

<pre><code>This message is checksummed|7
</code></pre>

<p>A simple checksum like this can be used to check if a vowel as accidentally turned into a consonant, or a consonant accidentally turned into a vowel (not very useful, I know).  If either of those two types of errors were to happen during transmission, the checksum wouldn't match on the receiving end, and we'd know there has been an error.</p>

<pre><code>This mrssage is checksummed|7  &lt;--- the checksum is wrong, so there's an error
</code></pre>

<p>This simple checksum is also a hash function, as it maps a larger block of data to a smaller chunk of data.  Obviously, this is a terrible hash function with an extremely high collision rate, but it's a simple enough example to calculate with pen and paper.</p>

<p>Now let's see what happens when we try to use this hash function as a proof of work.  We need to also add a <em>nonce</em> value that can be changed to modify the output of the hash function, without modifying the important part of the message.  I'll use the form <code>message|nonce|hash</code>.  Let's say that someone performing the proof-of-work needs to find a nonce such that the hash digest is greater than or equal to 10.  For example, the following would satisfy the proof-of-work:</p>

<pre><code>This message is checksummed|aaa|10
</code></pre>

<p>When the message is hashed (checksummed) together with the nonce, we meet the proof-of-work.</p>

<p>The problem, however, is that our hash function is non-cryptographic, and therefore reversible.  Starting with our target value of <code>10</code>, and our message of <code>This message is checksummed</code>, we can perform the checksum on the message and then do simple arithmetic to generate an acceptable nonce.  There is no unpredictability in the system.</p>

<p>If you use some sort of pen and paper hash function, you are almost certainly going to run into this problem.  Likely, those attending your class will see right through it, and not understand the purpose of the proof-of-work.  In the case of this example, it would be pointless.</p>

<p>If you choose to use a method like this, it is probably worth explaining to your class the significance of cryptographic hashing functions.  Otherwise the entire concept of proof-of-work doesn't make sense.</p>

CC BY-SA 3.0
2018-01-22T10:18:12.403Z
Very good points. Your thinking in vowels is on the right pen & paper-level needed. Aside from the missing avalanche effect I'm thinking of elaborating the algo by just doing `count_vowels(message)  + count_consonants(message) + length(message)`. By the way if the attendees hack or forge a block that would be a interesting scenario to speak about and doing a comparison with how bitcoin works.
Gustav
CC BY-SA 3.0
2018-01-09T18:08:30.197Z
2018-01-09T18:08:30.197Z
Jestin
<p>I'm holding a course on Bitcoin and blockchain technology. On my agenda I have an exercise where I'm going to let the attendees create their own blockchain on the wall using post-its.</p>

<p>I'm in search for something that would resample Bitcoins proof of work that the attendees could calculate by paper and pencil. I've seen the <a href="http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html" rel="nofollow noreferrer">0.67 hashes per day</a> however I'm in search for something much simpler.</p>

<p>What algoritms for generating hashcodes, or better for this purpose a checksum, exist that does not require ascii or base conversions? Could you invent something for this purpose?</p>

CC BY-SA 3.0
2018-01-09T15:50:09.290Z
https://en.wikipedia.org/wiki/Fletcher%27s_checksum
MCCCS
CC BY-SA 3.0
2018-01-09T16:33:25.807Z
I feel like you are confusing checksums with hash digests.  They are different things.  https://stackoverflow.com/questions/460576/hash-code-and-checksum-whats-the-difference
Jestin
CC BY-SA 3.0
2018-01-09T17:21:40.750Z
@Jestin Well if there is a algo for a hashcode that could be computed for this purpose I would be much interested.
Gustav
CC BY-SA 3.0
2018-01-09T17:28:12.917Z
@Gustav, a checksum would be simpler for pen and paper...but again, a checksum is not a hash.  It might not suit your purposes.
Jestin
CC BY-SA 3.0
2018-01-09T17:46:55.507Z
@Jestin You got a good point anyway, I've clarified my question.
Gustav
<hash><proof-of-work><education>
What dead simple algoritm can be used for generating checksums by pen and pencil?
Gustav
# What dead simple algoritm can be used for generating checksums by pen and pencil?

(Asked by: username_0 on 2018-01-09)

I'm holding a course on Bitcoin and blockchain technology. On my agenda I have an exercise where I'm going to let the attendees create their own blockchain on the wall using post-its.

I'm in search for something that would resample Bitcoins proof of work that the attendees could calculate by paper and pencil. I've seen the [0.67 hashes per day](http://www.righto.com/2014/09/mining-bitcoin-with-pencil-and-paper.html) however I'm in search for something much simpler.

What algoritms for generating hashcodes, or better for this purpose a checksum, exist that does not require ascii or base conversions? Could you invent something for this purpose?

**Tags:** hash, proof-of-work, education

> **Comments:**
> **username_1**: https://en.wikipedia.org/wiki/Fletcher%27s_checksum  
> **username_2**: I feel like you are confusing checksums with hash digests.  They are different things.  https://stackoverflow.com/questions/460576/hash-code-and-checksum-whats-the-difference  
> **username_0**: @username_2 Well if there is a algo for a hashcode that could be computed for this purpose I would be much interested.  
> **username_2**: @username_0, a checksum would be simpler for pen and paper...but again, a checksum is not a hash.  It might not suit your purposes.  
> **username_0**: @username_2 You got a good point anyway, I've clarified my question.  

---

## 1 answers

### Answer by username_2 on 2018-01-09. Score: 2 | Accepted answer

When it comes to doing an easy calculation by hand, you are going to run into a problem. An important part of a cryptographic hash function is *unpredictability*. It is this unpredictability that allows us to use a cryptographic hash function as a proof of work.

For comparison, let's use a simple checksumming method on the alphabet. Normally, a checksum is used to detect copy errors during a transmission or copy of data. A simple method would be to count the number of vowels in the message, and append this number to end. For example:

```
This message is checksummed

```

becomes

```
This message is checksummed|7

```

A simple checksum like this can be used to check if a vowel as accidentally turned into a consonant, or a consonant accidentally turned into a vowel (not very useful, I know). If either of those two types of errors were to happen during transmission, the checksum wouldn't match on the receiving end, and we'd know there has been an error.

```
This mrssage is checksummed|7  <--- the checksum is wrong, so there's an error

```

This simple checksum is also a hash function, as it maps a larger block of data to a smaller chunk of data. Obviously, this is a terrible hash function with an extremely high collision rate, but it's a simple enough example to calculate with pen and paper.

Now let's see what happens when we try to use this hash function as a proof of work. We need to also add a *nonce* value that can be changed to modify the output of the hash function, without modifying the important part of the message. I'll use the form `message|nonce|hash`. Let's say that someone performing the proof-of-work needs to find a nonce such that the hash digest is greater than or equal to 10. For example, the following would satisfy the proof-of-work:

```
This message is checksummed|aaa|10

```

When the message is hashed (checksummed) together with the nonce, we meet the proof-of-work.

The problem, however, is that our hash function is non-cryptographic, and therefore reversible. Starting with our target value of `10`, and our message of `This message is checksummed`, we can perform the checksum on the message and then do simple arithmetic to generate an acceptable nonce. There is no unpredictability in the system.

If you use some sort of pen and paper hash function, you are almost certainly going to run into this problem. Likely, those attending your class will see right through it, and not understand the purpose of the proof-of-work. In the case of this example, it would be pointless.

If you choose to use a method like this, it is probably worth explaining to your class the significance of cryptographic hashing functions. Otherwise the entire concept of proof-of-work doesn't make sense.

> **Comments:**
> **username_0**: Very good points. Your thinking in vowels is on the right pen & paper-level needed. Aside from the missing avalanche effect I'm thinking of elaborating the algo by just doing `count_vowels(message)  + count_consonants(message) + length(message)`. By the way if the attendees hack or forge a block that would be a interesting scenario to speak about and doing a comparison with how bitcoin works.  

---

