| 1 | initial version |
Hi,
First we can try defining the function, say we want to calculate $xy+x^2+y^3$ for all $x,y\in GF(2^3)$. This can be done as follows
def f(x,y):
return x*y+x^2+y^3
Now, to check all possible values we can try the following
FFq.<a> = GF( 2^3, 'a' ) # Note: a is the name of the generator
for x in FFq:
for y in FFq:
print f(x,y)
As a final comment, now that a has been defined to be the generator we can use it to evaluate f at particular points, say
f(a^3+1,a^2+1)
Hope it helped.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.