skillfed

x25519

A pure Python implemention of curve25519

x25519 v0.0.2 302.0K downloads/30d#7,828 on PyPI4
Permissive license Abandoned released

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 x25519

uv

uv add x25519

poetry

poetry add x25519

Installing 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

License :: Public DomainOperating System :: OS IndependentProgramming Language :: Python

Tags

curve25519 python implementationelliptic curve key exchangex25519 scalar multiplicationecdh key agreementcryptographic key derivation
elliptic-curvekey-exchangeabandoned

More Cryptography packages