Skip to content

Clarify the AIP-137 compact key format and feature flag - #678

Open
solanaqubits wants to merge 1 commit into
aptos-foundation:mainfrom
solanaqubits:docs/aip-137-key-format
Open

solanaqubits wants to merge 1 commit into
aptos-foundation:mainfrom
solanaqubits:docs/aip-137-key-format

Conversation

@solanaqubits

Copy link
Copy Markdown

The 48-byte secret key section suggests FIPS 205 defines a 32-byte secret key. For SHA2-128s, the full FIPS key is 64 bytes and the public key is 32 bytes. Aptos serializes the three 16-byte seeds and reconstructs the root on import. The updated text explains which bytes a compact backup must retain and why the hardware-wallet table lists 64 bytes. It also fills in the existing feature-flag TODO.

I checked the layouts against FIPS 205, §3.1 and Algorithm 18 and the linked Aptos codec. As a cross-check, I replayed the public signature vector from aptos-labs/aptos-core#21156 at 72937f12977d7e20d04f5910f8d7bb218449b244 with Cloudflare CIRCL v1.6.5. The three seeds regenerated the expected public key. The published signature verified, and deterministic signing reproduced all 7,856 bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant