Skip to content

Conversation

@alinush
Copy link
Contributor

@alinush alinush commented Dec 11, 2025

Description

Builds on top of aptos-labs/aptos-core#18300 by adding support for creating post-quantum signatures (as per AIP-137).

Specifically, adds support for SLH-DSA-SHA2-128s:

  • key generation
  • signing & verification
  • (de)serialization
  • HD wallet key derivation (custom, non-standard SLIP-0010 "curve" parameter used)

Steps to confirm this works with an Aptos node

First, have Docker launched and set up a local net:

cargo run -p aptos -- node run-localnet --with-indexer-api --assume-yes --force-restart

Then, run the e2e TXN submission test:

pnpm test transactionSubmission.test.ts

Note

I have already ensured tests pass on a local net deployed from this modified aptos-core branch: aptos-labs/aptos-core#18300

Tasks

  • fix pnpm test / pnpm jest to work with @noble-post-quantum
  • manually confirm SLH DSA TXNs verify on the new aptos-core
  • manually confirm SLH DSA TXN do not verify on the old aptos-core
  • implement fromDerivationPath for the private key using "SLH-DSA-SHA2-128s seed" as the Curve parameter and n set to $2^{256}$, AFAICT.

Test Plan

  • unit tests
  • e2e tests against an Aptos full node

Checklist

  • Have you ran pnpm fmt?
  • Have you updated the CHANGELOG.md?

@alinush alinush force-pushed the alin/slh-dsa-sha2-128s-signatures branch 2 times, most recently from ec69441 to 66e01f9 Compare December 11, 2025 03:32
@alinush alinush changed the title initial commit for SLH-DSA-SHA2-128s add SLH-DSA-SHA2-128s signatures to TS SDK Dec 11, 2025
@alinush alinush requested review from 0xmaayan and banool December 11, 2025 18:04
@alinush alinush force-pushed the alin/slh-dsa-sha2-128s-signatures branch from 852a350 to bcfd2c6 Compare December 11, 2025 18:09
@alinush alinush force-pushed the alin/slh-dsa-sha2-128s-signatures branch from 26e50ed to 58a955a Compare December 11, 2025 23:57
@alinush alinush force-pushed the alin/slh-dsa-sha2-128s-signatures branch from 58a955a to 88834fc Compare December 12, 2025 19:59
Co-authored-by: Maayan <maayan@aptoslabs.com>
@alinush alinush force-pushed the alin/slh-dsa-sha2-128s-signatures branch from e3a7534 to 90b4b90 Compare December 12, 2025 20:46
Copy link
Contributor

@0xmaayan 0xmaayan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alinush alinush requested a review from 0xmaayan December 12, 2025 22:01
"@aptos-labs/aptos-client": "^2.1.0",
"@noble/curves": "^1.9.0",
"@noble/hashes": "^1.5.0",
"@noble/post-quantum": "^0.5.2",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an optional dependency. There have been multiple requests that our SDK is too big by default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we do that? Since if the AIP passes, enshrining this PQ scheme on Aptos, then the SDK would need to support it => this dependency needs to be in.

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.

4 participants