CHAPTER 9Mastering Cryptography Using Python
The time has come to put all you have learned into action; you should now understand the concepts you need to secure communications between two parties. The chapter will focus on building an application that can send messages in plaintext, or encrypted using asymmetric public key infrastructure (PKI) and using the symmetric key method with an Elliptic Curve Diffie-Hellman key exchange. Implementing these techniques between two applications over an insecure UDP connection will help you think through how to send messages securely and ensure that they have not been tampered with. We will use Wireshark, a popular network analyzer, to verify that the messages are encrypted and cannot be distinguished from random noise. We will highlight using AES (Advanced Encryption Standard) in Counter (CTR) and Galouis/Counter (GCM) modes. We covered CTR in Chapter 5, and while the implementation of GCM is quite similar, it requires some special consideration as we design our encryption protocol. Our first task will be to build a small working application for plaintext communications, then adding the other cryptographic components to the mix. Throughout this chapter, you gain cryptographic experience as you:
- Construct an application that communicates in plaintext
- Install Wireshark and examine the communication traffic
- Implement a PKI into the application
- Implement RSA Digital Certificates
- Encrypt the message using ECC
- Implement the Elliptic Curve ...
Get Implementing Cryptography Using Python now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.