Skip to content

Add cap-0084 ML-DSA sig verification host functions#1946

Open
jayz22 wants to merge 1 commit into
stellar:masterfrom
jayz22:cap-0084-ml-dsa
Open

Add cap-0084 ML-DSA sig verification host functions#1946
jayz22 wants to merge 1 commit into
stellar:masterfrom
jayz22:cap-0084-ml-dsa

Conversation

@jayz22

@jayz22 jayz22 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Copilot AI review requested due to automatic review settings June 8, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new draft Core Advancement Proposal (CAP-0084) describing Soroban host functions for verifying ML-DSA (FIPS 204) signatures, and registers the CAP in the core CAP index.

Changes:

  • Adds a new draft CAP document (core/cap-0084.md) specifying three ML-DSA verification host functions and associated metering/XDR updates.
  • Updates core/README.md to list CAP-0084 under Draft Proposals.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
core/README.md Adds CAP-0084 to the Draft Proposals index table.
core/cap-0084.md Introduces a new CAP draft specifying ML-DSA signature verification host functions and related cost-type additions.

Comment thread core/cap-0084.md
Comment on lines +10 to +13
Status: Draft
Created: 2026-06-05
Discussion: TBD
Protocol version: TBD
Comment thread core/cap-0084.md
Comment on lines +239 to +242
Length errors are reported as `Object`/`UnexpectedSize`; the remaining
conditions are reported as `Crypto`/`InvalidInput`. As with the existing
signature verification host functions, a failed verification traps rather
than returning a boolean (see [Design Rationale](#design-rationale)).
Comment thread core/cap-0084.md
Comment on lines +346 to +349
A context string longer than 255 bytes traps with a distinct error rather
than failing verification: an over-long context is necessarily a contract
bug, and silently failing verification would misattribute it to a bad
signature.
Comment thread core/cap-0084.md
{ "name": "context", "type": "BytesObject" }
],
"return": "Void",
"docs": "Verifies an ML-DSA-44 (FIPS 204) signature using the external interface ML-DSA.Verify. `public_key` must be a 1312-byte encoded verifying key, `signature` a 2420-byte encoded signature, and `context` a domain-separation string of 0-255 bytes (pass empty bytes if unused). Traps with Crypto/InvalidInput if the signature is malformed or verification fails.",
Comment thread core/cap-0084.md
{ "name": "context", "type": "BytesObject" }
],
"return": "Void",
"docs": "Verifies an ML-DSA-65 (FIPS 204) signature using the external interface ML-DSA.Verify. `public_key` must be a 1952-byte encoded verifying key, `signature` a 3309-byte encoded signature, and `context` a domain-separation string of 0-255 bytes (pass empty bytes if unused). Traps with Crypto/InvalidInput if the signature is malformed or verification fails.",
Comment thread core/cap-0084.md
{ "name": "context", "type": "BytesObject" }
],
"return": "Void",
"docs": "Verifies an ML-DSA-87 (FIPS 204) signature using the external interface ML-DSA.Verify. `public_key` must be a 2592-byte encoded verifying key, `signature` a 4627-byte encoded signature, and `context` a domain-separation string of 0-255 bytes (pass empty bytes if unused). Traps with Crypto/InvalidInput if the signature is malformed or verification fails.",
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.

2 participants