While not exactly part of a regular PI's toolbox, it may be of possible interest to budding spies.
You will need:
- Some paper
- A pencil
- State secrets
First, let us get to the basics and familiarise ourselves with some terms.
Plaintext is the message, unencrypted, ie in plain text whereas cyphertext refers to the encypted message.
A Conversion Table is used to convert message to and from numbers, letters, or both. This is NOT the encryption or decryption process! Here is an example of a conversion table:
A Key is the (usually 250) random letters or numbers that comprises the One-Time Pad itself. Here is an example of a numeric OTP key:
So, let us begin with a basic example using the above conversion table and OTP key.
Step 1 - Write message out in plaintext
MEETING TODAY AT 1200HRS
Step 2 - Convert using table
Using the conversion table above, this plaintext message would be converted to the following:
79, 2, 2, 6, 3, 4, 74, 6, 5, 72, 1, 88, 1, 6, 90, 1, 2, 0, 0, 90, 75, 82, 83
Step 3 - Group output into groups of 5
79226 34746 57218 81690 12200 90758 28391 91919
Always finish off your message with a series of full-stops (ie 91 91 91...).
Remember, this is still plaintext. Once we have reached this step we are ready to use the One-Time Pad and encrypt our message.
Step 4 - Encryption
We will use the OTP above as our key in this example. Note, the first set of numbers on the OTP (in this case 54048) are not used in the encryption process, but the KEYID to identify which OTP is being used.
Here is our plaintext message:
79226 34746 57218 81690 12200 90758 28391 91919
Here are the next 8 groups of numbers from the OTP Key after 54048:
84038 99541 47661 32157 83268 19341 64279 92507
To encrypt, take each numeral individually in turn from the plaintext and subtract the corresponding number from the key. If the number being subtracted is greater, add 10 to the plaintext number. So, in this case we start with plaintext value of 7 minus key value of 8. Since 8 is larger than 7 we calculate it instead as 17 - 8, which results in 9.
Working through the first group we do the following calculations: (1)7-8, 9-4, 2-0, (1)2-3, (1)6-8, resulting in the cyphertext of 95298. Continuing through with the rest we end up with:
95298 45205 10657 59543 39042 81417 64122 09412
We have just encrypted our message! However, before we can send it we must not forget to include the KEYID - the first set of 5 numbers, otherwise our recipient will never know which OTP key to use to decrypt our vital communication. So the actual message will look like this:
54048 95298 45205 10657 59543 39042 81417 64122 09412
Step 5 - Destroy OTP Key used!
The OTP remains a totally unbreakable system so long as certain security measures are adhered to - including that it is never used more than once. Also, the more copies of the OTP that exist, the greater the opportunity that it may be compromised, so it is best that only two copies of OTP keys exist - one for the agent and one for the handler.
Decrypting an OTP message
It is a simple process which is essentially the exact reverse of the encryption steps undertaken. The first set of numbers will refer to which OTP key to use. Then the cyphertext
95298 45205 10657 59543 39042 81417 64122 09412
is added to the OTP key (no remainders: 8 + 4 = 2 not 12)
84038 99541 47661 32157 83268 19341 64279 92507
which equals uncoverted plaintext
79226 34746 57218 81690 12200 90758 28391 91919
which converts to
MEETING TODAY AT 1200HRS
Simple!
Is that it?
Well, in a nutshell, yes. However, there are other options for encryption keys, such as using letters rather than numbers, and using a codebook for commonly used terms to maintain brevity and as a further level of security.
And, of course, before you can send your secret messages selling out your country, you need to create your OTP keys. You can find a cool little tool here to create random numbers or letters formatted as OTPs, worksheets and even conversion tables.
Next time on Nothing To See Here, we'll look at how OTPs are in use today and examine an enduring mysterious phenomenon...
I find typing in wingdings to be an effective encryption.
ReplyDeleteHmmm. I'm thinking that maybe it isn't best used when transmitting stolen missile codes or something.
DeleteWell if I ever have missile codes or anything of that nature, the encryption I use will be the least of my concerns.
ReplyDeleteI have a paper and pencils but am having trouble locating any state secrets. Can you help?
ReplyDeletePossibly. Of course you could follow that other time-honoured spy tradition of just making stuff up.
Delete