$npx skillfedfor your agent

pysodium

python libsodium wrapper

With conditionsPyPI SecurityReleased Aug 2024391.1K downloads / moBSDSource build

Decision gist · record as of 2026-08-14

sdist only — pysodium-0.7.18.tar.gz · builds from source
v0.7.18 · released 2024-08-07

Yes, if you have libsodium already installed or can install it on your system and need direct access to libsodium's cryptographic functions. The high install friction (external C dependency) and Beta status are real drawbacks, but the package is actively maintained, has no known vulnerabilities, and offers a permissive license. Consider it when you need low-level control over cryptographic primitives that higher-level libraries may not expose.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • libsodium must be pre-installed on the system; pysodium is a wrapper and cannot function without it.
  • Installation requires a pre-built libsodium library already present on the system, creating high friction for users unfamiliar with system-level dependency management.
  • The package is actively maintained with recent commits, but the external compiled dependency is a significant barrier.

License · maintenance · safety

BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects that can satisfy the system dependency requirement.

last release 2024-08-07 (737 days) · last repo commit 2026-03-25 · 137 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 391,117 downloads/mo, #7,018 on PyPI

Verify before relying

import pysodium

# Generate a keypair for public-key encryption
pk, sk = pysodium.crypto_box_keypair()

# Encrypt a message
nonce = pysodium.randombytes(pysodium.crypto_box_NONCEBYTES)
ciphertext = pysodium.crypto_box(b'hello', nonce, pk, sk)
  • Whether libsodium installation is straightforward on all major platforms (Windows, macOS, Linux).
  • Performance characteristics compared to pure-Python or alternative cryptography libraries.
  • Whether the package is suitable for production use given its Beta development status.
Same gist for agents: .md · .json

What it is and what it does

Pysodium exposes libsodium's cryptographic primitives to Python as a thin wrapper, providing direct access to authenticated encryption schemes (ChaCha20-Poly1305, AES-GCM variants), public-key cryptography (Curve25519), digital signatures (Ed25519), hashing (BLAKE2, SHA-512), and password hashing (Argon2, scrypt). It is designed for developers who want libsodium's battle-tested algorithms without the overhead of higher-level abstractions.

The package trades ease of use for directness: you work with raw bytes, manage nonces and keys yourself, and call low-level functions that map almost one-to-one to libsodium's C API. This makes it suitable for applications where you need fine-grained control over cryptographic operations, but it requires understanding the underlying primitives and their correct usage patterns.

Use it for

  • Encrypt and decrypt messages with authenticated encryption (ChaCha20-Poly1305, AES-GCM) for secure communication.
  • Perform Diffie-Hellman key exchange using Curve25519 to establish shared secrets between parties.
  • Sign and verify messages using Ed25519 for non-repudiation and authenticity verification.
  • Hash passwords with Argon2 or scrypt for secure credential storage.
  • Generate and verify message authentication codes (HMAC-SHA256/512) for data integrity.
  • Stream encryption with ChaCha20 for large data or streaming scenarios.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you have libsodium already installed or can install it on your system and need direct access to libsodium's cryptographic functions.

The high install friction (external C dependency) and Beta status are real drawbacks, but the package is actively maintained, has no known vulnerabilities, and offers a permissive license. Consider it when you need low-level control over cryptographic primitives that higher-level libraries may not expose.

Install

pysodium on PyPI

Before you install

Installation requires a pre-built libsodium library already present on the system, creating high friction for users unfamiliar with system-level dependency management. The package is actively maintained with recent commits, but the external compiled dependency is a significant barrier.

libsodium must be pre-installed on the system; pysodium is a wrapper and cannot function without it.

License in practice

BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most projects that can satisfy the system dependency requirement.

Quickstart

import pysodium

# Generate a keypair for public-key encryption
pk, sk = pysodium.crypto_box_keypair()

# Encrypt a message
nonce = pysodium.randombytes(pysodium.crypto_box_NONCEBYTES)
ciphertext = pysodium.crypto_box(b'hello', nonce, pk, sk)

Verify before relying

  • Whether libsodium installation is straightforward on all major platforms (Windows, macOS, Linux).
  • Performance characteristics compared to pure-Python or alternative cryptography libraries.
  • Whether the package is suitable for production use given its Beta development status.

Package facts

LicenseBSD permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceActively maintained 737 days since the last release
Last repo commit
First released
Downloads391,117 / month, #7,018 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaLicense :: OSI Approved :: BSD LicenseTopic :: SecurityTopic :: Security :: Cryptography

Evidence: pysodium-0.7.18.tar.gz

Tags

Capabilities
libsodium python wrapperauthenticated encryption pythonchacha20poly1305 pythonnacl cryptography librarycurve25519 key exchangeblake2 hashing pythonargon2 password hashing
Topics
cryptographysystem-dependencylow-level-api
PyPI keywords
cryptographyAPINaCllibsodium

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “libsodium python wrapper”

  • pysodiumPysodium is a Python wrapper around libsodium that provides access to…
  • libnaclPython bindings to libsodium's NaCl cryptography library, providing…
  • PyNaClPyNaCl provides Python bindings to libsodium for digital signatures,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Security packages

SecretStorage With conditions
PyPI · Python Modules · released Nov 2025

Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.

BSD-3-Clausepure Python · 3.10+aging
226.9Mdownloads / mo
msal Worth it
PyPI · Security · released May 2026

MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.

MITpure Python · 3.9+
223.0Mdownloads / mo
joserfc Worth it
PyPI · Security · released Jul 2026

joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.

BSD-3-Clausepure Python · 3.10+
155.5Mdownloads / mo
Authlib Worth it
PyPI · Security · released May 2026

Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.

BSD-3-Clausepure Python · 3.10+
155.1Mdownloads / mo
argon2-cffi-bindings With conditions
PyPI · Python Modules · released Jul 2025

Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.

MITcompiled wheel · 3.9+
74.2Mdownloads / mo
adal Skip
PyPI · Security · released Apr 2021

ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.

Install only if maintaining existing code that already depends on it, and plan a migration.

MITpure Pythonabandoned
44.5Mdownloads / mo

See also PyNaCl · libnacl · dilithium-py · eciespy · bcrypt · pyscrypt · keyrings.cryptfile · pycryptodomex · pwdlib · sslcrypto