Code covered by the BSD License

Highlights from Extended Euclidean Algorithm for polynomials over GF(2^m)

4.0

4.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 2.48 KB File ID: #27091

Extended Euclidean Algorithm for polynomials over GF(2^m)

Implementation of the extended Euclidean algorithm for polynomials over GF(2^m)

File Information
Description

Contains two functions. The one function computes the greatest common divisor (gcd) of two polynomials a(x) and b(x) over GF(2^m). The other function performs the extended Euclidean algorithm where two polynomials u(x) and v(x) is calculated in addition to the gcd of a(x) and b(x) such that gcd = u(x)a(x) + v(x)b(x).

Required Products Communications System Toolbox
MATLAB release MATLAB 7.5 (R2007b)
28 Mar 2010

sorry i mean like this
this is function is Y=generation(N,X)
N is number of bits
X is the generation polynomial function example X^3+X+1;
i need it to extensions to the binary field- finite field GF(2^m);
if i input Y=generation(8,[1 0 1 1])
the output is
000
001
010
100
011
110
111
101
............................
am make one put i have error this is
....................................................
function Y=generation1(N,X)
N>=0;
K=log2(N);
Y(2:K+1,1:K)=eye(K,K);
Yp=Y(2,1:K);
for i=1:N-(K+1)
Yn=Yp(K);
for j=1:K
Z=xor(Yp(j),Yp(K));
Yn(j+1)=xor(Z,X(j+1));
end
Y(K+2+i,:)=Yn(j+1);
Yp=Yn;

end

28 Mar 2010