Introduction

So far I enjoy secret codes more than any of my sons, but they are handy for birthday party treasure hunts, etc.

This is a symmetrical cipher, which is the most fun for kids to use because the encryption an decryption steps are the same. 'A' translates to '', and '' translates back to 'A'.

A secret code

Note that if you leave this page and come back later, the code will change. Write it down if it's important.

If you're under a time constraint, you can use this utility to encode or decode your message. Put either the plaintext or the cryptotext in the box on the left and click the button. (It's symmetric, so the encryption and decryption process is the same.)

Set a new code

Enter the letters corresponding to ABCD...XYZ: (This assumes you've set up a proper symmetrical substitution cipher.)

An actual secret decoder

If you're a LaTeX user, you might be interested in a document I created to make an actual secret decoder ring, like like this one. You cut out the two circles, cut out the square holes, attach the pieces of paper with a brad, and you're set. (It's more fun, but not necessarily more productive!) You can use the code below, or create your own with this LaTeX file.



\documentclass{article}
\usepackage[a4paper, left=1cm, right=1cm, top=2cm, bottom=1cm]{geometry}
\usepackage{tikz}
\usepackage{color}

\usepackage[quiet]{polyglossia}
\setdefaultlanguage{english}
\setromanfont{Courier New}
\setmonofont{Times New Roman}
\usetikzlibrary{chains,decorations.text}

\usepackage{xltxtra}
\usepackage{fontspec,xunicode}
%\font\typewriter="Magneto" at 72pt

\begin{document}

\newcount\paircount
\paircount=0
\newcount\tokenposition
\tokenposition=20

\def\newpair#1#2{%
\advance\paircount by 1%
\global\toks\tokenposition={#1}%
\advance\tokenposition by 1%
\toks\tokenposition={#2}%
\advance\tokenposition by 1%
}

\def\plaintext#1{%
\newcount\tmp
\tmp=#1
\multiply\tmp by 2
\advance\tmp by 20
\the\toks\tmp
}

\def\cryptotext#1{%
\newcount\tmp
\tmp=#1
\multiply\tmp by 2
\advance\tmp by 20
\advance\tmp by 1
\the\toks\tmp
}




\begin{tikzpicture}[font=\Large]
    \node at (current page.north west)
        {%
			\begin{tikzpicture}[overlay]
			\draw (0,0) circle (190pt);
			\draw [gray] circle (3pt);
			\end{tikzpicture}
	};
	
    \node at (current page.north west)
        {%
		\begin{tikzpicture}[start chain=circle placed {at=(\tikzchaincount*13.84:160pt)}]
		\foreach \i in {0,...,\paircount}
		\node [on chain] {\plaintext\i};
		\end{tikzpicture}
        };
    \node at (current page.north west)
        {%
		\begin{tikzpicture}[start chain=circle placed {at=(\tikzchaincount*13.84:120pt)}]
		\foreach \i in {0,...,\paircount}
		\node [on chain] {\cryptotext\i};
\end{tikzpicture}
        };
\end{tikzpicture}

\vskip1cm
\begin{tikzpicture}
\draw (0,0) circle (190pt);
\draw [gray] circle (3pt);
\draw[xshift=-61mm,yshift=-3mm] (0,0) rectangle (10mm,6mm);
\draw[xshift=-46.5mm,yshift=-3mm] (0,0) rectangle (10mm,6mm);


\draw [decorate,decoration={text along path,text=This shows the cryptotext:,reverse path}, rotate around={242:(0,0)}] circle (155pt);
\draw [decorate,decoration={text along path,text=This shows the plaintext:,reverse path}, rotate around={260:(0,0)}] circle (115pt);


\draw [font=\Huge,decorate,decoration={text along path,text=Super Secret Decoder Ring,reverse path}, rotate around={90:(0,0)}] circle (100pt);

\end{tikzpicture}

\end{document}

All contents © 2023 Adam Baker, except where otherwise noted.