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

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

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

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]