Read More | Important Notice |
Those using monoalphabetic substitution codes (seriously obsolete and insecure for at least the past 250 years) have been told in countless books, and by the American Cryptogram Association that the way to create a substitution key is to follow this procedure:
Seed | |||||||||||||||||||||||||||
Sanitized Seed | |||||||||||||||||||||||||||
Plaintext | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | |
CIPHERTEXT | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • |
The shortcomings of this method are obvious. Plaintext letters early in the alphabet tend to be represented by common letters, and plaintext letters near the end of the alphabet tend to be represented by less common leters, often themselves (U - Z in this illustration). Not a pretty picture!
So here's an alternative.
Seed | |||||||||||||||||||||||||||
Plaintext | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | |
CIPHERTEXT | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • |
Passphrase | |||||||||||||||||||||||||||
Sanitized Passphrase | |||||||||||||||||||||||||||
Plaintext | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z | |
SEED 0 | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | |
SEED 1 | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | |
SEED 2 | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | |
FINAL SEED | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • | • |
Sometimes it is necessary or desirable to create a seed from a much longer string of text, commonly called a "Passphrase". The reason why this is a good idea is that people are very bad at thinking up random sequences. A long phrase or sentence, however, gives a lot of possibilities. The question is how to turn a passphrase into a seed, as per the previous section. Creating a small string of characters that contains much of the "randomness" of a long phrase is called "hashing". Proper hashing requires that at least the following conditions be met:
Passphrase | ||
Sanitized Passphrase | ||
Seed |
[sp]abcdefghijklmnopqrstuvwxyz0123456789.,?'!/()&:;=+-_"$@*%[CR]
There are only 11,316,496 numbers (0 - 11,316,495) represented by 4 characters in base 58 whereas there are 11,881,376 numbers represented by 5 characters in base 26. For this reason there are 564,880 numbers (from 11,316,496 through 11,881,375) in base 26 that don't represent anything in base 58. These base26 that have no base58 equivalent run from "YTWJW" to "ZZZZZ". If this is the input to a code, having a gap in the cyphertext this large is not a good thing, as it can serve as a kind of "frequency table" crib.
If this code is used as the input to a cypher, this could be eliminated as a problem if during encoding of each block a (pseudo) random number between 0 and 11,881,375 is generated. If this number is larger than 10,751,615, then a block of 5 UPPER CASE characters is inserted into the ciphertext with an encoded value equal to the random number. These would be inserted upon encoding and ignored on decoding.
My only reward for writing this is the 15 milliseconds of fame I receive from having my name here. Don't deprive me of that.
You can copy this page by simply doing a "Save As" in your browser and putting it somewhere on your hard drive (or your web site). If you stop there the background will be gone. To preserve the background, copy the following file into this same folder, without changing its name, by again using your browser's "Save As". The next time you refresh the page, the background should be restored:
I make NO guarantee of any kind.
This page may contain serious errors.
Use this page entirely at your own risk!
This page is for entertainment purposes only.