x25519
A pure Python implemention of curve25519
What it is and what it does
x25519 is a pure Python implementation of the curve25519 elliptic curve cryptography operations, providing scalar multiplication functions for key exchange. It exposes two main operations: scalar_base_mult() to derive a public key from a private key, and scalar_mult() to compute a shared secret from a private key and peer's public key. Both functions work with 32-byte binary inputs and outputs.
The package has no runtime dependencies and installs as a pure Python wheel, making it portable across platforms. However, it is explicitly slower than C-based implementations like pysodium, as noted in its own documentation. The project has been inactive since its single release in October 2021 and is no longer maintained.
Use it for:
- Educational exploration of curve25519 cryptography without compiled dependencies.
- Prototyping key exchange protocols in environments where C libraries cannot be compiled.
- Implementing ECDH in pure-Python environments where pysodium or libsodium are unavailable.
- Testing or auditing curve25519 behavior against reference implementations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides pure Python implementations of curve25519 scalar multiplication operations for Elliptic Curve Diffie-Hellman key exchange and shared secret derivation.
No. The package is abandoned (last release 2021-10-24, no maintenance since), and the author explicitly recommends C implementations like pysodium for actual use. Install only if you need pure Python for educational purposes or an environment where compiled dependencies are impossible; otherwise, use a maintained cryptographic library.
Install
x25519 on PyPI
pip
pip install x25519uv
uv add x25519poetry
poetry add x25519Installing x25519
Before you install
Installation is frictionless (pure Python wheel, no dependencies), but the package has been abandoned since its only release on 2021-10-24 with no subsequent maintenance or updates.
License in practice
Public domain dedication means no license restrictions apply; you may use, modify, and distribute freely without attribution or other obligations.
Quickstart
from binascii import hexlify
import x25519
private_key = b'1' * 32
public_key = x25519.scalar_base_mult(private_key)
print(hexlify(public_key))
Verify before relying
- Whether the pure Python implementation is cryptographically constant-time and resistant to side-channel attacks.
- Performance characteristics compared to C-based alternatives like pysodium for production use.
- Whether Python 2 support claim remains valid or if Python 3 only is now required.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,755 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 301,973/month — #7,828 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: x25519-0.0.2-py3-none-any.whl
Tags
More Cryptography packages
Certifi provides Mozilla's curated collection…
copyleft · top 100 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
rsaPure-Python RSA encryption, decryption,…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
azure-identityProvides Microsoft Entra ID token-based…
unclear · top 1,000 on PyPI
PyNaClPyNaCl provides Python bindings to libsodium…
permissive · top 1,000 on PyPI
eciespyEncrypts and decrypts data using Elliptic Curve…
permissive · top 15,000 on PyPI
eth-keysProvides a unified API for Ethereum key…
permissive · top 5,000 on PyPI
pure25519Pure-Python implementation of Curve25519 and…
permissive · top 15,000 on PyPI
starkbank-ecdsaPure Python ECDSA implementation supporting…
permissive · top 5,000 on PyPI
fastecdsaProvides fast elliptic curve digital signature…
permissive · top 15,000 on PyPI
diffiehellmanlibGenerates Diffie-Hellman key exchange…
permissive · top 15,000 on PyPI
sslcryptoProvides AES, ECIES, and ECDSA cryptographic…
unclear · top 15,000 on PyPI
py-sr25519-bindingsProvides Python bindings to the sr25519 Rust…
permissive · top 15,000 on PyPI
py-eccImplements elliptic curve cryptography…
permissive · top 5,000 on PyPI
py_arkworks_bls12381Python bindings for BLS12-381 elliptic curve…
permissive · top 15,000 on PyPI