Multiply x by 2 in GF(2^field_size).
(self, x)
| 96 | assert self._modulus is not None |
| 97 | |
| 98 | def mul2(self, x): |
| 99 | """Multiply x by 2 in GF(2^field_size).""" |
| 100 | x <<= 1 |
| 101 | if x >> self.field_size: |
| 102 | x ^= self._modulus |
| 103 | return x |
| 104 | |
| 105 | def mul(self, x, y): |
| 106 | """Multiply x by y in GF(2^field_size).""" |
no outgoing calls
no test coverage detected