Skip to content

Implement quadratic_nonresidue for more fields #39798

@user202729

Description

@user202729

Problem Description

Currently quadratic_nonresidue is implemented for some finite fields, but not others.

Having this method could simplify some part of the code

# We could take a multiplicative generator but
# that might be expensive to compute; otherwise
# half the elements will do, and testing squares
# is very fast.
D = K.random_element()
while D.is_square():
D = K.random_element()

Somewhat related #39688

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions