Bitcoin Core  22.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Private Attributes | List of all members
pyminisketch.GF2Ops Class Reference

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
 

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__()

def 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()

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

Definition at line 119 of file pyminisketch.py.

◆ mul()

def 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()

def 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()

def 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
private

Definition at line 95 of file pyminisketch.py.

◆ field_size

pyminisketch.GF2Ops.field_size

Definition at line 94 of file pyminisketch.py.


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