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

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

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

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]