0
$\begingroup$

I am trying to find the right way to compute the square root of a number defined in a finite field. For example,

<< FiniteFields`
In[18]:= Sqrt[GF[17][{8}]]
Out[18]= Sqrt[Subscript[{8}, 17]]

Results in an incorrect answer. The correct answer is 5.

$\endgroup$

1 Answer 1

4
$\begingroup$
PowerMod[n, 1/2, f]

e.g.

PowerMod[8, 1/2, 17]

(* 5 *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.