Welcome to Redline spacer spacer
One Time Pad
bar Sep 23, 2018
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:

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

To receive a coded message, you would then simply reverse the process. As the decoder, your one time pad doesn't have 99 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 365 )

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]