|Home > Cryptography > Here
Public Key Encryption (PKE) schemes are among some of the hotest topics in cryptography today. They typically revolove around computers and increasingly require a degree in mathematics to make any sense of.
However in the past, public key encryption schemes existed and were very difficult to crack. Here are some of them that you can play around with with your kids.
This form of PKE is available to anyone, world wide. All it requires is a standard available text to work from. Let's say that you want to encode the phrase "Happy Birthday" between you and a friend. You could use a commonly available newspaper, magazine, or book as a source of "public" information. Then you devise between you and your correspondant a method by which encoding and decoding occur.
Prior to engaging in any correspondence, an agreement is struck. To encode a message, you would both subscribe to a given newspaper. Then, to transmit a message on say 9/23/2018, you would both use 9/23/2018's edition of the same newspaper.
At the top of your message the date, in plain text, is used to index into your stack of newspapers and is the key by which you will be able to converse. Next, using an agreed to method, you would scan through the varous headings, the picture captions, the cartoons, etc. to select a block of text. Within that text, you hope to find the character "H".
Let's assume that you've both decided to use a newspaper with a large daily cartoon section. The cartoons in this newspaper always come out in a given order, so you can always say which cartoon will be number one, which will be number two and so on. Then you might use the cartoon cell as another index. Lastly, either a word or character count within that cell.
Having all of these issues decided, a plain text message of:
Several things are worth noting here:
In any case, your correspondant would then use the newspaper that you'd both agreed on, find the comics section, and start to decode. Presumably, the 3'rd cartoon's 2'nd cell's 17'th character would be a "H". The 4'th cartoon's 1'st cell's 3'rd character would be an "a", and so on.
Book codes were more popular in the golden days of the telegraph. Businesses as well as governments wanted to communicate securely. To those ends, several publishers printed "code books". These books were like foreign laguage dictionaries. In one section, a wide selection of common words were listed, and after each was a unique encoding for that word, typically as a number. In the second section, all of the numbers used in the first section were sorted and their mappings where listed.
To encode a message, a person would thumb through the first section, much like a dictionary, and would translate one word at a time from text to it's encoded numerical format. Once this was written down, the numbers would be passed through to the home office via a telegraph message. The recepiant would then decode the message using the second section of the same code book.
Variations came about by adding a given number to each of the code book numbers as you were encoding. Say, 21, would be added to each encoded value. Then prior to decoding the message, you would subtract 21 from each individual number prior to looking it up.
Frequency analysis was the obvious way to attack this approach. Given that every word has average frequency of use in English (as well as virtually every other language), you can look at the number groups and regardless if the code number is shifted a few digits sideways or not, you'd still be able to discern what the real number word is likely to be.
Later variations used a cylcing set of numbers to add or subtract from the code number of a given word, based on its position within the message. This method, although more secure, was far harder to do with just paper and pencil. Not only did you have to lookup and transcribe your words into their code book format, you then had to perform a repeditive sequence of mathematic operations on each and every word without mistake. Similarly, your correspondant had to be as good at the decoding process to make the whole thing work.
A modernization of this technique would include in the base code book more than one encoding for any one given word. In fact, the number of encodings for any one word would be in direct porportion to that word's frequency with the language being encoded. Taken a step further, you might even code popular phrases in proportion to their frequency and include those also in your code book. These simple systems, in conjunction with an active imagination, can make for enjoyable afternoons playing "spy" with your children.