Registry / auth-security / pure25519

pure25519

JSON →
library0.0.1pypypi✓ verified 86d ago

Pure-Python implementation of Curve25519 and Ed25519 cryptographic routines. Current version is 0.0.1, with no recent releases. Provides low-level functions for DH key exchange (Curve25519) and digital signatures (Ed25519). It is a reference implementation not recommended for production use due to lack of constant-time security.

pip install pure25519
INSTALL
IMPORT
SIG · PURE25519
P
pure25519
auth-securitypythonv0.0.1
Install
2.5s avg
Import
10ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.010s · 19.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.5s · import 0.010s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dh_start
from pure25519.dh import dh_start
Correct import for Diffie-Hellman functions.
SigningKey
from pure25519.ed25519 import SigningKey
Correct import for Ed25519 signing.
VerifyingKey
from pure25519.ed25519 import VerifyingKey
Correct import for Ed25519 verification.

Generate an Ed25519 key pair, sign a message, and verify the signature.

from pure25519.ed25519 import SigningKey, VerifyingKey sk = SigningKey.generate() vk = sk.get_verifying_key() message = b"test message" signature = sk.sign(message) assert vk.verify(signature, message) print("Ed25519 signature roundtrip OK")
Debug
Known issues
gotchaThis is a pure-python implementation intended for educational/reference purposes. It does NOT implement constant-time operations and is vulnerable to timing side-channel attacks. Do not use in production.
fix
Use a production-grade library like PyNaCl or cryptography.
affects: all
deprecatedThe library is essentially unmaintained (last release 2014). Issues may never be fixed.
fix
Consider migrating to a maintained library such as PyNaCl or ed25519.
affects: >=0.0.1
gotchaThe ed25519 module uses a custom key object, not the standard bytes interface. Signing with bytes directly will fail.
fix
Always use SigningKey.generate() or SigningKey.from_seed() to create keys.
affects: all
Errors
Common errors & fixes
cannot import name 'dh_start' from 'pure25519'
Incorrect import path; pure25519 has submodules 'dh' and 'ed25519'.
fix
Use 'from pure25519.dh import dh_start'.
AttributeError: 'bytes' object has no attribute 'sign'
Attempting to sign a message by calling .sign() on the message bytes instead of on a SigningKey object.
fix
Use 'signature = sk.sign(message)' where sk is a SigningKey instance.
TypeError: expected 32 bytes, got 64
Incorrect seed length for SigningKey.from_seed(). Seed must be exactly 32 bytes.
fix
Ensure the seed is 32 bytes long.
Upgrade
Version history
0.0.1latest on PyPI · released Jan 17, 2018
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
pure25519 — pip install pure25519 · libregistry