Ask Your Question

Revision history [back]

Solve Matrix Multiplication Equation on Quotient Polynomial Ring

How to solve matrix multiplication equation on quotient polynomial ring? my try:

## polynomial ring
K = 4
L = 4
N = 256

F = GF(8380417)
R = F['x']
S = R.quotient(x^N+1, 'x')

A = random_matrix(S, K, L, distribution='gen')

s1_coef = [ [randint(0, 2) for i in range(N+1)] for _ in range(L)]
s1 = vector([S(_) for _ in s1_coef])
t = A*s1 

A.solve_right(t) # get X for AX = Y

And I got TypeError: base ring must be an integral domain or a ring of integers mod n

click to hide/show revision 2
retagged

Solve Matrix Multiplication Equation on Quotient Polynomial Ring

How to solve matrix multiplication equation on quotient polynomial ring? my try:

## polynomial ring
K = 4
L = 4
N = 256

F = GF(8380417)
R = F['x']
S = R.quotient(x^N+1, 'x')

A = random_matrix(S, K, L, distribution='gen')

s1_coef = [ [randint(0, 2) for i in range(N+1)] for _ in range(L)]
s1 = vector([S(_) for _ in s1_coef])
t = A*s1 

A.solve_right(t) # get X for AX = Y

And I got TypeError: base ring must be an integral domain or a ring of integers mod n