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

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 198 )

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]