ml-dsa key schemes: derive at a bip44 path, sign under a context, address by poseidon2 #14

Closed
opened 2026-09-15 12:37:34 +00:00 by grenade · 0 comments
Owner

Parent: #2

Scope

Implement wallet_core::KeyScheme and Signer for ML-DSA-65 and ML-DSA-87 in wallet-data on qp-rusty-crystals-dilithium and qp-rusty-crystals-hdwallet (both parameter-set features). Derivation from a BIP39 seed at m/44'/189189'/account'/change'/index', all hardened. Account id is qp_poseidon_core::hash_bytes(public_key); the ss58 encoding takes the prefix from the chain profile, not a constant. The signer holds its secret in a zeroizing container and redacts Debug.

Test vectors: the dev accounts (crystal_alice and friends) and the ML-DSA-65/87 cases in the common fork's util-crypto tests (m/44'/189189'/0'/0'/1' is 65, .../0'/0'/0' is 87).

Acceptance

For each scheme, the derived address matches quantus-cli for the same mnemonic and path, and a signature over a fixed message under QUANTUS_EXTRINSIC verifies with qp-dilithium-crypto's verify function and fails under the empty context.

Depends on

Nothing in this repo.

Parent: #2 ## Scope Implement `wallet_core::KeyScheme` and `Signer` for ML-DSA-65 and ML-DSA-87 in `wallet-data` on `qp-rusty-crystals-dilithium` and `qp-rusty-crystals-hdwallet` (both parameter-set features). Derivation from a BIP39 seed at `m/44'/189189'/account'/change'/index'`, all hardened. Account id is `qp_poseidon_core::hash_bytes(public_key)`; the ss58 encoding takes the prefix from the chain profile, not a constant. The signer holds its secret in a zeroizing container and redacts `Debug`. Test vectors: the dev accounts (`crystal_alice` and friends) and the ML-DSA-65/87 cases in the `common` fork's util-crypto tests (`m/44'/189189'/0'/0'/1'` is 65, `.../0'/0'/0'` is 87). ## Acceptance For each scheme, the derived address matches quantus-cli for the same mnemonic and path, and a signature over a fixed message under `QUANTUS_EXTRINSIC` verifies with `qp-dilithium-crypto`'s verify function and fails under the empty context. ## Depends on Nothing in this repo.
grenade added the child label 2026-09-15 12:38:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blackbeard/wallet#14