EXP_TABLE = begin
a =uninitialized::StaticArray(UInt8, 256)
a[0] =1
(1..255).each do|i|
v = a[i -1].to_i *2
a[i] = (v >=256 ? (v ^285) : v).to_u8
end
a
end
LOG_TABLE = begin
a =uninitialized::StaticArray(UInt8, 256)
(0..255).each do|i|
a[EXP_TABLE[i]] = i.to_u8
end
a
end