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

Classes

class  GF2Ops
class  TestGF2Ops
class  TestPolyFindRoots
class  Minisketch
class  TestMinisketch

Functions

 poly_monic (poly, gf)
 poly_divmod (poly, mod, gf)
 poly_gcd (a, b, gf)
 poly_sqr (poly, gf)
 poly_tracemod (poly, param, gf)
 poly_frobeniusmod (poly, gf)
 poly_find_roots (poly, gf)
 berlekamp_massey (syndromes, gf)

Variables

list GF2_MODULI

Detailed Description

Native Python (slow) reimplementation of libminisketch' algorithms.

Function Documentation

◆ berlekamp_massey()

pyminisketch.berlekamp_massey ( syndromes,
gf )
Implement the Berlekamp-Massey algorithm.

Takes as input a sequence of GF(2^field_size) elements, and returns the shortest LSFR
that generates it, represented as a polynomial.

Definition at line 341 of file pyminisketch.py.

Here is the caller graph for this function:

◆ poly_divmod()

pyminisketch.poly_divmod ( poly,
mod,
gf )
Return the polynomial (quotient, remainder) of poly divided by mod.

Definition at line 197 of file pyminisketch.py.

Here is the caller graph for this function:

◆ poly_find_roots()

pyminisketch.poly_find_roots ( poly,
gf )
Find the roots of poly if fully factorizable with unique roots, [] otherwise.

Definition at line 260 of file pyminisketch.py.

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

◆ poly_frobeniusmod()

pyminisketch.poly_frobeniusmod ( poly,
gf )
Compute x^(2^field_size) mod poly.

Definition at line 253 of file pyminisketch.py.

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

◆ poly_gcd()

pyminisketch.poly_gcd ( a,
b,
gf )
Return the polynomial GCD of a and b.

Definition at line 217 of file pyminisketch.py.

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

◆ poly_monic()

pyminisketch.poly_monic ( poly,
gf )
Return a monic version of the polynomial poly.

Definition at line 191 of file pyminisketch.py.

Here is the caller graph for this function:

◆ poly_sqr()

pyminisketch.poly_sqr ( poly,
gf )
Return the square of polynomial poly.

Definition at line 228 of file pyminisketch.py.

Here is the caller graph for this function:

◆ poly_tracemod()

pyminisketch.poly_tracemod ( poly,
param,
gf )
Compute y + y^2 + y^4 + ... + y^(2^(field_size-1)) mod poly, where y = param*x.

Definition at line 238 of file pyminisketch.py.

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

Variable Documentation

◆ GF2_MODULI

list pyminisketch.GF2_MODULI

Definition at line 18 of file pyminisketch.py.