我有兴趣在某些CAS(Singular,GAP,Sage等)中定义以下多项式quotient ring:
R = GF(256)[x] / (x^4 + 1)
具体地,R
是度数最多为3的所有多项式的集合,其系数属于GF(256)。两个例子包括:
p(x) = {03}x^3 + {01}x^2 + {01}x + {02}
q(x) = {0B}x^3 + {0D}x^2 + {09}x + {0E}
加法和乘法定义为每环定律。在这里,我提到它们的重点:
添加:相应的系数是XOR-ed(GF(256)中的加法则):
p(x) + q(x) = {08}x^3 + {0C}x^2 + {08}x + {0C}
乘法:多项式是多重的(系数在GF(256)中相加并相乘)。结果以模x / 4 + 1:
计算p(x) * q(x) = ({03}*{0B}x^6 + ... + {02}*{0E}) mod (x^4 + 1)
= ({03}*{0B}x^6 + ... + {02}*{0E}) mod (x^4 + 1)
= ({1D}x^6 + {1C}x^5 + {1D}x^4 + {00}x^3 + {1D}x^2 + {1C}x + {1C}) mod (x^4 + 1)
= {01}
请告诉我如何在您选择的CAS中定义
R = GF(256)[x] / (x^4 + 1)
,并说明如何在p(x)和q(x)之间实现上述加法和乘法。