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

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

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

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]