Welcome to Redline spacer spacer
One Time Pad
bar Dec 17, 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:

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

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

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]