Skip to content

jacobi should return Option<isize> instead of isize #34

Description

@survived

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.

https://github.com/dfns-labs/paillier-zk/blob/5db04c4a6e36b52656c2ccd9bb9b5dc0fbd66289/src/common/sqrt.rs#L63-L72

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions