Skip to content

[otbn,top] Add Top-level-test for OTBN-KMAC interface#30385

Merged
nasahlpa merged 2 commits into
lowRISC:masterfrom
etterli:otbn-kmac-tlt
Jun 25, 2026
Merged

[otbn,top] Add Top-level-test for OTBN-KMAC interface#30385
nasahlpa merged 2 commits into
lowRISC:masterfrom
etterli:otbn-kmac-tlt

Conversation

@etterli

@etterli etterli commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This adds a top level test where OTBN makes use of the KMAC interface. This serves as a smoke test as well as showcase how to use the interface.

Only the last two commits are relevant. This depends on #30384.

// Only allow a squeeze if the app allows it.
logic squeeze_again_allowed;
assign squeeze_again_allowed = app_cfg.if_type == AppDynamic && app_cfg.session_cfg.en_xof;
assign squeeze_again_allowed = app_cfg.if_type == AppDynamic && app_cfg.session_cfg.en_xof &&

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.

Nit: add brackets to improve readability of the logic expression

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree but this commit is not part of this PR. And the PR it belongs to is already merged now. So I won't change it.

@thommythomaso thommythomaso 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.

Thanks @etterli, I added one small comment regarding the readability of a logic expression.

Signed-off-by: Pascal Etterli <pascal.etterli@lowrisc.org>
@etterli etterli marked this pull request as ready for review June 24, 2026 22:31
@etterli etterli requested a review from a team as a code owner June 24, 2026 22:31
@etterli etterli requested review from pamaury and removed request for a team and pamaury June 24, 2026 22:31
@etterli etterli added the CI:Rerun Rerun failed CI jobs label Jun 25, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 25, 2026
@etterli etterli requested a review from nasahlpa June 25, 2026 07:35
Comment thread sw/device/tests/BUILD Outdated
Comment thread sw/device/tests/otbn_kmac_test.c Outdated
Comment thread sw/otbn/kmac/kmac_tlt_test.s
Signed-off-by: Pascal Etterli <pascal.etterli@lowrisc.org>

@nasahlpa nasahlpa 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.

Thanks Pascal, the test looks good to me.

Comment thread sw/device/tests/BUILD

@andrea-caforio andrea-caforio 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.

The test looks good to me, I've been using it for two weeks now without problems. I consider ML-DSA to be the real stress test for the interface.

Thanks @etterli

@nasahlpa nasahlpa added this pull request to the merge queue Jun 25, 2026
Merged via the queue into lowRISC:master with commit 3d4efd9 Jun 25, 2026
43 checks passed
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