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

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

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

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]