![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
Public Member Functions | |
| def | __init__ (self, field_size) |
| def | mul2 (self, x) |
| def | mul (self, x, y) |
| def | sqr (self, x) |
| def | inv (self, x) |
Public Attributes | |
| field_size | |
Private Attributes | |
| _modulus | |
Class to perform GF(2^field_size) operations on elements represented as integers. Given that elements are represented as integers, addition is simply xor, and not exposed here.
Definition at line 85 of file pyminisketch.py.
| def pyminisketch.GF2Ops.__init__ | ( | self, | |
| field_size | |||
| ) |
Construct a GF2Ops object for the specified field size.
Definition at line 92 of file pyminisketch.py.
| def pyminisketch.GF2Ops.inv | ( | self, | |
| x | |||
| ) |
Compute the inverse of x in GF(2^field_size).
Definition at line 119 of file pyminisketch.py.
| def pyminisketch.GF2Ops.mul | ( | self, | |
| x, | |||
| y | |||
| ) |
Multiply x by y in GF(2^field_size).
Definition at line 105 of file pyminisketch.py.
| def pyminisketch.GF2Ops.mul2 | ( | self, | |
| x | |||
| ) |
Multiply x by 2 in GF(2^field_size).
Definition at line 98 of file pyminisketch.py.
| def pyminisketch.GF2Ops.sqr | ( | self, | |
| x | |||
| ) |
Square x in GF(2^field_size).
Definition at line 115 of file pyminisketch.py.
|
private |
Definition at line 95 of file pyminisketch.py.
| pyminisketch.GF2Ops.field_size |
Definition at line 94 of file pyminisketch.py.