# Blockchain cipher suitable for preschoolers

Is there a cryptographic hash function that well suited for preschool-aged children to work out on pencil and paper, to learn concepts of block chains?

It must have the following requirements:

1. Able to be easily verified
2. Able to be easily calculated with pencil and paper
3. Able to link to previous result, to create blockchain

The function may be low-complexity. It does not matter if the function is easily broken.

• Can you provide some further context? Without more context, this question is pretty broad and hard to answer well. Commented Mar 7, 2018 at 2:58
• I have a 4 year old and this seems rather ambitious, but I commend the effort! Commented Mar 7, 2018 at 3:09
• Pre-school meaning that they're just learning to hand-write letters, and can't reliably read words?
– Ben I.
Commented Mar 7, 2018 at 9:33
• I recommend the following textbook: amazon.ca/Peek-Boo-Friends-Parragon-Books/dp/1472305922 While not explicitly a text on cryptographic hash functions, it can demonstrate the concept of a blockchain to preschoolers. Each page has a window back to the previous page, and forward to the next page, these windows allow verification that the current page indeed follows the previous, allowing the student an early appreciation for blockchain suitable for a preschooler. Commented Mar 7, 2018 at 19:04
• I don't thing that hashing and block chains are the same thing, however block chains will use hashes. Commented Mar 7, 2018 at 19:12

If all you want is a simple hash function you could do something like this. First take your original message and apply something like ROT 13 to it. This gives a reversible cipher, of course. Then give each letter a number, say N = 1, O = 2, etc, wrapping after Z. Next, just add up all of those values. It is no longer a reversible cipher, but a hash. To get it to be fixed length, simply pad or truncate it to, say, five digits.

Pretty bad cryptography, of course, but simple enough if the students can count and add.

The use in a blockchain is up to you.

This hash has the features described here: https://en.wikipedia.org/wiki/Cryptographic_hash_function, but they aren't very strong, of course.

Fixed Length
Deterministic
Easy to Compute
Infeasible to Reverse
Change in the Message changes the Hash (not a lot, though)
Infeasible to Generate a false message with the same Hash (maybe).

Call it the puppy-1 hash function if you like.

And of course ROT-13, like the Caesar Cipher, has some historical interest.

In the first part, ignore case, punctuation, spaces, etc., which isn't sufficient in general, but should be for this use.

• I'm not sure that addition is a reasonable assumption for the pre-school set, though this would be great in middle or upper elementary school!
– Ben I.
Commented Mar 8, 2018 at 11:10
• ROT13 popped into my head when I read the question. Commented Mar 8, 2018 at 19:00

A simple hash algorithm is modulo or remainder (they are the same for positive numbers). You only need be able to count.

To calculate $n$ modulo $m$, take $m$ empty pots, and $n$ marbles. Place one marble in front of each pot, then put the marbles in the pots, and repeat until you do not have enough marble for each pot, count the marbles that are in-front of the pots (that is the answer).

In is not a cryptographic hash, but it is a hash. I doubt that you will be able to do a crypto hash at this age.

Another algorithm, would be horizontal and vertical parity. (not very hashy, but related) see CS unplugged. https://www.youtube.com/watch?time_continue=210&v=FnwBratAhfg and https://csunplugged.org/en/topics/error-detection-and-correction/

Does there exist a pencil & paper activity involving blockchain ciphers which is suitable for preschoolers?

The answer is no. However, you might be able to teach such things to children who like math or science in middle school (American grades 6, 7, & 8). If you re-ask your question, but use the phrase "children 12 years of age and older" you might get better quality answers.

• This is the right answer. In pre-k, students are learning letters (but not necessarily reading yet), colors, patterns such as red-blue-red-blue-red-blue, the seasons and the days of the week. While there may be some among them who can read, you're really more likely to get that reliably in first grade, and reliably in second.
– Ben I.
Commented Jun 5, 2023 at 21:02

Pick your first word from the sentence to hash. Look it up in a dictionary and write down the first word of the description. Pick the next word and look it up. Write down the second word from the description. Do this repeatedly and wrapping around from start to finish of the description as many times as necessary depending on the position of the word.

A weak hash function for text.

I am a preschool teacher and a former CS/IT worker. Yes, you can teach CS to preschoolers. It is a part of the Digital Citizen lesson planning that is common across the board. I would say use colors and simple numbers/letters.

Ex- Red and Blue make Purple, Uppercase and Lowercase letters, ect. Making a game out of it using their bodies instead is the easiest way. That way you can "show" the CS skills happening in real-time and they really are learning it. Sounds odd, sure but trust when they get to Kindergarten it will show that they did learn it!! Kudos to you for implementing it!!

Red - Jump A- Turn Right Blue - Spin B - Turn Left

Hopefully, this is making sense!! Preschoolers do code for whoever said no. It is clear that this question is hard if you are not in the classroom directly. I have done this before and trust me when I say make it BIG! So they can see the coding happening on the ground. Preschool and Tech are my little niche as most PK teachers hate "screen time" or anything to do with tech in the classroom because they are choosing to not figure it out.

Resources Below for verification: https://k12cs.org/pre-k/

Hope that helps!!

Play is the work of the Child! -Teacher Kelly

• This is exactly the sort of answer that this site exists for. Fantastic!
– Ben I.
Commented Jul 6, 2023 at 12:26