Codes are fun. Kids love thinking that they can write something only their friend will be able to read. But more importantly, at least from a geekdad’s perspective, is that when your kid learns about codes, he or she also learns a ton about math, language and history.
For instance, delving into the Enigma story teaches kids far more than simply how the code worked. To understand its story you have to know about World War II, and at least touch on the math behind a continually changing substitution alphabet.
Learning about codes is easy. There are some excellent books out there. The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography is one of the best, and is a great read for both adults and older kids. Younger geekchildren might prefer Top Secret: A Handbook of Codes, Ciphers and Secret Writing.
There are plenty of Web sites as well. This UIC site has activities, Flash-based encoders and even more advanced mathematical tools like a prime number checker. The NSA kids site is almost disturbingly cheerful, with code-cracking animal characters giving young visitors history lessons and tips on creating their own ciphers.
But the best lessons your geekkid will learn will be self-taught. My sister, when she was a kid, created a rather brilliant hieroglyphic alphabet with every character being an animal in a different pose. When written out it resembles a parade of prancing mythological figures. It started off as a simple substitution cipher but she added dummy and alternate characters to make it harder to defeat. (Although I surreptitiously cracked the simpler version as a bratty little brother.) Sis claims to still be able to write in this code — for instance when she hired movers recently, she labeled boxes of valuables in code to discourage thievery.