The Codebreaker Kids by George Edward Stanley, 1987.
Dinky Lakewood likes living in Washington, D.C. because it’s such an interesting place, and he loves the stories about spies and government intrigue that appear in the local newspaper. His father, who deals in plumbing supplies, thinks that all this sneaking and spying is awful and threatens to move his family somewhere else when he hears about another spy being caught, but Dinky decides that he’s going to get in on the action because he has a special skill that the spies really need.
The newspapers say that the reason why the latest spy was caught was because he and his associates were so bad at cryptology — they either picked codes that were way too hard or way too easy to decode. Although Dinky’s parents don’t like spies, they did give him a book about secret codes for his birthday: The Complete and Total Book of All the Secret Codes That Have Ever Been Devised and That Ever Will Be Devised. Dinky has worked his way through all of the codes in the book, so he feels qualified to open his own Secret Code Service, helping spies to encode and decode their secret messages.
Dinky recruits his best friend Wong and a girl he knows from school named Lulu to be part of his organization. Lulu is a little strange, but Dinky knows that she’s always wanted to be a spy, so he figures that she would be good for dealing with real spies. Wong is more interested in the money because he wants to get a new bike.
Their first clients are a little strange. One of them is an elderly lady, Emma, who wants to stop her younger sister from snooping in her diary. She turns out to be a repeat visitor because her sister turns out to have a talent for breaking codes. The next client is Boris, the world’s worst Bulgarian spy. He admits that he’s horrible with codes because he cheated at spy school, copying off of a cute female spy. Dinky and his friends help him, although they start to question whether they’re doing the right thing since he is obviously spying on their country and they might be guilty of treason.
They decide that Boris is protected under their pledge of confidentiality, but soon, Dinky is approached by someone from the State Department, who turns out to be tracking Boris the Bulgarian. Can Dinky and his friends continue their service, helping both sides at the same time? Also, will they ever figure out a code that Emma’s sister can’t break?
The premise of the story is a little corny, with spies and government agencies going to a kid’s backyard clubhouse for help with some pretty simple codes, but the book is a lot of fun and doesn’t take itself seriously. It’s a good introduction to cryptology for children, starting out with very simple Caesar ciphers (basic substitution codes) and gradually moving on to more difficult ones, like Trithemius’s Square Table. There are points in the story where readers are given the chance to decode messages before Dinky does, and in the back, there are some additional secret messages to decode using the codes presented in the book.
There is a sequel to this book, but unfortunately, I don’t have it and never read it.