Crates.io | qp-rusty-crystals-hdwallet |
lib.rs | qp-rusty-crystals-hdwallet |
version | 0.1.4 |
created_at | 2025-09-06 01:50:36.169201+00 |
updated_at | 2025-09-25 00:07:29.028263+00 |
description | Pure Quantus RUST implementation of HD wallet functionality with post-quantum cryptography |
homepage | https://www.quantus.com |
repository | https://github.com/Quantus-Network/qp-rusty-crystals |
max_upload_size | |
id | 1826635 |
size | 535,554 |
Hierarchical Deterministic (HD) wallet implementation for post-quantum ML-DSA keys, compatible with BIP-32, BIP-39, and BIP-44 standards.
Add to your Cargo.toml
:
[dependencies]
qp-rusty-crystals-hdwallet = "0.0.2"
qp-rusty-crystals-dilithium = "0.0.2"
use qp_rusty_crystals_hdwallet::{generate_mnemonic, HDLattice};
// Generate a new mnemonic
let mnemonic = generate_mnemonic(24)?;
println!("Mnemonic: {}", mnemonic);
// Create HD wallet from mnemonic
let hd_wallet = HDLattice::from_mnemonic(&mnemonic, None)?;
// Generate master keys
let master_keys = hd_wallet.generate_keys();
// Derive child keys using BIP-44 path
let child_keys = hd_wallet.generate_derived_keys("44'/0'/0'/0'/0'")?;
// Sign with derived keys
let message = b"Hello, quantum-safe wallet!";
let signature = child_keys.sign(message);
Standard BIP-44 derivation paths are supported:
m / purpose' / coin_type' / account' / change' / address_index'
Example paths:
m/44'/0'/0'/0'/0'
- First address of first accountm/44'/0'/1'/0'/0'
- First address of second accountm/44'/0'/0'/1'/0'
- First change addressNote: Only hardened derivation ('
) is supported for security reasons.
Non-hardened key derivation relies on elliptic curve properties not present in lattice-based cryptography. For security, this implementation only supports hardened derivation paths.
cargo test
GPL-3.0 - See LICENSE for details.