{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

two_time_pad

two_time_pad - Help with the two-time pad This web page has...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Help with the two-time pad This web page has information about the two-time pad example. To make things somewhat easier for you, we have created a worked example and a decryption program for the two-time pad. In this example, we are given two files, demo1.bin and demo2.bin. Both of these files were encrypted with the one-time pad demo.key. We have provided a C++ program called one-time-pad-vrfy.cc. You may or may not find it useful in doing Problem 2-1 on the homework. This program can be compiled on a Unix computer with this command: % g++ -o one-time-pad-vrfy one-time-pad-vrfy.cc Once you have compiled it, you can run it on both examples: demo1.bin Output (128 bytes): In some situations it is acceptable for the same identifier to be used by different people; other applications require unique id Output in hex: 49 6e 20 73 6f 6d 65 20 73 69 74 75 61 74 69 6f 6e 73 20 69 74 20 69 73 20 61 63 63 65 70 74 61 62 6c 65 20 66 6f 72 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 66 69 65 72 20 74 6f 20 62 65 20 75 73 65 64 20 62 79 20 64 69 66 66 65 72 65 6e 74 20 70 65 6f 70 6c 65 3b 20 6f 74 68 65 72 20 61 70 70 6c 69 63 61 74 69 6f 6e 73 20 72 65 71 75 69 72 65 20 75 6e 69 71 75 65 20 69 64 Many people find octal easier than hex. Here is the output in octal: 111 156 040 163 157 155 145 040 163 151 164 165 141 164 151 157 156 163 040 151 164 040 151 163 040 141 143 143 145 160 164 141 142 154 145 040 146 157 162 040 164 150 145 040 163 141 155 145 040 151 144 145 156 164 151 146 151 145 162 040 164 157 040 142 145 040 165 163 145 144 040 142 171 040 144 151 146 146 145 162 145 156 164 040 160 145 157 160 154 145 073 040 157 164 150 145 162 040 141 160 160 154 151 143 141 164 151 157 156 163 040 162 145 161 165 151 162 145
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}