bip32_kholaw_mst_key_generator
Module for BIP32 Khovratovich/Law master key generation. Reference: https://github.com/LedgerHQ/orakolo/blob/master/papers/Ed25519_BIP%20Final.pdf
- class Bip32KholawMstKeyGeneratorConst
Bases:
object
Class container for BIP32 Khovratovich/Law master key generator constants.
- SEED_MIN_BYTE_LEN: int = 16
- MASTER_KEY_HMAC_KEY: bytes = b'ed25519 seed'
- class Bip32KholawEd25519MstKeyGenerator
Bases:
IBip32MstKeyGenerator
BIP32 Khovratovich/Law ed25519 master key generator class. It allows master keys generation in according to BIP32 Khovratovich/Law for ed25519 curve.
- classmethod GenerateFromSeed(seed_bytes: bytes) Tuple[bytes, bytes]
Generate a master key from the specified seed.
- Parameters:
seed_bytes (bytes) – Seed bytes
- Returns:
Private key bytes (index 0) and chain code bytes (index 1)
- Return type:
tuple[bytes, bytes]
- Raises:
Bip32KeyError – If the seed is not suitable for master key generation
ValueError – If seed length is not valid