"Three may keep a Secret, if two of them are dead."
– Benjamin Franklin, Poor Richard's Almanack
In this short chapter, I am going to give you a brief overview of the cryptographic services offered by the Python standard library. I am also going to touch upon something called JSON Web Token, which is a very interesting standard to represent claims securely between two parties.
In particular, we are going to explore the following:
- Hashlib
- Secrets
- HMAC
- JSON Web Tokens with PyJWT, which seems to be the most popular Python library for dealing with JWTs
Let's start by spending a moment talking about cryptography and why it is so important.