Eugene N on Sat, 02 Apr 2011 18:15:18 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: ECC modelling |
On Sat, Apr 02, 2011 at 04:41:43PM +0300, Eugene N wrote:There are no functions in PARI to generate irreducible trinomials or pentanomials.
> Hello Sirs
>
> I am a student and i recently decided to use this renound tool for the
> purpose of ECC modelling.
> I browsed through the manuals & did some web searcehes (
> http://orion.math.iastate.edu/cbergman/crypto/pari/parihelp.html)
> and i am very happy to discover this great tool.
>
> However, i stumbled upon some problems, wich made me turn for advice to
> expirienced users like you. I hope you will clear som things for me.
>
> I am looking for a way to generate n-nomials (generators of m.gr. inGF(2^m)
> ), especially tri-and pentanomials. I have read about ffinit(p,n) - but it
> produces
> long polies.
but you can program it in GP easily:
trino(N)=for(i=1,N-1,P=x^N+x^i+1;if(polisirreducible(P*Mod(1,2)),return(P)))
penta(N)=forvec(v=vector(3,i,[1,N-1]),P=x^N+1+sum(i=1,3,x^v[i]);if(polisirreducible(P*Mod(1,2)),return(P)))
ffinit is much faster, though.
If you mean elliptic curve of GF(2^m),
> I would like also to find some examples of binary elliptic curves and
> base-point generation.
you need to get an irreducible polynomial P and do
g=ffgen(P*Mod(1,2),'g)
g is now a field generator for GF(2^m).
You can define the elliptic curve Y^2+Y=X^3+X over GF(2^m) as follow:
E=ellinit([0,0,1,1,0]*g^0);
Cheers,
Bill.