Skip to content

Why not have modsqrt? #324

Open
Open
@fade2black

Description

@fade2black

We have modpow and modinv. But wouldn't be it helpful to have something like modsqrt(&self, &Self modulus) -> Option<Self> for BigUint?
This proc would be handy to solve x^2 = n mod P, were P is prime. For now, I implement Tonelli-Shanks manually.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions