Hacking Secret Ciphers with Python

(Ann) #1

378 http://inventwithpython.com/hacking


Email questions to the author: [email protected]


PUBLIC KEY CRYPTOGRAPHY


AND THE RSA CIPHER


Topics Covered In This Chapter:
 Public key cryptography
 Man-in-the-middle attacks
 ASCII
 The chr() and ord() functions
 The bytes data type and bytes() function
 The encode() string and decode() bytes method
 The min() and max() functions
 The insert() list method
 The pow() function


“Why shouldn’t I work for the NSA? That’s a tough one, but I’ll take a
shot. Say I’m working at the NSA and somebody puts a code on my desk,
something no one else can break. Maybe I take a shot at it, and maybe I
break it. I’m real happy with myself, ‘cause I did my job well. But maybe
that code was the location of some rebel army in North Africa or the
Middle East and once they have that location they bomb the village where
the rebels are hiding. Fifteen hundred people that I never met, never had
no problem with, get killed.
Free download pdf