Cryptography in Python

4 projects in Security. Most starred: paramiko, cryptography and itsdangerous.

The cryptography package is the standard choice. It has two layers: high-level recipes such as Fernet for symmetric encryption that are hard to misuse, and a hazmat layer of low-level primitives for when you need a specific algorithm or protocol. PyNaCl binds libsodium and offers an opinionated, small API for authenticated encryption, public-key boxes and signatures, which reduces the number of choices you can get wrong.

Paramiko implements SSHv2 in Python for both clients and servers, and tools like Fabric build on it to run commands and transfer files over SSH. itsdangerous signs data such as cookies, tokens and links with HMAC so it can be passed through untrusted clients and verified later; it signs but does not encrypt, so the content stays readable. For random tokens, use the standard library's secrets module rather than random.

cryptography

A package designed to expose cryptographic primitives and recipes to Python developers.

7.8kupdated today

pynaclC core

Python binding to libsodium, a fork of the Networking and Cryptography (NaCl) library.

1.2kupdated 1d ago

paramiko

The leading native Python SSHv2 protocol library.

9.9kupdated 6d ago

itsdangerous

Safely pass trusted data to untrusted environments and back.

3.1kupdated 1y ago2.2.0
Esc

Type to search every entry. ↑↓ to move, Enter to open.