ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 04 Apr 2016 19:12:18 +0200Finite field q power computationshttps://ask.sagemath.org/question/32907/finite-field-q-power-computations/ Hey there, i'm trying to make a fast computation algorithm using shift operations. I'm having a field GF(q) and a field GF(q^m) for some integer m and i have an element x \in GF(q^m). I want to represent x in a normal basis of the vectorspace GF(q^m) over GF(q), so that I can use shift operations for computing x^q^k fast. Are there any way of doing this ?Tue, 29 Mar 2016 14:19:40 +0200https://ask.sagemath.org/question/32907/finite-field-q-power-computations/Answer by B r u n o for <p>Hey there, i'm trying to make a fast computation algorithm using shift operations. I'm having a field GF(q) and a field GF(q^m) for some integer m and i have an element x \in GF(q^m). I want to represent x in a normal basis of the vectorspace GF(q^m) over GF(q), so that I can use shift operations for computing x^q^k fast. Are there any way of doing this ?</p>
https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?answer=32914#post-id-32914When you have an element of `x` of `GF(q^m)`, `x.polynomial()` gives you the polynomial (over `GF(q)`) that represents `x`, and then you can have its coefficients using `.coefficients()`:
sage: R.<a> = GF(17^22)
sage: x = R.random_element()
sage: x.polynomial().coefficients()
[10, 15, 5, 16, 2, 1, 5, 9, 12, 10, 12, 3, 16, 9, 1, 16, 7, 7, 2, 10, 3, 4]
Wed, 30 Mar 2016 17:30:45 +0200https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?answer=32914#post-id-32914Answer by Belphegor for <p>Hey there, i'm trying to make a fast computation algorithm using shift operations. I'm having a field GF(q) and a field GF(q^m) for some integer m and i have an element x \in GF(q^m). I want to represent x in a normal basis of the vectorspace GF(q^m) over GF(q), so that I can use shift operations for computing x^q^k fast. Are there any way of doing this ?</p>
https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?answer=32991#post-id-32991 Thanks, but I need it representet in its normal basis? Not its polynomial basis such that I can make shift operations. That is:
x in GF(q^m)
Represent GF(q^m) over GF(q) in its normal basis like {a, a^q, ..., a^q^(m-1)}
Represent x in form of the basis {a, a^q, ..., a^q^(m-1)}, say (v_1, v_2, ... v_m)
make shift (v_m, v_1, ... v_m-1)
use it to compute further stuff.. Also i might as if Sage has such an operation?
Mon, 04 Apr 2016 18:56:36 +0200https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?answer=32991#post-id-32991Comment by Belphegor for <p>Thanks, but I need it representet in its normal basis? Not its polynomial basis such that I can make shift operations. That is:
x in GF(q^m)
Represent GF(q^m) over GF(q) in its normal basis like {a, a^q, ..., a^q^(m-1)}
Represent x in form of the basis {a, a^q, ..., a^q^(m-1)}, say (v_1, v_2, ... v_m)
make shift (v_m, v_1, ... v_m-1)
use it to compute further stuff.. Also i might as if Sage has such an operation?</p>
https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?comment=32994#post-id-32994I think what i'm searching for is
a = GF(q^m).element.primitive()
V = VectorSpace(GF(q),1)
S = V.subspace([V([a]),V([a^q])])
now I just need to represent x,y in GF(q^m) in form the vector space S? and then transforme (x,y,1) into a point on an elliptic curve defined over GF(q^m), any ideas?Mon, 04 Apr 2016 19:12:18 +0200https://ask.sagemath.org/question/32907/finite-field-q-power-computations/?comment=32994#post-id-32994