Code Y

In Dystopia 2031, Code Y is a form of encryption used by the Liberty Movement of New Earth in order to send secret messages between its members. This code was invented by Gilbert Martinez on June 25, 2014, and was first used on July 1, 2014.
==How Code Y Works==
===Version 1.0===
The following is a sample encryption.
====The Reference Sheet====
This is the basis of the entire encryption. The reference sheet, a Polybius square, consists of 10 rows and 10 columns, all labeled with the single-digit numbers, leading to a total of 100 encryption characters. This is more than enough to cover all the basic symbols and the alphabet, so the rest of the sheet must contain characters called "voids" in order to fill up space. Voids should not show up in the plaintext. The most effective Polybius squares are those whose characters are completely jumbled around.
These are the Voids:
*All lowercase letters
*a, b, c, d, and e
====The Key====
Every key in Code Y is an 8-digit string of numbers. The best keys are those whose numbers are randomly generated.
:Sample Key: 19372958
====Encryption====
The sender wants to send the recipient a message. The sender writes down the plaintext, which is entirely in uppercase. Let's say the message being sent is LONG LIVE NEW EARTH.
:Plaintext: LONG LIVE NEW EARTH.
Using the reference sheet, the sender writes down the coordinates for each character. For this example, the sender uses the provided reference sheet above.
For each coordinate, the column number (shown here in green) is written before the row number (shown in red).
:For any coordinate: CR
For example,
:A = 01, meaning that it is found in column 0, row 1.
So, the sender writes down each of the coordinates.
:Plaintext Coordinates: 06 26 14 31 98 06 42 33 23 98 14 23 41 98 23 01 36 03 32 35
Then, the coordinates are strung together to become what is called the plaintext number.
:Plaintext Number: 0626143198064233239814234198230136033235
For this example, the sender uses the Sample Key provided above.
:Sample Key: 19372958
Starting from the left, the key is repeated as many times as necessary so that each of the digits of the plaintext number are covered.
:0626143198064233239814234198230136033235
:1937295819372958193729581937295819372958
Then, the numbers are added together using non-carrying addition. This produces what is known as the encryption number.
:0626143198064233239814234198230136033235
:1937295819372958193729581937295819372958
:1553338907336181322533715025425945305183 ← Encryption Number
The encryption number is then separated into groups of two digits to produce the encryption coordinates.
:Encryption Coordinates: 15 53 33 89 07 33 61 81 32 25 33 71 50 25 42 59 45 30 51 83
Then, the sender uses these coordinates to find the corresponding characters on the reference sheet used before. This produces the encryption.
:Encryption: M/V*7V_iHPV>fPIvSd\k
The sender would then send the message M/V*7V_iHPV>fPIvSd\k to the recipient.
====Decryption====
The recipient receives the message from the sender.
:Encryption: M/V*7V_iHPV>fPIvSd\k
The recipient has a copy of the reference sheet, and so it is used to give the recipient the encryption coordinates.
:Encryption Coordinates: 15 53 33 89 07 33 61 81 32 25 33 71 50 25 42 59 45 30 51 83
The recipient then strings it together as one number, producing the encryption number.
:Encryption Number: 1553338907336181322533715025425945305183
The recipient also has a copy of the key. Like the sender, the recipient repeats the key for as many times as needed to cover all the digits.
:1553338907336181322533715025425945305183
:1937295819372958193729581937295819372958
The recipient then uses non-carrying subtraction to produce the plaintext number.
:1553338907336181322533715025425945305183
:1937295819372958193729581937295819372958
:0626143198064233239814234198230136033235 ← Plaintext Number
This number is then separated into groups of two to produce the plaintext coordinates.
:Plaintext Coordinates: 06 26 14 31 98 06 42 33 23 98 14 23 41 98 23 01 36 03 32 35
Using the reference sheet, the recipient then produces the original plaintext that the sender sent.
:Plaintext: LONG LIVE NEW EARTH.
The recipient has decrypted the message.
===Changes for Version 1.1===
For v1.1, all lowercase letters, excepting those with strikethroughs, are to be considered as part of the plaintext as well. The process, however, remains exactly the same.
==How Many Possible Codes?==
There are vastly many possible codes for Code Y. We can work out this number with mathematics.
Because a refsheet consists of 100 characters in a 10-by-10 grid, the number of possible refsheets is 100 factorial (100!). This number comes out to be 93,326,215,443,944,152,681,699,238,856,266,700,490,715,968,264,381,621,468,592,963,895,217,599,993,229,915,608,941,463,976,156,518,286,253,697,920,827,223,758,251,185,210,916,864,000,000,000,000,000,000,000,000 (roughly 9.33262×10157).
Keys are always 8 digits long. For each digit, we can choose 1 of 10 numbers 0 through 9. This gives us 108, which is 100,000,000.
Therefore, the total possible codes comes to be 93,326,215,443,944,152,681,699,238,856,266,700,490,715,968,264,381,621,468,592,963,895,217,599,993,229,915,608,941,463,976,15,651,828,625,369,792,082,722,375,825,118,521,091,686,400,000,000,000,000,000,000,000,000,000,000 (roughly 9.33262×10163).
==Strengths and Weaknesses==
===Strengths===
*Impossible to decode without both the key and refsheet.
*Encrypted text appears like a jumble of random characters, which makes it look like jargon to an average person.
*Double letters are never double letters in the encrypted text, making it harder to successfully decode.
===Weaknesses===
*Anyone receiving the code would need to know both the refsheet and the key by memory, since writing such things down (unless used as a diversion) puts it at risk of being discovered.
*In most keys, plaintext letters never turn into themselves in the encryption.
*If done manually, the encryption and decryption process can be very long and drawn-out.
==Versions==
===1.0 (June 25, 2014–September 8, 2016)===
The original version of Code Y had only capital letters show up in the plaintext; any lowercase letters were considered void characters intended only to serve as part of the encryption.
===1.1 (September 8, 2016–present)===
The first updated version allowed lowercase letters to show up in the plaintext, leaving the strikethrough lowercase letters as voids. The encryption and decryption process remained exactly the same.
Category:Dystopia 2031