samuele-andreoli opened a new issue #74: BIG comp is not constant time URL: https://github.com/apache/incubator-milagro-crypto-c/issues/74 The BIG comparison is not constant time. It should use a constant time implementation. For instance ``` /* sodium constant time implementation */ int BIG_XXX_comp(BIG_XXX a, BIG_XXX b) { int i; chunk gt=0; chunk eq=1; for (i = NLEN_XXX-1; i>=0; i--) { gt |= ((b[i]-a[i]) >> BASEBITS_XXX) & eq; eq &= ((b[i]^a[i])-1) >> BASEBITS_XXX; } return (int)(gt+gt+eq-1); } ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
