SHOW:
|
|
- or go back to the newest paste.
| 1 | The Input of http://pastebin.com/F9ZDQZYC is: "THE EYES ARE USELESS WHEN THE MIND IS BLIND". | |
| 2 | ||
| 3 | ||
| 4 | - | I've studied Code #2 a little bit more after I made it and discovered a few things about it that will hopefully make it easier for you to understand. |
| 4 | + | Code #3 is like Code #1 but you're now able to use multiple instances of the same letter and its output varies. |
| 5 | ||
| 6 | Our input will be: "HELLO WORLD" and we'll encode one word at a time. | |
| 7 | - | Code #2 & 3 are a lot less picky than Code #1. |
| 7 | + | |
| 8 | - | To understand Code #2, it'd be best if you already understood how the Vigenere Cipher works. |
| 8 | + | HELLO is 5 characters long, meaning we need to make a 5x5 square & fill in the alphabet. |
| 9 | ||
| 10 | 1 2 3 4 5 | |
| 11 | - | There are 5 different groups of letters: |
| 11 | + | 1 A B C D E |
| 12 | 2 F G H I J | |
| 13 | - | 1: UCSD |
| 13 | + | 3 K L M N O |
| 14 | - | 2: QBVGLP |
| 14 | + | 4 P Q R S T |
| 15 | - | 3: YJNRZT |
| 15 | + | 5 U V W X Y |
| 16 | - | 4: AMFKWX |
| 16 | + | |
| 17 | - | 5: EIHO |
| 17 | + | Since we've filled the whole 5x5 square with most of the alphabet(A-Y), the "Z" will be apart of the next group(A) of 5x5 squares. |
| 18 | ||
| 19 | - | The reason why I chose for the letters to be in those specific groups/order is irrelevant now, so all you need to make note of is that for this code, the letters are in that arrangment. |
| 19 | + | ------------1st GROUP has no Group letter------------ |
| 20 | 1 2 3 4 5 | |
| 21 | - | Now we just create a vigenere table with these letters: |
| 21 | + | 1 A B C D E |
| 22 | 2 F G H I J | |
| 23 | - | The first column will just be the regular alphabet in order, (A-Z), and the 2nd column will be next instance of that particular row/group. |
| 23 | + | 3 K L M N O |
| 24 | 4 P Q R S T | |
| 25 | - | For example: |
| 25 | + | 5 U V W X Y |
| 26 | ------------2nd Group will be defined by "A"------------ | |
| 27 | - | 1st column up to 5 letters: |
| 27 | + | 1 2 3 4 5 |
| 28 | - | 1 |
| 28 | + | 1 Z _ _ _ _ |
| 29 | - | A |
| 29 | + | 2 _ _ _ _ _ |
| 30 | - | B |
| 30 | + | 3 _ _ _ _ _ |
| 31 | - | C |
| 31 | + | 4 _ _ _ _ _ |
| 32 | - | D |
| 32 | + | 5 _ _ _ _ _ |
| 33 | - | E |
| 33 | + | |
| 34 | ||
| 35 | - | 1st & 2nd column up to 5 letters: |
| 35 | + | Our output will now have a padding of "X"'s, and it will be as long as how many spots are in the group (in this case, 5x5=25) |
| 36 | ||
| 37 | - | 1 2 |
| 37 | + | XXXXXXXXXXXXXXXXXXXXXXXXX |
| 38 | - | A M |
| 38 | + | |
| 39 | - | B V |
| 39 | + | |
| 40 | - | C S |
| 40 | + | Just like Code #1, Knowing the number form of letters, A=1,B=2,C=3...Z=26, We now place the order letter in the position of the letter's number. |
| 41 | - | D U |
| 41 | + | |
| 42 | - | E I |
| 42 | + | (H)ELLO XXXXXXX1XXXXXXXXXXXXXXXXX |
| 43 | ||
| 44 | - | Because: |
| 44 | + | If our first letter happened to be "Z", then we would know that "Z" is apart of GROUP A, BUT is in the 1st postion in the 5x5 grid, meaning: |
| 45 | ||
| 46 | - | Row A is apart of this group: AMFKWX |
| 46 | + | Our Z, (1st character being encoded: Order number = 1), would be in the 1st postion of our output: |
| 47 | - | ROW B is apart of this group: QBVGLP |
| 47 | + | |
| 48 | - | ROW C is apart of this group: UCSD |
| 48 | + | (Z)ello (X)XXXXXXXXXXXXXXXXXXXXXXXX |
| 49 | - | ROW D is apart of this group: UCSD |
| 49 | + | |
| 50 | - | ROW E is apart of this group: EIHO |
| 50 | + | (Z)ello (1)XXXXXXXXXXXXXXXXXXXXXXXX |
| 51 | ||
| 52 | - | Meaning: |
| 52 | + | Since "Z" is in Group A, we need to show that in your output by adding ".A" after the "1": |
| 53 | ||
| 54 | - | Columns & Rows 1-5 would be: |
| 54 | + | (Z)ello (1.A)XXXXXXXXXXXXXXXXXXXXXXXX |
| 55 | - | 1 2 3 4 5 |
| 55 | + | |
| 56 | - | A M F K W |
| 56 | + | and it would look like this: |
| 57 | - | B V G L P |
| 57 | + | |
| 58 | - | C S D U C |
| 58 | + | (Z)ello 1.AXXXXXXXXXXXXXXXXXXXXXXXX |
| 59 | - | D U S D U |
| 59 | + | |
| 60 | - | E I H O E |
| 60 | + | |
| 61 | Now back to our actual input: H(E)LLO | |
| 62 | ||
| 63 | - | You would do this for the 26 columns and 26 rows thus making a vigenere table using these letter configurations. |
| 63 | + | H(E)LLO XXXX2XX1XXXXXXXXXXXXXXXXX |
| 64 | ||
| 65 | HE(L)LO XXXX2XX1XXX3XXXXXXXXXXXXX | |
| 66 | - | So if we have an input of: TEST CODE |
| 66 | + | |
| 67 | ||
| 68 | - | We encode by finding (T)EST on the top row of the vigenere table and the T(E)ST on the Left most column and find the intersection between the two, which would be: O |
| 68 | + | Now we have a 2nd instance of the same letter (two L's), All we do to show that multple letters are apart of that position is add a "|" between them: |
| 69 | ||
| 70 | - | Continue to do this process until the last letter of the word: |
| 70 | + | HEL(L)O XXXX2XX1XXX3|4XXXXXXXXXXXXX |
| 71 | ||
| 72 | - | TEST = OST |
| 72 | + | HELL(O) XXXX2XX1XXX3|4XX5XXXXXXXXXX |
| 73 | ||
| 74 | - | For the last letter, you find TES(T) on the top row and (T)EST on the left most column, which would be: Y |
| 74 | + | |
| 75 | and if we had to encode a letter from a different group, same rules apply. | |
| 76 | - | Now continue this process for the rest of the input, TEST CODE, and it will leave you an output of: OSTY ICOC |
| 76 | + | |
| 77 | If you find it a bit hard to understand when trying to decode, space out the columns: | |
| 78 | ||
| 79 | Final: | |
| 80 | HELLO = XXXX2XX1XXX3|4XX5XXXXXXXXXX | |
| 81 | ||
| 82 | Final with 25 columns spaced out: | |
| 83 | HELLO = X X X X 2 X X 1 X X X 3|4 X X 5 X X X X X X X X X X | |
| 84 | ||
| 85 | ||
| 86 | To save time, Here is how the rest of the input would look: | |
| 87 | ||
| 88 | ||
| 89 | HELLO WORLD: | |
| 90 | ||
| 91 | XXXX2XX1XXX3|4XX5XXXXXXXXXX | |
| 92 | XXX5XXXXXXX4XX2XX3XXXX1XXX | |
| 93 | ||
| 94 | ||
| 95 | Essentially, you can also do the same thing as Code #1 and repeat the numbers if you wanted to: | |
| 96 | ||
| 97 | HELLO WORLD: | |
| 98 | ||
| 99 | 222221113333|45552222222222 | |
| 100 | 55554444444422233311111555 | |
| 101 | ||
| 102 | ||
| 103 | That's all there is to this code. :D | |
| 104 | ||
| 105 | Thanks for participating for Code #1! :D | |
| 106 | ||
| 107 | ||
| 108 | - DWC |