Is there a good finite field library?

86 views
Skip to first unread message

awaw...@gmail.com

unread,
Aug 11, 2026, 9:14:17 AM (23 hours ago) Aug 11
to golang-nuts
I would like to compute the square root of elements from a general finite field GF(p^k), where p is a prime number, and k an integer k>=1.

From what I can find, https://pkg.go.dev/github.com/ReneBoedker/alg...@v0.2.1/finitefield/ff#Field seems to be the only one that supports finite fields of arbitrary order p^k.
However, it lacks the square root operation that is for example provided in the Python libnum library.
The library I am looking for need not be super fast, but I'd like to have it in pure Go.

I wonder does anyone have any recommendations? Thanks.

Keith Randall

unread,
Aug 11, 2026, 5:49:06 PM (14 hours ago) Aug 11
to golang-nuts

Jason E. Aten

unread,
Aug 11, 2026, 6:25:29 PM (13 hours ago) Aug 11
to golang-nuts
I made you one:


while doing so, I found a bug in ReneBoedker/algobra (filed, see issue 2), so ffsqrt is based on my fork with a fix for now.
Reply all
Reply to author
Forward
0 new messages