Technical requirements
Before you start reading this chapter, you should know the basics of Python programming and have some basic knowledge of HTTP. We will work with Python version 3.10, available at www.python.org/downloads.
The examples and source code for this chapter are available in the GitHub repository at https://github.com/PacktPublishing/Python-for-Security-and-Networking.
Check out the following video to see the Code in Action: https://packt.link/Chapter14.
Introduction to cryptography
Cryptography is a branch of mathematics responsible for safeguarding information exchange between communicating parties and includes techniques for message integrity checking, sender/receiver identity authentication, and digital signatures. It directly supports the Confidentiality element of the CIA triad, a core model of information security.
Here are four common cryptography algorithms:
- Hash functions: Also known as one-way encryption, a hash function outputs...