Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds Winternitz, XMSS and ML-DSA-44 authorization to Vector. Each has its own program and verifier adapter, using the existing transaction digest,
AdvanceandPassthroughflow.Winternitz and XMSS use the DKKW25 constructions in
solana-winternitz, with target-sum encoding and Keccak-256. This XMSS variant is not compatible with RFC 8391.Their 106-byte accounts separate a permanent identity from the current verification key:
Initialization sets
identity = sha256(initial_public_key). It remains the PDA seed and digest identity after rotation, so assets and downstream authorities keep the same address. To rotate:The signed digest commits to the replacement key and every action.
Rotatechanges only the stored key and uses the same PDA-signer authorization asWithdrawandClose. Rotation is optional and stays within the account's scheme. Callers manage key freshness, leaf allocation and persistent signing state; the program does not track spent keys or require a replacement to differ. Retaining control requires Winternitz callers to rotate in their one authorization and XMSS callers to rotate before exhaustion.Rotation and actions are atomic. A failed transaction restores the nonce and current key. Saved authorizations can be retried unchanged when the failure is resolved. A permanently failing action cannot be repaired by signing a different transaction with a spent Winternitz key; this PR does not introduce a separate recovery authorization.
ML-DSA-44 uses
solana-ml-dsawith SHAKE128/256 and an empty FIPS 204 context. The message is Vector's 32-byte transaction digest. Its 21,892-byte account stores:Following Falcon's approach, the program prepares the key once on chain. Registration is
Initializefollowed by two permissionlessExpandinstructions, each growing the account by at most 10,240 bytes. Account length records progress;Advancerejects incomplete accounts. Registration takes about 1.1M CU and verification about 264K CU in local tests. Registration and authorization require V1 transactions; callers provide the transaction limits and submission.The Rust and TypeScript SDKs provide scheme descriptors and instruction builders. Rust ML-DSA signing uses an external signer; TypeScript uses Noble's
ml_dsa44. Both expose offline verification. Passthrough builders also preserve external co-signers while clearing only the PDA's outer signer flag.Validation: ML-DSA SBF build, 42 Rust tests, 14 offline TypeScript tests, TypeScript compilation and Clippy. Coverage includes full-transaction registration, incomplete-account rejection, external signatures, context mismatch, replay, Rust/TypeScript digest parity, SPL authority handoff, and rotation rollback followed by an unchanged retry. Checked against
solana-ml-dsaat75a5b38andsolana-winternitzatd6c381a. Live-cluster validation remains outstanding.