Welcome to Redline spacer spacer
One Time Pad
bar Jan 20, 2020
bar Home
bar Downloads
bar Privacy
bar Site Map
bar Search
bar  

 
Home > Cryptography > Here
 
spacer
One time pads are among the most secure of all forms of cryptography. Using this system, a message is converted to a series of number. This can be by using a code book that takes words and or phrases and converts them into numbers, or it can be as direct as using the ASCII code that most computers use to represent the alphabet into numbers. The numbers are then either exclusive "or"ed with these number or are simply added to them. Further, once a number has been used from the one time pad, it is never used to encode again (hence the name).

The resulting series of numbers are completely meaningless without the one time pad that was used to generate them in the first place. This is where the extreme strength of this code comes from.

The downside of this code is that you have to distrubute the one time pad between you and your correspondant. This leaves you open to having the one time pad stollen or discovered because it is physically in both of your hands. Further, if you do not know your correspondant very well, you are open to "man in the middle" attacks (someone, posing as your correspondant, copies your one time pad prior to passing it along, thus being able to review your conversation at will).

Example

In this example, a simple one time pad is used. All visitors to this web site compete for the same one time pad, but all enter it at different locations. By this, I mean that this one time pad is not useful for communicating between two different parites.

The original one time pad is:

8 79 110 58 9 22 22 34 45 27 50 26 17 113 43 10 66 3 117 32
23 104 90 68 7 17 11 25 74 72 113 2 13 111 114 36 79 124 51 20
71 60 52 117 61 80 25 64 31 92 0 111 1 78 125 14 37 76 101 67
8 33 90 49 45 83 45 26 13 5 126 95 54 125 97 32 109 36 110 86
52 99 116 43 8 82 60 72 23 22 9 50 64 76 73 99 100 79 114 30
89 95 116 100 40 64 36 25 108 120 123 66 5 78 31 115 70 119 86 121
118 37 26 25 52 48 61 87 55 28 62 89 85 46 102 79 36 97 110 63
33 123 92 53 37 27 70 102 48 41 121 38 53 76 0 93 2 116 118 116
24 64 121 7 45 22 92 66 9 71 36 24 61 62 42 118 79 48 44 123
121 59 105 38 32 71 72 106 84 105 26 9 20 46 119 88 97 60 103 103
49 65 41 102 116 114 19 79 63 73 90 38 107 83 35 62 124 3 93 125
117 95 22 41 120 27 54 52 93 9 31 45 74 27 96 42 63 54 35 118
122 72 127 26 29 69 31 45 72 15 25 97 118 36 32 122 64 2 96 64
51 3 100 79 83 30 103 36 110 100 92 86 120 76 69 61 114 28 62 29
110 49 111 79 36 19 120 67 67 9 29 32 120 120 82 11 52 111 65 53
85 121 6 10 122 91 11 103 30 36 13 111 74 50 9 22 127 17 11 46
38 56 54 118 4 99 67 89 18 26 89 70 37 71 15 40 122 65 27 92
23 12 17 71 109 105 109 83 125 55 48 51 80 40 51 115 117 108 77 112
101 28 54 46 62 98 103 21 26 30 21 120 16 82 93 67 41 97 49 46
98 11 60 73 8 95 68 26 87 25 22 36 125 78 17 72 60 62 97 49
21 114 33 124 52 67 5 70 126 62 56 19 76 83 25 77 18 49 100 77
22 4 55 98 83 52 32 85 95 111 55 82 46 21 27 93 111 30 18 77
9 61 32 110 54 110 60 25 101 40 105 97 100 29 47 17 61 77 14 29
26 91 60 28 109 20 7 1 55 3 14 114 4 38 61 46 77 65 119 66
108 64 100 40 30 94 58 91 62 11 77 34 83 0 52 104 61 73 74 55
126 118 17 12 29 120 29 39 9 21 98 80 4 83 119 35 70 10 65 116
24 50 100 41 78 50 34 120 6 42 60 60 110 60 90 19 109 40 14 17
31 98 33 50 107 1 44 74 49 85 58 33 73 103 105 100 47 100 60 127
31 26 119 5 15 87 52 119 41 89 4 66 8 83 11 76 81 89 87 10
76 73 82 53 64 16 103 9 107 126 27 125 39 16 24 103 41 87 27 82
97 112 64 56 63 34 99 83 26 41 107 65 0 43 68 80 77 75 31 10
88 4 43 99 64 72 59 122 27 49 41 95 20 66 43 9 4 47 45 103
6 91 28 109 123 39 37 3 76 17 92 91 91 54 98 73 84 43 113 69
33 31 65 27 78 51 26 72 79 110 72 93 67 1 106 57 69 59 49 40
11 121 92 99 70 32 6 124 7 40 102 124 36 14 70 87 55 50 119 75
77 59 31 12 120 20 124 52 70 41 126 113 32 118 45 91 12 27 67 35
10 89 16 12 97 118 57 18 100 38 82 43 51 7 111 102 35 40 16 69
70 15 34 26 58 36 5 90 102 76 88 36 107 109 117 83 44 115 19 7
24 21 120 10 43 2 73 17 67 31 16 9 96 49 123 18 80 54 16 71
23 50 61 80 95 31 71 40 114 47 21 105 113 102 14 27 124 67 10 51
53 3 42 86 54 22 55 24 59 12 99 34 104 17 70 25 5 22 74 12
72 42 81 34 51 64 29 75 104 92 90 1 25 91 9 26 32 10 48 119
5 116 65 45 10 46 125 105 77 44 44 79 8 76 32 103 68 69 93 72
6 46 14 59 3 12 100 44 86 68 50 10 92 22 16 74 41 50 67 109
60 82 94 73 45 96 32 82 26 16 110 57 124 29 109 36 19 89 21 6
97 33 109 53 27 109 54 1 42 36 125 117 96 105 96 14 116 115 58 75
21 12 81 117 74 106 59 81 29 14 3 59 27 101 124 127 102 101 21 35
95 82 119 20 44 61 58 12 17 98 68 11 126 112 120 91 12 41 46 118
24 127 119 29 75 4 31 41 74 53 15 47 74 33 118 32 48 60 121 31
49 33 38 103 24 29 104 54 4 34 98 61 102 106 73 85 10 20 104 73
58 66 121 18 96 27 23 96 106 119 11 73 9 54 49 116 4 63 70 49
74 0

This seemingly random set of number was originally the ASCII code to the Gettysburg Address (trimed down to about 1000 characters). Then, as more and more people visit this page, it becomes slightly mutated with each visit.

To use this list of seemingly meaningless random numbers, you would keep track of which numbers you use. You and your correspondant would create a system between you. For simplicity sake, let's just read across and then top to bottom. So you would take the number 8 and then add it to the "thing to encode", for instance the ASCII value for the character 'A' (which is 64) and you would get 72. This then you would write down as your encrypted text. Next, you would highlight (or otherwise mark out) the number off of the one time pad that you used, namely 8. Then you would take the next "thing to encode" and repeat the process with the one time pad value 79.

To receive a coded message, you would then simply reverse the process. As the decoder, your one time pad doesn't have 8 marked out yet, so you would use it and subtract it from the first number in your encrypted text. Then you would convert that using the ASCII character codes to receive your plain text.

By way of example, enter your plain text below and then press the 'Run' button.

Plain Text
Encoded Text ( starting at position 589 )

As can be surmized from the resulting text, it's kinda messy. However, when you and your correspondant are working from the same one time pad, you can decode things fairly easily back to:

Fight Spam! Join CAUCE!
In Assoication with Half.Com, an eBay company
In Association with Amazon.com

frame bar
spacer Creative Commons License
The website "Redline" by Roland J. Stolfa is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States License.
  [Home]    [Downloads]    [Downsizing]    [Writings]    [Crafts]    [Living]    [Family]    [Toys]    [Cryptography]    [Fun Links]    [Site Credits]    [Personal Info]    [Privacy]    [Site Map]    [Search]    [Email Me]