Welcome to Redline spacer spacer
One Time Pad
bar May 26, 2020
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:

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

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

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]