function polynomialTrace(F) expdim := #F; n := Round(Log(2,expdim)); assert 2^n eq expdim; x := PolynomialRing(F).1; return &+ [ x^(2^i) : i in [0..n-1] ]; end function; function variableTrace(a) return Evaluate( polynomialTrace(BaseRing(a)), a ); end function; function listAPN5() u := PrimitiveElement(GF(2^5)); x := PolynomialRing(GF(2^5)).1; G5:=[ x^3, x^5, x^(2^5-2) ]; return G5; end function; function listAPN6() u := PrimitiveElement(GF(2^6)); x := PolynomialRing(GF(2^6)).1; G6:=[ x^3, x^3 + u^11*x^6 + u*x^9, u*x^5 + x^9 + u^4*x^17 + u*x^18 + u^4*x^20 + u*x^24 + u^4*x^34 + u*x^40, u^7*x^3 + x^5 + u^3*x^9 + u^4*x^10 + x^17 + u^6*x^18, x^3 + u*x^24 + x^10, x^3 + u^17*(x^17 + x^18 + x^20 + x^24), x^3 + u^11*x^5 + u^13*x^9 + x^17 + u^11*x^33 + x^48, u^25*x^5 + x^9 + u^38*x^12 + u^25*x^18 + u^25*x^36, u^40*x^5 + u^10*x^6 + u^62*x^20 + u^35*x^33 + u^15*x^34 + u^29*x^48, u^34*x^6 + u^52*x^9 + u^48*x^12 + u^6*x^20 + u^9*x^33 + u^23*x^34 + u^25*x^40, x^9 + u^4*(x^10 + x^18) + u^9*(x^12 + x^20 + x^40), u^52*x^3 + u^47*x^5 + u*x^6 + u^9*x^9 + u^44*x^12 + u^47*x^33 + u^10*x^34 + u^33*x^40, u*(x^6 + x^10 + x^24 + x^33) + x^9 + u^4*x^17, x^3 + u^17*(x^17 + x^18 + x^20 + x^24) + u^14*((u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)+ (u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)^2 + (u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)^4+ (u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)^8+ (u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)^16+ (u^52*x^3 + u^6*x^5 + u^19*x^7 + u^28*x^11 + u^2*x^13)^32+ (u^2*x)^9 +(u^2*x)^18 +(u^2*x)^36 + x^21+x^42) ]; return G6; end function; function listAPN7() u := PrimitiveElement(GF(2^7)); x := PolynomialRing(GF(2^7)).1; G7:=[ x^3, x^3 + variableTrace(x^9), x^34 + x^18 + x^5, x^3 + x^17 + x^33 + x^34, x^5, x^9, x^13, x^57, x^(2^7-1-1), x^65 + x^10 + x^3, x^3 + x^9 + x^18 + x^66, x^3 + x^12 + x^17 + x^33, x^3 + x^17 + x^20 + x^34 + x^66, x^3 + x^20 + x^34 + x^66, x^3 + x^12 + x^40 + x^72, x^3 + x^5 + x^10 + x^33 + x^34, x^3 + x^6 + x^34 + x^40 + x^72, x^3 + x^5 + x^6 + x^12 + x^33 + x^34, u^2*x^96 + u^78*x^80 + u^121*x^72 + u^49*x^68 + u^77*x^66 + u^29*x^65 + u^119*x^48 + u^117*x^40 + u^28*x^36 + u^107*x^34 +u^62*x^33 +u^125*x^24 +u^76*x^20 +u^84*x^18 +u^110*x^17 +u^49*x^12 +u^102*x^10 +u^69*x^9 + u^14*x^6 + x^5 + x^3]; return G7; end function; function listAPN8() w := PrimitiveElement(GF(2^8)); x := PolynomialRing(GF(2^8)).1; G8:=[x^3, x^9, x^3+variableTrace(x^9), x^9+variableTrace(x^3), x^3+w^245*x^33+w^183*x^66+w^21*x^144, x^3 + w^65*x^18+w^120*x^66+w^135*x^144, w^188*x^192+w^129*x^144+w^172*x^132+ w^138*x^129+w^74*x^96+w^244*x^72+w^22*x^66+ w^178*x^48+w^150*x^36+w^146*x^33+w^6*x^24+ w^60*x^18+w^80*x^12+w^140*x^9+w^221*x^6+w^19*x^3, w^37*x^192+w^110*x^144+w^40*x^132+w^53*x^129 +w^239*x^96+w^235*x^72+w^126*x^66+w^215*x^48+ w^96*x^36+w^29*x^33+w^19*x^24+w^14*x^18+ w^139*x^12+w^230*x^9+w^234*x^6+w^228*x^3, w^242*x^192+w^100*x^144+w^66*x^132+w^230*x^129+ w^202*x^96+w^156*x^72+w^254*x^66+w^18*x^48+ w^44*x^36+w^95*x^33+w^100*x^24+w^245*x^18+ w^174*x^12+w^175*x^9+w^247*x^6+w^166*x^3, w^100*x^192+ w^83*x^144+ w^153*x^132+ w^65*x^129+ w^174*x^96+ w^136*x^72+ w^46*x^66+ w^55*x^48+ w^224*x^36+ w^180*x^33+ w^179*x^24+w^226*x^18+ w^54*x^12+ w^168*x^9+ w^89*x^6+ w^56*x^3, w^77*x^192+ w^133*x^144+ w^47*x^132+ w^229*x^129+ w^23*x^96+ w^242*x^72+ w^242*x^66+ w^245*x^48+ w^212*x^36+ w^231*x^33+ w^174*x^24+ w^216*x^18+ w^96*x^12+ w^253*x^9+ w^154*x^6+ w^71*x^3, w^220*x^192+ w^94*x^144+ w^70*x^132+ w^159*x^129+ w^145*x^96+w^160*x^72+ w^74*x^66+ w^184*x^48+ w^119*x^36+ w^106*x^33+w^253*x^24+ w*x^18+ w^90*x^12+ w^169*x^9+ w^118*x^6+ w^187*x^3, w^98*x^192+ w^225*x^144+ w^111*x^132+ w^238*x^129+ w^182*x^96+ w^125*x^72+ w^196*x^66+ w^219*x^48+ w^189*x^36+ w^199*x^33+ w^181*x^24+ w^110*x^18+ w^19*x^12+ w^175*x^9+ w^133*x^6+ w^47*x^3, w^236*x^192+ w^212*x^160+ w^153*x^144+ w^185*x^136+ w^3*x^132+w^89*x^130+ w^189*x^129+ w^182*x^96+ w^105*x^80+ w^232*x^72+w^219*x^68+ w^145*x^66+ w^171*x^65+ w^107*x^48+ w^179*x^40+ w^227*x^36+ w^236*x^34+ w^189*x^33+ w^162*x^24+ w^216*x^20+w^162*x^18+ w^117*x^17+ w^56*x^12+ w^107*x^10+ w^236*x^9+w^253*x^6+ w^180*x^5+ w^18*x^3, w^27*x^192+ w^167*x^144+ w^26*x^132+w^231*x^129+ w^139*x^96+w^30*x^72+ w^139*x^66+ w^203*x^48+ w^36*x^36+ w^210*x^33+w^195*x^24+ w^12*x^18+ w^43*x^12+ w^97*x^9+ w^61*x^6+w^39*x^3, w^6*x^192+ w^85*x^144+ w^251*x^132+ w^215*x^129+ w^229*x^96+ w^195*x^72+ w^152*x^66+ w^173*x^48+ w^209*x^36+ w^165*x^33+ w^213*x^24+ w^214*x^18+ w^158*x^12+ w^146*x^9+ x^6+ w^50*x^3, w^164*x^192+ w^224*x^144+ w^59*x^132+ w^124*x^129+ w^207*x^96+ w^211*x^72+ w^5*x^66+ w^26*x^48+ w^20*x^36+ w^101*x^33+ w^175*x^24+ w^241*x^18+ x^12+ w^15*x^9+ w^217*x^6+ w^212*x^3, x^3+ x^17+w^16*(x^18+x^33)+w^15*x^48, x^3+ w^24*x^6+w^182*x^132+w^67*x^192, x^3+x^6+x^68+x^80+x^132+x^160, x^3+x^5+x^18+x^40+x^66, x^3+x^12+x^40+x^66+x^130, x^57]; return G8; end function;