Skip to content

Conversation

@mkannwischer
Copy link
Contributor

No description provided.

ct_sel_int32 in mldsa-native previously had a precondition that the condition
is either 0 or 0xFFFFFFFF. This is different from mlkem-native where any
value is permitted for mlk_ct_sel_int16.
This commit aligns ct_sel_int32 with mlkem-native.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
In the very end of verify one has to compare the input challenge to the
re-computed challenge. If they are equal (and some previous checks on
h and z passed), the signature is valid.
Currently, our constant-time tests do not declassify the message and we, hence,
need to declassify in this final step.
Before thi commit, the declassification would happen on the recomputed challenge
just before the memcmp.
Now that a constant-time memcmp was added in
#714, we might as well
use that; that plus a constant-time selections allows us to not use any
declassifications in verification, i.e., we do not leak the verification
result through timing.

Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
Signed-off-by: Matthias J. Kannwischer <matthias@kannwischer.eu>
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