// output of ./demo/gf2n/normalbasis-demo.cc: // Description: //% Multiplication with a normal basis for GF(2**n). arg 1: 5 == n [The n in GF(2**n)] default=5 args 2,3,... : [Optionally supply nonzero coefficients of normal poly c] Normal poly: c=1111.1 == x^5 + x^4 + x^3 + x^2 + 1 g=....1 k = : f=g**k Tr(f) x^2+x==f 0 = ..... : 11111 1 1 = ....1 : ....1 1 2 = ...1. : ...1. 1 3 = ...11 : .111. 1 4 = ..1.. : ..1.. 1 5 = ..1.1 : 1.111 . x=.11.1 6 = ..11. : 111.. 1 7 = ..111 : .11.1 1 8 = .1... : .1... 1 9 = .1..1 : 111.1 . x=.1.11 10 = .1.1. : .1111 . x=..1.1 11 = .1.11 : ..11. . x=...1. 12 = .11.. : 11..1 1 13 = .11.1 : 11... . x=.1... 14 = .111. : 11.1. 1 15 = .1111 : 1.1.. . x=.11.. 16 = 1.... : 1.... 1 17 = 1...1 : ..111 1 18 = 1..1. : 11.11 . x=.1..1 19 = 1..11 : 1.11. 1 20 = 1.1.. : 1111. . x=.1.1. 21 = 1.1.1 : ...11 . x=....1 22 = 1.11. : .11.. . x=..1.. 23 = 1.111 : .1.1. . x=..11. 24 = 11... : 1..11 1 25 = 11..1 : .1.11 1 26 = 11.1. : 1...1 . x=.1111 27 = 11.11 : ..1.1 . x=...11 28 = 111.. : 1.1.1 1 29 = 111.1 : 1..1. . x=.111. 30 = 1111. : .1..1 . x=..111 k = 30 (2**n-1)/k = 1