Skip to content

SLH-DSA SHA2: 1.32–1.43× sign/verify speedup - #708

Open
leonacostaok wants to merge 1 commit into
cloudflare:mainfrom
leonacostaok:perf/slhdsa-sha2-prefix
Open

leonacostaok wants to merge 1 commit into
cloudflare:mainfrom
leonacostaok:perf/slhdsa-sha2-prefix

Conversation

@leonacostaok

@leonacostaok leonacostaok commented Oct 12, 2026 •

Copy link
Copy Markdown

Save the padded SLH-DSA public-seed SHA-2 state once per operation and restore it for subsequent F/H/T hashes. Clear saved state and scratch when the operation ends.

M1 Pro measurements including setup show 1.32–1.37× signing and 1.32–1.42× verification for SHA2 sets; the unchanged SHAKE control stays near parity.

Tests and measurements · Ten fresh keys

@leonacostaok
leonacostaok marked this pull request as ready for review October 12, 2026 03:03

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Signed-off-by: Leon Acosta <leon@quantakrypto.com>
@leonacostaok
leonacostaok force-pushed the perf/slhdsa-sha2-prefix branch from d3f651b to 1c31496 Compare October 12, 2026 03:07
@leonacostaok leonacostaok changed the title slhdsa: reuse SHA-2 public-seed prefix states SLH-DSA SHA2: 1.32–1.43× sign/verify speedup on M1 Pro Oct 12, 2026
@leonacostaok leonacostaok changed the title SLH-DSA SHA2: 1.32–1.43× sign/verify speedup on M1 Pro SLH-DSA SHA2: 1.32–1.43× sign/verify speedup Oct 12, 2026
@cjpatton

cjpatton commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Sorry for the delay in reviewing here. We appreciate the contribution, but we our bandwidth for reviewing optimizations is limited at the moment.

To help us prioritize, let us know if you have a specific use case in mind for this code and whether review is a blocker. Note that SLH-DSA implementations are widely available, but if for some reason CIRCL is convenient for you, but performance is a problem, we can try and make this happen.

@leonacostaok

Copy link
Copy Markdown
Author

@cjpatton, thanks for taking a look. this came out of comparative pqc performance research across several libraries, rather than a circl-specific production requirement. review isn’t blocking us; the aim is to contribute the measured improvements upstream. happy to leave this open until you have bandwidth

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