| Crates.io | qp-rusty-crystals-hdwallet |
| lib.rs | qp-rusty-crystals-hdwallet |
| version | 1.0.0 |
| created_at | 2025-09-06 01:50:36.169201+00 |
| updated_at | 2025-11-06 06:04:20.28218+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 | 538,015 |
Hierarchical Deterministic (HD) wallet implementation for post-quantum ML-DSA keys, compatible with BIP-32, BIP-39, and BIP-44 standards.
purpose', coin_type', account'; later levels optionalWe use 44 for purpose, 189189 for coin type (Quantus), and account index for account Example: "m/44'/189189'/{account_index}'/0/0"
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'/189189'/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'/189189'/0'/0'/0' - First address of first accountm/44'/189189'/1'/0'/0' - First address of second accountm/44'/189189'/0'/1'/0' - First change addressNote: For security, the first three indices must be hardened (purpose', coin_type', account'). Subsequent indices (change, address_index) may be unhardened.
Non-hardened key derivation relies on elliptic curve properties not present in lattice-based cryptography. For security, this implementation requires hardened derivation for the first three indices and permits flexibility for deeper levels.
cargo test
GPL-3.0 - See LICENSE for details.