jacobi validates input arguments, and if they are invalid, it returns 0 in release build, or panics in debug build. We should rather have jacobi that returns None when provided arguments are invalid. It will help to catch unexpected behavior if it happens.
jacobi
validates input arguments, and if they are invalid, it returns0
in release build, or panics in debug build. We should rather havejacobi
that returnsNone
when provided arguments are invalid. It will help to catch unexpected behavior if it happens.https://github.com/dfns-labs/paillier-zk/blob/5db04c4a6e36b52656c2ccd9bb9b5dc0fbd66289/src/common/sqrt.rs#L63-L72