Multiply x by y in GF(2^field_size).
(self, x, y)
| 103 | return x |
| 104 | |
| 105 | def mul(self, x, y): |
| 106 | """Multiply x by y in GF(2^field_size).""" |
| 107 | ret = 0 |
| 108 | while y: |
| 109 | if y & 1: |
| 110 | ret ^= x |
| 111 | y >>= 1 |
| 112 | x = self.mul2(x) |
| 113 | return ret |
| 114 | |
| 115 | def sqr(self, x): |
| 116 | """Square x in GF(2^field_size).""" |
no test coverage detected