Hacking Secret Ciphers with Python

(Ann) #1

360 http://inventwithpython.com/hacking


Email questions to the author: [email protected]


This is why we don’t need to write a separate one-time pad cipher program. Our Vigenère cipher
program already does it!


Practice Exercises, Chapter 22, Set A


Practice exercises can be found at http://invpy.com/hackingpractice 22 A.


Summary


In short, a one-time pad is just the Vigenère cipher with a key that is the same length as the
message and is only used once. As long as these two conditions are followed, it is literally
impossible to break the one-time pad. However, it is so inconvenient to use the one-time pad that
it is not generally used except for the most top-secret of secrets. Usually a large list of one-time
pad keys are generated and shared in person, with the keys marked for specific dates. This way, if
you receive a message from your collaborator on October 31st, you can just look through the list
of one-time pads to find the one for that day. But be sure this list doesn’t fall into the wrong
hands!

Free download pdf