libcrux
libcrux copied to clipboard
Check and remove redundant operations
trafficstars
-
[ ] https://github.com/cryspen/libcrux/blob/8cc3152db28d011f078e9e344d4421ec851cce9b/src/kem/kyber/arithmetic.rs#L68 The cast to i16 makes the call to
get_n_least_significant_bitsunnecessary -
[ ] https://github.com/cryspen/libcrux/blob/8cc3152db28d011f078e9e344d4421ec851cce9b/src/kem/kyber/constant_time_ops.rs#L14 The
value |seems to be unnecessary -
[ ] https://github.com/cryspen/libcrux/blob/8cc3152db28d011f078e9e344d4421ec851cce9b/src/kem/kyber/constant_time_ops.rs#L54 Here the
out[i] |=appears to be unnecessay. We should also check whether this masking is preserved by the compiler.