core/crypto/_fiat/field_poly1305: Use multiply to calculate the mask

This commit is contained in:
Yawning Angel
2024-03-20 08:02:20 +09:00
parent 1ce279e6a1
commit 36f3001d59
+1 -1
View File
@@ -76,7 +76,7 @@ fe_cond_swap :: #force_no_inline proc "contextless" (
out1, out2: ^Tight_Field_Element,
arg1: bool,
) {
mask := -u64(arg1)
mask := (u64(arg1) * 0xffffffffffffffff)
x := (out1[0] ~ out2[0]) & mask
x1, y1 := out1[0] ~ x, out2[0] ~ x
x = (out1[1] ~ out2[1]) & mask