kryptools 1.9.2__tar.gz → 1.9.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kryptools-1.9.2 → kryptools-1.9.3}/PKG-INFO +1 -1
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/__init__.py +1 -1
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/la.py +6 -4
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools.egg-info/PKG-INFO +1 -1
- {kryptools-1.9.2 → kryptools-1.9.3}/pyproject.toml +1 -1
- {kryptools-1.9.2 → kryptools-1.9.3}/LICENSE +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/README.md +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/GF2.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/Zmod.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/aes.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/blockcipher.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/code.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/conway_polynomials.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/des.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/dlp.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/dlp_bsgs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/dlp_ic.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/dlp_qs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/dlp_rho.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/ec.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_dix.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_ecm.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_fmt.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_pm1.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_qs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/factor_rho.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/intfuncs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/keccak.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/lat.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/lat2.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/nt.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/poly.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/primes.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools/sha1.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools.egg-info/SOURCES.txt +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools.egg-info/dependency_links.txt +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/kryptools.egg-info/top_level.txt +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/setup.cfg +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_GF2.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_Zmod.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_aes.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_code.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_des.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_dlog.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_ec.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_factor.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_factor_fmt.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_factor_pm1.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_factor_qs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_intfuncs.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_keccak.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_la.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_lat.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_nt.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_poly.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_primes.py +0 -0
- {kryptools-1.9.2 → kryptools-1.9.3}/tests/test_sha1.py +0 -0
|
@@ -5,7 +5,7 @@ Implemenation of same basic algorithms used in cryptography.
|
|
|
5
5
|
__author__ = "Gerald Teschl"
|
|
6
6
|
__copyright__ = "Copyright 2024-2026, Gerald Teschl"
|
|
7
7
|
__license__ = "MIT License"
|
|
8
|
-
__version__ = "1.9.
|
|
8
|
+
__version__ = "1.9.3"
|
|
9
9
|
__email__ = "Gerald.Teschl@univie.ac.at"
|
|
10
10
|
|
|
11
11
|
from .nt import egcd, cf, convergents, legendre_symbol, jacobi_symbol, sqrt_mod, euler_phi, carmichael_lambda, moebius_mu, is_carmichael_number, order, crt
|
|
@@ -868,17 +868,19 @@ def eye(m: int, n: int = None, zero=0, one=1, ring=None) -> "Matrix":
|
|
|
868
868
|
raise ValueError(f"Matrix dimensions {m}x{n} must be positive!")
|
|
869
869
|
return Matrix([[delta(i, j) for j in range(n)] for i in range(m)], ring=ring)
|
|
870
870
|
|
|
871
|
-
def rotate(l: list, n: int) -> list:
|
|
871
|
+
def rotate(l: list, n: int, skew=False) -> list:
|
|
872
872
|
"Rotate a list cyclically n places to the left."
|
|
873
873
|
n %= len(l)
|
|
874
|
+
if skew:
|
|
875
|
+
return l[n:] + [ -a for a in l[:n] ]
|
|
874
876
|
return l[n:] + l[:n]
|
|
875
877
|
|
|
876
|
-
def circulant(vector: list|tuple, m: int = None, ring=None) -> "Matrix":
|
|
877
|
-
"Returns a circulant matrix from the given vector."
|
|
878
|
+
def circulant(vector: list|tuple, m: int = None, ring=None, skew=False) -> "Matrix":
|
|
879
|
+
"Returns a (skew) circulant matrix from the given vector."
|
|
878
880
|
if m is None:
|
|
879
881
|
m = len(vector)
|
|
880
882
|
vector = list(reversed(vector))
|
|
881
|
-
return Matrix([rotate(vector, -n-1) for n in range(m)], ring=ring)
|
|
883
|
+
return Matrix([rotate(vector, -n-1, skew=skew) for n in range(m)], ring=ring)
|
|
882
884
|
|
|
883
885
|
class BinaryMatrix:
|
|
884
886
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|