$npx skillfedfor your agent

libnacl

Python bindings for libsodium based on ctypes

With conditionsPyPI CryptographyReleased Aug 2023231.6K downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — libnacl-2.1.0-py3-none-any.whl
v2.1.0 · released 2023-08-06 · Python >=3.4,<4.0

Yes, if you need NaCl cryptography and libsodium is already available on your system. The package is stable, has no Python dependencies, and offers both low-level and high-level APIs. However, the aging maintenance status (last release 2023, infrequent commits) means you should verify that libsodium availability and the package's feature set meet your needs before adopting it for new projects; consider whether a more actively maintained alternative better suits your timeline.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • libsodium must be installed and available on your system; libnacl is a ctypes wrapper and does not bundle or compile the underlying C library.
  • Low friction install with no Python runtime dependencies; the package requires libsodium to be available on the system but does not compile itself.
  • Last release was in 2023, and the repository remains active with a recent commit in 2026, though the project is aging without frequent updates.

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 is a permissive license that allows commercial use, modification, and distribution with minimal restrictions; you may use this package in proprietary projects provided you include a copy of the license.

last release 2023-08-06 (1104 days) · last repo commit 2026-01-13 · 84 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 231,587 downloads/mo, #9,083 on PyPI

Verify before relying

pip install libnacl

import libnacl
import libnacl.utils

# Generate a keypair for public-key encryption
pk, sk = libnacl.utils.salsa_key()

# Or use high-level classes
from libnacl.public import SecretKey
secret_key = SecretKey()
  • Whether libsodium is typically pre-installed on major OS distributions or requires separate installation steps.
  • Current maintenance cadence and whether the aging status reflects intentional stability or lack of active development.
  • Performance characteristics compared to other libsodium bindings for Python.
Same gist for agents: .md · .json

What it is and what it does

Libnacl is a Python wrapper around libsodium (Daniel J. Bernstein's NaCl cryptography library) that exposes both low-level ctypes bindings and high-level Pythonic encryption classes. It provides authenticated encryption, digital signatures, key exchange, and other cryptographic primitives without requiring compilation of the binding itself—only libsodium must be present on the system.

The package is designed for portability and ease of distribution; a single binding file can be embedded directly into projects. It supports Python 3.4 through 3.11 and is classified as production-stable. The library has no Python runtime dependencies, making it lightweight to install, though you must have libsodium available as a system library.

Use it for

  • Building encrypted messaging systems with authenticated encryption (SecretBox) for confidentiality and integrity.
  • Implementing digital signature verification for message authentication and non-repudiation.
  • Establishing secure key exchange between parties using public-key cryptography primitives.
  • Embedding cryptographic bindings directly into standalone Python applications without external package dependencies.
  • Prototyping or deploying cryptographic protocols that require low-level access to NaCl functions.

Worth the install?

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

With conditions

Yes, if you need NaCl cryptography and libsodium is already available on your system.

The package is stable, has no Python dependencies, and offers both low-level and high-level APIs. However, the aging maintenance status (last release 2023, infrequent commits) means you should verify that libsodium availability and the package's feature set meet your needs before adopting it for new projects; consider whether a more actively maintained alternative better suits your timeline.

Install

libnacl on PyPI

Before you install

Low friction install with no Python runtime dependencies; the package requires libsodium to be available on the system but does not compile itself. Last release was in 2023, and the repository remains active with a recent commit in 2026, though the project is aging without frequent updates.

libsodium must be installed and available on your system; libnacl is a ctypes wrapper and does not bundle or compile the underlying C library.

License in practice

Apache-2.0 is a permissive license that allows commercial use, modification, and distribution with minimal restrictions; you may use this package in proprietary projects provided you include a copy of the license.

Quickstart

pip install libnacl

import libnacl
import libnacl.utils

# Generate a keypair for public-key encryption
pk, sk = libnacl.utils.salsa_key()

# Or use high-level classes
from libnacl.public import SecretKey
secret_key = SecretKey()

Verify before relying

  • Whether libsodium is typically pre-installed on major OS distributions or requires separate installation steps.
  • Current maintenance cadence and whether the aging status reflects intentional stability or lack of active development.
  • Performance characteristics compared to other libsodium bindings for Python.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.4,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 1,104 days since the last release
Last repo commit
First released
Downloads231,587 / month, #9,083 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Security :: Cryptography

Evidence: libnacl-2.1.0-py3-none-any.whl

Tags

Capabilities
libsodium python bindingsnacl cryptography libraryauthenticated encryption pythonpublic key cryptographydigital signatures pythonkey exchange protocolctypes crypto bindings
Topics
cryptographylibsodiumctypes-binding

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 bindings”

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

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

More Cryptography packages

certifi Worth it
PyPI · Cryptography · released Jul 2026

Certifi provides Mozilla's curated collection of root SSL certificates for Python applications to validate TLS hosts and verify certificate trustworthiness.

MPL-2.0pure Python · 3.7+
1.9Bdownloads / mo
cryptography Worth it
PyPI · Cryptography · released Jul 2026

cryptography provides cryptographic recipes and low-level primitives for symmetric encryption, message digests, key derivation, and other common cryptographic algorithms in Python.

Apache-2.0 OR BSD-3-Clausecompiled wheel
1.5Bdownloads / mo
rsa Skip
PyPI · Cryptography · released Apr 2025

Pure-Python RSA encryption, decryption, signing, and key generation following PKCS#1 v1.5, with command-line and library interfaces.

Apache-2.0pure Pythonabandoned
299.6Mdownloads / mo
pyOpenSSL With conditions
PyPI · Python Modules · released Aug 2026

pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.

Apache-2.0pure Python · 3.9+
294.2Mdownloads / mo
azure-identity Worth it
PyPI · Cryptography · released Mar 2026

Provides Microsoft Entra ID token-based authentication for Azure SDK clients through a set of TokenCredential implementations that handle OAuth flows and managed identity support.

license unclearpure Python · 3.9+
247.2Mdownloads / mo
PyNaCl Worth it
PyPI · Cryptography · released Jan 2026

PyNaCl provides Python bindings to libsodium for digital signatures, secret-key and public-key encryption, hashing, message authentication, and password-based key derivation.

Apache-2.0compiled wheel · 3.8+
246.6Mdownloads / mo

See also pysodium · pure25519 · securesystemslib · endesive · fernet · gmssl · PGPy13 · libthumbor