Skip to content

Conversation

@manastasova
Copy link
Contributor

Issues:

mldsa-native import needs SHAKE256_* functions. SHAKE256_Absorb_once_x4 and SHAKE256_Squeezeblocks_x4 are already supported. SHAKE256_Init_x4 is missing, however, SHAKE128_Init_x4 can be reused as-is for both SHAKE128 and SHAKE256. Therefore, generalizing the function avoids duplicates.

Description of changes:

Rename SHAKE128_Init_x4 to the more general function SHAKE_Init_x4, covering both SHAKE security levels.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@manastasova manastasova requested a review from a team as a code owner December 18, 2025 05:04
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

(void) SHAKE128_Squeezeblocks_x4(out0, out1, out2, out3, state, nblocks);
}

static MLK_INLINE void mlk_shake128x4_init(mlk_shake128x4ctx *state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: unknown type name 'MLK_INLINE' [clang-diagnostic-error]

static MLK_INLINE void mlk_shake128x4_init(mlk_shake128x4ctx *state) {
       ^

(void) SHAKE_Init_x4(state);
}

static MLK_INLINE void mlk_shake128x4_release(mlk_shake128x4ctx *state) {
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: unknown type name 'MLK_INLINE' [clang-diagnostic-error]

static MLK_INLINE void mlk_shake128x4_release(mlk_shake128x4ctx *state) {
       ^

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.16%. Comparing base (ca4a1ba) to head (5b9b547).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2917   +/-   ##
=======================================
  Coverage   78.16%   78.16%           
=======================================
  Files         689      689           
  Lines      118653   118653           
  Branches    16681    16681           
=======================================
+ Hits        92740    92748    +8     
+ Misses      25023    25016    -7     
+ Partials      890      889    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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