【问题标题】:In pari-gp, how to find a primitive element of finite field?在 pari-gp 中,如何找到有限域的原始元素?
【发布时间】:2016-05-10 12:32:44
【问题描述】:

说,我想要一个包含 q^n 元素的有限域,用于某些 prime qpositive n。如何获取原始元素

【问题讨论】:

    标签: pari pari-gp finite-field


    【解决方案1】:

    您可以使用以下代码获取一些原始元素:

    var = 'x; \\ sets a variable in the polynomial representation of finite field
    f = ffgen(ffinit(q, n)); \\ GF(q^n) ~ GF(q)[x]/<f(x)>. Note `f` is just an irreducible
    a = ffprimroot(f); \\ gets a root `a` of `f`
    poly = minpoly(a, var); \\ finds a minimal polynomial for `a`
    primitive_elt = ffgen(poly, var); \\ finds a root of the minimal polynomial
    
    \\ assertion: check the order
    fforder(primitive_elt) == q^n-1
    

    请注意,有限域可以具有某些原始元素。上面的代码找到随机的任何。请注意,上面的代码假定 n > 1。否则,函数 minpoly 会崩溃(使用 PARI/GP 2.7.2 32 位测试)。

    【讨论】:

    • 您能帮帮我吗?让n = m * p。如何将GF(q^n)的原始元素作为GF(q^p)上的m维向量?
    • @aka_test:要达到您的目标,您必须将GF(q^n) 的最小多项式计算为GF(q^p) 上的多项式。详情请参阅johnkerl.org/doc/ffcomp.pdf(第 6.1 节)。
    猜你喜欢
    • 2015-03-01
    • 2018-02-25
    • 1970-01-01
    • 2014-03-10
    • 2018-10-25
    • 1970-01-01
    • 1970-01-01
    • 2016-09-05
    • 1970-01-01
    相关资源
    最近更新 更多