Welcome to Redline spacer spacer
One Time Pad
bar Jul 22, 2019
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:

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

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

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]