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

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

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

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]