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

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

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

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 Copyright ©
Roland Stolfa, 2012
All Rights Reserved
  [Home]    [Downloads]    [Downsizing]    [Writings]    [Crafts]    [Living]    [Family]    [Toys]    [Cryptography]    [Fun Links]    [Site Credits]    [Personal Info]    [Privacy]    [Site Map]    [Search]    [Email Me]