I am currently working on a project using python to implement p2p communication between two (or more) computers. Although I am pretty proficient with python, I am by no means an expert; programming and encryption are by no means my profession, simply a hobby. However, in working on this project I have been attempting to learn more about encryption as well as network programming.
As of right now I have written a pretty powerful class that communicates well over a network and I am trying to improve it by implementing RSA to encrypt the connections between peers on the network; this is where I've run into some difficulty.
I have previously used pycrypto to do some basic encryption/decryption in python and am thus-far quite comfortable with all of the tools involved -- including the necessary public-key ciphers. Moreover, I am also aware that pycrypto has some shortcomings, in the fact that it only implements the bare-bones, low level encryption/decryption algorithms needed to implement RSA and does not implement a full protocol for public-key encryption. I also know that pycrypto contains some other useful tools such as an AllOrNothing transform which can be used for padding the communication, etc. However, my question is: can anyone recommend any online articles, books, blog posts, projects, etc. which can help me in my quest to implement an effective RSA protocol?
Lastly, I understand that this is a touchy subject with cryptologists in that amateur-implemented protocols usually mean less security in the program. As I noted above, this project is a mere learning experience; if I was completing this project professionally I would surely use M2Crypto or some other professionally-implemented, secure protocol -- i.e. SSL/TLS. Alas, I am merely trying to learn more about encryption by implementing my own model of a proven protocol to create a secure connection between two peers.
Thanks, Kevin
Take a look at Raymond Hettinger recipe: Public Key Encryption (RSA)
Why not take a look at my pure-Python RSA library? It may be just what you need: http://stuvel.eu/rsa
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With