diff --git a/ff/baby_bear.hpp b/ff/baby_bear.hpp index 9792b04..2d20241 100644 --- a/ff/baby_bear.hpp +++ b/ff/baby_bear.hpp @@ -508,8 +508,8 @@ class __align__(16) bb31_4_t { wl = u[3] * (uint64_t)u[3]; wl += (w[0] * M) * (uint64_t)MOD; final_sub(w[1]); wl = w[1] * (uint64_t)(MOD-BETA); - wl += u[1] * (uint64_t)(MOD-u[1]); final_sub(w[1]); - wl += u[0] * (uint64_t)(u[2]<<1); + wl += u[1] * (uint64_t)(MOD-u[1]); + wl += u[0] * (uint64_t)(u[2]<<1); final_sub(w[1]); wl += (w[0] * M) * (uint64_t)MOD; return bb31_t{final_sub(w[1])};