Quadratic extension of a finite field [closed]

asked 2018-01-11 08:52:56 -0600

ninho gravatar image

I have the following Sage code, but it throws an error when I try to create a quadratic extension via x^2 + 1.

proof.arithmetic(False)

# Parameters
f = 1
lA = 2
lB = 3
eA = 372
eB = 239

# Define the prime p
p = f*lA**eA*lB**eB-1
assert p.is_prime()

# Prime field of order p
Fp = GF(p)
# The quadratic extension via x^2 + 1 since p = 3 mod 4 
Fp2.<i> = Fp.extension(x^2+1)

The error that I get is kind of cryptic for me: UnboundLocalError: local variable 'E' referenced before assignment. Any ideas how to achieve what I want in Sage?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by vdelecroix
close date 2018-01-11 13:25:49.011089

Comments

vdelecroix gravatar imagevdelecroix ( 2018-01-11 13:26:06 -0600 )edit