You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the project are several modules with dependencies shown below
All modules export some functions, but when a module is used by another module most of the modules are not only imported by using the "using" statement but also "include" the module
using statement:
allows to access exported functions without module prefix e.g. encrypt
if a function is not exported you can only access it by module_name.function_name e.g. McEliece.encrypt
include statement:
makes content of this file available in current file - as if the code was written in this file - there exports and stuff like that does not
matter at all
--> using "include" and "using" on same file is bad practice and should be updated
Overview of dependancies
Misc [self-contained]
InvalidCodewordError, - defines new Exception called InvalidCodewordError
string2bits, - Takes a plaintext and returns its binary representation
- with as much padding as needed to make its length divisible by k.
bits2string - Returns the string that msg represents.
ExtensionField [self-contained]
primitivePolynomials, - dictionary of irreducible polynomials for given degree
add, - add polynomials
multiply, - in GF(2)
divide, - only quotient in GF(2) with extended Euclidean
modulo, - only remainder
power, - x^n modulo g in GF(2^m)
inverse, - of a mod g
squareroot, - of p in GF(2^m)
polygcd - of polynomials
FiniteFieldMatrix [ExtensionField Random Nemo LinearAlgebra]
multiplyPolyMatrices!, - Multiplies two matrices in GF(2^m)
gaussianEliminationColumnPivoting!, - Applies Gauss-Jordan elimination
- to matrix H of dimension nxk.
- It also permutes a given code support
- to keep a coherent goppa code.
GeneratorInverse!, - Finds the right inverse of a generator matrix.
getPermutation, - Returns a random permutation matrix of dimension nxn.
getScrambler - Returns a random binary non-singular matrix of dimension kxk.
Polynomials [ExtensionField]
PolynomialConstants, - defines 0, 1, x as polynomial
monomial, - Returns a monomial of the given degree.
evaluate!, - Evaluates p(x) modulo g(x).
addRing!, - Adds two polynomials with coefficients in GF(2^m).
multiplyRing!, - Multiplies two polynomials with coefficients in GF(2^m).
divRing!, - Returns the quotient of a/b with coefficients in GF(2^m).
modRing!, - Returns the remainder of a/b with coefficients in GF(2^m).
makePolynomialMonic!, - Returns p as a monic polynomial by dividing p by the
- inverse of its leading coefficient.
inverseRing!, - Computes the inverse of a mod g with coefficients in GF(2^m).
- Throws an exception if the inverse doesn't exist.
isPolynomialIrreducible!, - Checks if the given polynomial has at least one root in GF(2^m).
- TODO: is irreducible the right term here? i guess not
- Returns true if it doesn't have roots, false otherwise.
randomPoly, - Returns a random monic irreducible polynomial of degree t
- over the extension field GF(2^m).
splitPolynomial! - Splits the polynomial p into even and odd terms in GF(2^m).
Goppa [Misc ExtensionField FiniteFieldMatrix Polynomials StatsBase LinearAlgebra DelimitedFiles]
generateGoppaCode, - Generates a (n, k) irreducible linear Goppa code with minimum
- distance d >= 2t + 1. Returns the generator matrix G, the goppa
- polynomial, the code support, and the number of rows k of G.
- return G, goppaPolynomial, codeSupport, k
decode! - Given a msg with noise, finds a codeword in the goppa code defined
- by the goppaPolynomial and codeSupport in GF(2^m)
McEliece [Misc FiniteFieldMatrix GoppaCode Random StatsBase DelimitedFiles]
generateKeys,
saveKeys,
encrypt, - enc returns array of ciphertexts of length k
decrypt,
haltingCheck
Test [McEliece DelimitedFiles]
The text was updated successfully, but these errors were encountered:
In the project are several modules with dependencies shown below
All modules export some functions, but when a module is used by another module most of the modules are not only imported by using the "using" statement but also "include" the module
using statement:
allows to access exported functions without module prefix e.g. encrypt
if a function is not exported you can only access it by module_name.function_name e.g. McEliece.encrypt
include statement:
makes content of this file available in current file - as if the code was written in this file - there exports and stuff like that does not
matter at all
--> using "include" and "using" on same file is bad practice and should be updated
Overview of dependancies
Misc [self-contained]
InvalidCodewordError, - defines new Exception called InvalidCodewordError
string2bits, - Takes a plaintext and returns its binary representation
- with as much padding as needed to make its length divisible by k.
bits2string - Returns the string that msg represents.
ExtensionField [self-contained]
primitivePolynomials, - dictionary of irreducible polynomials for given degree
add, - add polynomials
multiply, - in GF(2)
divide, - only quotient in GF(2) with extended Euclidean
modulo, - only remainder
power, - x^n modulo g in GF(2^m)
inverse, - of a mod g
squareroot, - of p in GF(2^m)
polygcd - of polynomials
FiniteFieldMatrix [ExtensionField Random Nemo LinearAlgebra]
multiplyPolyMatrices!, - Multiplies two matrices in GF(2^m)
gaussianEliminationColumnPivoting!, - Applies Gauss-Jordan elimination
- to matrix H of dimension nxk.
- It also permutes a given code support
- to keep a coherent goppa code.
GeneratorInverse!, - Finds the right inverse of a generator matrix.
getPermutation, - Returns a random permutation matrix of dimension nxn.
getScrambler - Returns a random binary non-singular matrix of dimension kxk.
Polynomials [ExtensionField]
PolynomialConstants, - defines 0, 1, x as polynomial
monomial, - Returns a monomial of the given degree.
evaluate!, - Evaluates p(x) modulo g(x).
addRing!, - Adds two polynomials with coefficients in GF(2^m).
multiplyRing!, - Multiplies two polynomials with coefficients in GF(2^m).
divRing!, - Returns the quotient of a/b with coefficients in GF(2^m).
modRing!, - Returns the remainder of a/b with coefficients in GF(2^m).
makePolynomialMonic!, - Returns p as a monic polynomial by dividing p by the
- inverse of its leading coefficient.
inverseRing!, - Computes the inverse of a mod g with coefficients in GF(2^m).
- Throws an exception if the inverse doesn't exist.
isPolynomialIrreducible!, - Checks if the given polynomial has at least one root in GF(2^m).
- TODO: is irreducible the right term here? i guess not
- Returns true if it doesn't have roots, false otherwise.
randomPoly, - Returns a random monic irreducible polynomial of degree t
- over the extension field GF(2^m).
splitPolynomial! - Splits the polynomial p into even and odd terms in GF(2^m).
Goppa [Misc ExtensionField FiniteFieldMatrix Polynomials StatsBase LinearAlgebra DelimitedFiles]
generateGoppaCode, - Generates a (n, k) irreducible linear Goppa code with minimum
- distance d >= 2t + 1. Returns the generator matrix G, the goppa
- polynomial, the code support, and the number of rows k of G.
- return G, goppaPolynomial, codeSupport, k
decode! - Given a msg with noise, finds a codeword in the goppa code defined
- by the goppaPolynomial and codeSupport in GF(2^m)
McEliece [Misc FiniteFieldMatrix GoppaCode Random StatsBase DelimitedFiles]
generateKeys,
saveKeys,
encrypt, - enc returns array of ciphertexts of length k
decrypt,
haltingCheck
Test [McEliece DelimitedFiles]
The text was updated successfully, but these errors were encountered: