Skip to main content

HDEd25519

Hierarchical Deterministic (HD) Ed25519 derivation using pynacl

Requirements

python>=3.6
pynacl>=1.4.0 # For https://github.com/pyca/pynacl/commit/0e2ae90ac8bdc8f3cddf04d58a71da68678e6816

Usage

from HDEd25519_nacl import BIP32Ed25519

mnemonic = "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"
((kL, kR), A, c) = BIP32Ed25519.derive_mnemonic("42'/1/2", test_mnemonic)
# (kL, kR) is a private key, A is a public key associated with kL, c is the chaincode

Reference

"BIP32-Ed25519 Hierarchical Deterministic Keys over a Non-linear Keyspace" paper from Dmitry Khovratovich and Jason Law https://github.com/WebOfTrustInfo/rwot3-sf/blob/25271ade6407bee069c9db05d15c209daed3cf81/topics-and-advance-readings/HDKeys-Ed25519.pdf

This file updates https://github.com/LedgerHQ/orakolo/blob/master/src/python/orakolo/HDEd25519.py with code which is tested, typed and uses robust cryptography.

Test and Style

This file is formatted using "black --line-length=120"

To view code coverage:

pip install coverage
coverage run --source . --module HDEd25519_nacl
coverage report --show-missing
coverage html && open htmlcov/index.html

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

HDEd25519-0.0.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

HDEd25519-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file HDEd25519-0.0.2.tar.gz.

File metadata

  • Download URL: HDEd25519-0.0.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for HDEd25519-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0c382ce28c1a476d78df87405bbdcb932652bc3da0cd6c670fa6a74b6e659f62
MD5 cced54145f63b12e428e0558fb056e42
BLAKE2b-256 45ae2e87bee0bf88a8be5db3e0bf88fb3d183a951cc8143941ce7f7264e74409

See more details on using hashes here.

File details

Details for the file HDEd25519-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: HDEd25519-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for HDEd25519-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a817a7a8272649dc7c591395acefa2e3dc77eba03d777987765006d910975be
MD5 02933efb2670aca82fae984950da5468
BLAKE2b-256 e64c0f720ab6c6fe281a0ea04131c4fd0bce0d1e17b011d860ac439e53d97d93

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page