Evaluating symbolic polynomials [closed]

asked 2016-04-26 20:38:45 +0200

AJey gravatar image


I have troubles to state this question percisely, though I do my best. I have two affine transformations S,T (size n) and univariate polynomial P - all over finite field k. The univariate polynomial is a member of quotient ring k[t]/<g>, where g is irreducible polynomial of degree n. I am computing S(P(T(m)), where m is message of length n. So, first I perform affine transformation on m, then I transform the result to polynomial ring by coefficients. Example follows

m = (1,0,1), S(M) = (1,1,0). Then corresponding polynomial is x^2 + x + 0. Then I evaluate P in value x^2 + x + 0. So I compute P(x^2 + x), where computation is done modulo g. Let's say, that result is 0x^2 + x + 1. Then I transfer this back to vector, again by coefficients. So the resulting vector is (0,1,1). Finaly I apply last affine transformation T.

The problem is, that I need to be able to do this for general looking vectors, i.e. for vectors (m_1, ... , m_n). I'm newbie to sage. I tried to create symbolic vector with elements m_0 , ... , m_n. Then successfuly applied first transformation and was able to make a polynomial out of that vector.

What I struggle with, is evaluating the polynomial P on that vector. First of all, I'm not even able to create the corresponding quotient ring. I guess that my polynomial ring is PolynomialRing(SR, 't'). Yet, sage won't let me create irreducible element of this ring. I'm not sure whether I've chosen the right path how to tackle this problem.

Could please anyone provide some insight and perhaps suggest how to proceed?


edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by tmonteil
close date 2016-04-26 23:56:38.258789