Bitcoin Core 31.0.0
P2P Digital Currency
Loading...
Searching...
No Matches
pyminisketch.GF2Ops Class Reference

Public Member Functions

 __init__ (self, field_size)
 mul2 (self, x)
 mul (self, x, y)
 sqr (self, x)
 inv (self, x)

Public Attributes

 field_size = field_size

Protected Attributes

 _modulus = GF2_MODULI[field_size]

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

pyminisketch.GF2Ops.__init__ ( self,
field_size )
Construct a GF2Ops object for the specified field size.

Definition at line 92 of file pyminisketch.py.

Member Function Documentation

◆ inv()

pyminisketch.GF2Ops.inv ( self,
x )
Compute the inverse of x in GF(2^field_size).

Definition at line 119 of file pyminisketch.py.

◆ mul()

pyminisketch.GF2Ops.mul ( self,
x,
y )
Multiply x by y in GF(2^field_size).

Definition at line 105 of file pyminisketch.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mul2()

pyminisketch.GF2Ops.mul2 ( self,
x )
Multiply x by 2 in GF(2^field_size).

Definition at line 98 of file pyminisketch.py.

Here is the caller graph for this function:

◆ sqr()

pyminisketch.GF2Ops.sqr ( self,
x )
Square x in GF(2^field_size).

Definition at line 115 of file pyminisketch.py.

Here is the call graph for this function:

Member Data Documentation

◆ _modulus

pyminisketch.GF2Ops._modulus = GF2_MODULI[field_size]
protected

Definition at line 95 of file pyminisketch.py.

◆ field_size

pyminisketch.GF2Ops.field_size = field_size

Definition at line 94 of file pyminisketch.py.


The documentation for this class was generated from the following file: