Skip to content

math/big: infinite loop in Int.ModSqrt for p = 1 #51747

@sylvainpelissier

Description

@sylvainpelissier

When passing p=1 in ModSqrt function, the code goes in infinite loop:

for Jacobi(&n, p) != -1 {

The Jacobi symbol will gives one for ever.

For example: https://go.dev/play/p/37ExZ6Y-Hdp

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions