You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Issues:
Resolves #V1982530715 and #V1982532566
### Description of changes:
The reference implementation implements `poly_chknorm` in variables
time. It argues that while the input coefficients itself are secret in
some call sites, it is okay to leak which coefficient lead to rejection.
It, hence, does absolute value computation in constant-time and then
checks the bound using a conditional.
This approach appears safe, but somewhat unclean as it is still
operating on secret data. When performing constant-time testing it also
requires a number of declassifications.
This commit takes a more conservative approach and changes
`poly_chknorm` to a constant-time implementation in the hope that the
performance penalty is acceptable.
A minor change is that the API of `poly_chknorm` is changed to returning
`0xFFFFFFFF` in the case of failure to be able to re-use existing
constant-time primitives.
### Call-outs:
PR source adapted from: Upstream PR in
pq-code-package/mldsa-native#392.
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.
0 commit comments