Who remembers your first secret message? Was it a note to a friend, a family member, a crush where it was caught by the teacher?

I just finished reading Gregor the Overlander to one of the kids.

Without spoiling a 13 year old series I will just say there was a great part in the series that has introduced my son to ciphers and cryptography.

Then last night at the dinner table, talking about Minecraft (as usual) he just popped up with a riddle: “What’s the opposite of A?”

I said, “Z”. I was right!

Then he asked, “What’s the opposite of X?”

I said, “C?”. I was right again!

“We can make secret messages like this.” Yes, yes we can.

“Do you want to learn how to do it in python?”

We’ve talked about doing things in python before. As he’s getting more comfortable typing he’s starting to learn more. This seemed like a good time to work on some ideas.

I put together a little module with arrays, dictionaries, and functions. Great fun and learning opportunities if we want.

The module is only fun though if you can use it. I put together a little interactive game…

As well as a way to use it with simple text to scramble and descramble…

We are currently playing around with it, having some fun.

Want to? Go grab it at https://github.com/m0nkeyplay/simple-alphabet-cipher.

Just remember, it’s for fun. Don’t be rolling your production apps with this and calling it secure.

via GIPHY

Leave a Reply

Your email address will not be published. Required fields are marked *