{"id":23147,"library":"pure25519","title":"pure25519","description":"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.","status":"active","version":"0.0.1","language":"python","source_language":"en","source_url":"https://github.com/warner/python-pure25519","tags":["cryptography","curve25519","ed25519","pure-python","reference-implementation"],"install":[{"cmd":"pip install pure25519","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Correct import for Diffie-Hellman functions.","symbol":"dh_start","correct":"from pure25519.dh import dh_start"},{"note":"Correct import for Ed25519 signing.","symbol":"SigningKey","correct":"from pure25519.ed25519 import SigningKey"},{"note":"Correct import for Ed25519 verification.","symbol":"VerifyingKey","correct":"from pure25519.ed25519 import VerifyingKey"}],"quickstart":{"code":"from pure25519.ed25519 import SigningKey, VerifyingKey\n\nsk = SigningKey.generate()\nvk = sk.get_verifying_key()\nmessage = b\"test message\"\nsignature = sk.sign(message)\nassert vk.verify(signature, message)\nprint(\"Ed25519 signature roundtrip OK\")","lang":"python","description":"Generate an Ed25519 key pair, sign a message, and verify the signature."},"warnings":[{"fix":"Use a production-grade library like PyNaCl or cryptography.","message":"This 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.","severity":"gotcha","affected_versions":"all"},{"fix":"Consider migrating to a maintained library such as PyNaCl or ed25519.","message":"The library is essentially unmaintained (last release 2014). Issues may never be fixed.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Always use SigningKey.generate() or SigningKey.from_seed() to create keys.","message":"The ed25519 module uses a custom key object, not the standard bytes interface. Signing with bytes directly will fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from pure25519.dh import dh_start'.","cause":"Incorrect import path; pure25519 has submodules 'dh' and 'ed25519'.","error":"cannot import name 'dh_start' from 'pure25519'"},{"fix":"Use 'signature = sk.sign(message)' where sk is a SigningKey instance.","cause":"Attempting to sign a message by calling .sign() on the message bytes instead of on a SigningKey object.","error":"AttributeError: 'bytes' object has no attribute 'sign'"},{"fix":"Ensure the seed is 32 bytes long.","cause":"Incorrect seed length for SigningKey.from_seed(). Seed must be exactly 32 bytes.","error":"TypeError: expected 32 bytes, got 64"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}