--- id: libnacl version: "2.1.0" license: Apache-2.0 license_treatment: permissive maintenance: aging --- # libnacl — Python bindings for libsodium based on ctypes License: permissive · Maintenance: aging · Downloads: 231.6K/mo ## 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 above — verify before relying. Python bindings to libsodium's NaCl cryptography library, providing both low-level ctypes access and high-level encryption classes for authenticated encryption, signing, and key exchange. 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 pip install libnacl uv add libnacl poetry add libnacl ## Installing libnacl 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. 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() libsodium must be installed and available on your system; libnacl is a ctypes wrapper and does not bundle or compile the underlying C library. 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 - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 231.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags libsodium python bindings, nacl cryptography library, authenticated encryption python, public key cryptography, digital signatures python, key exchange protocol, ctypes crypto bindings, cryptography, libsodium, ctypes-binding [View on SkillFed](https://skillfed.io/packages/libnacl) · [View on PyPI](https://pypi.org/project/libnacl/)