1 | initial version |
If I got it correctly, you want to define vectors of variables over GF(2)
. This can be done like this
X.<mbit,kbit> = InfinitePolynomialRing(GF(2))
m = vector( [mbit[i] for i in range(128)] )
k = vector( [kbit[i] for i in range(128)] )
Then you can do operations like m+k
(XOR) or accessing individual bits via m[i]
etc.