1

I'm interested in defining the following polynomial quotient ring in some CAS (Singular, GAP, Sage, etc.):

R = GF(256)[x] / (x^4 + 1)

Specifically, R is the set of all polynomials of degree at most 3, whose coefficients belong to GF(256). Two examples include:

p(x) = {03}x^3 + {01}x^2 + {01}x + {02}
q(x) = {0B}x^3 + {0D}x^2 + {09}x + {0E}

Addition and multiplication are defined as the per ring laws. Here, I mention them for emphasis:

  • Addition: The corresponding coefficients are XOR-ed (the addition law in GF(256)):

    p(x) + q(x) = {08}x^3 + {0C}x^2 + {08}x + {0C}
    
  • Multiplication: The polynomials are multiplicated (coefficients are added and multiplicated in GF(256)). The result is computed modulo 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}
    

Please tell me how to define R = GF(256)[x] / (x^4 + 1) in a CAS of your choice, and show how to implement the above addition and multiplication between p(x) and q(x).

Sadeq Dousti
  • 3,346
  • 6
  • 35
  • 53

0 Answers0