kryptools 1.0.2__tar.gz → 1.0.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.
Files changed (51) hide show
  1. {kryptools-1.0.2 → kryptools-1.0.3}/PKG-INFO +1 -1
  2. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/__init__.py +1 -1
  3. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/la.py +6 -0
  4. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/poly.py +9 -1
  5. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools.egg-info/PKG-INFO +1 -1
  6. {kryptools-1.0.2 → kryptools-1.0.3}/pyproject.toml +1 -1
  7. {kryptools-1.0.2 → kryptools-1.0.3}/LICENSE +0 -0
  8. {kryptools-1.0.2 → kryptools-1.0.3}/README.md +0 -0
  9. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/GF2.py +0 -0
  10. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/Zmod.py +0 -0
  11. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/aes.py +0 -0
  12. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/blockcipher.py +0 -0
  13. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/conway_polynomials.py +0 -0
  14. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/des.py +0 -0
  15. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/dlp.py +0 -0
  16. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/dlp_bsgs.py +0 -0
  17. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/dlp_ic.py +0 -0
  18. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/dlp_qs.py +0 -0
  19. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/dlp_rho.py +0 -0
  20. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/ec.py +0 -0
  21. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor.py +0 -0
  22. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_dix.py +0 -0
  23. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_ecm.py +0 -0
  24. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_fmt.py +0 -0
  25. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_pm1.py +0 -0
  26. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_qs.py +0 -0
  27. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/factor_rho.py +0 -0
  28. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/intfuncs.py +0 -0
  29. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/lat.py +0 -0
  30. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/nt.py +0 -0
  31. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools/primes.py +0 -0
  32. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools.egg-info/SOURCES.txt +0 -0
  33. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools.egg-info/dependency_links.txt +0 -0
  34. {kryptools-1.0.2 → kryptools-1.0.3}/kryptools.egg-info/top_level.txt +0 -0
  35. {kryptools-1.0.2 → kryptools-1.0.3}/setup.cfg +0 -0
  36. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_GF2.py +0 -0
  37. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_Zmod.py +0 -0
  38. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_aes.py +0 -0
  39. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_des.py +0 -0
  40. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_dlog.py +0 -0
  41. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_ec.py +0 -0
  42. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_factor.py +0 -0
  43. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_factor_fmt.py +0 -0
  44. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_factor_pm1.py +0 -0
  45. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_factor_qs.py +0 -0
  46. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_intfuncs.py +0 -0
  47. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_la.py +0 -0
  48. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_lat.py +0 -0
  49. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_nt.py +0 -0
  50. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_poly.py +0 -0
  51. {kryptools-1.0.2 → kryptools-1.0.3}/tests/test_primes.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kryptools
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Implemenation of same basic algorithms used in cryptography.
5
5
  Author-email: Gerald Teschl <gerald.teschl@univie.ac.at>
6
6
  License: MIT
@@ -5,7 +5,7 @@ Implemenation of same basic algorithms used in cryptography.
5
5
  __author__ = "Gerald Teschl"
6
6
  __copyright__ = "Copyright 2024, Gerald Teschl"
7
7
  __license__ = "MIT License"
8
- __version__ = "1.0.2"
8
+ __version__ = "1.0.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
@@ -50,6 +50,12 @@ class Matrix:
50
50
  out[i] += self.__class__.print_post
51
51
  return '\n'.join(out)
52
52
 
53
+ def _repr_mimebundle_(self, **kwargs):
54
+ return {
55
+ "text/plain": self.__repr__(),
56
+ "text/latex": "$\\displaystyle" + self.latex() + "$"
57
+ }
58
+
53
59
  def latex(self) -> str:
54
60
  "Produce LaTeX code for the matrix."
55
61
  res = "\\begin{pmatrix}\n"
@@ -44,12 +44,14 @@ class Poly:
44
44
  def __len__(self):
45
45
  return len(self.coeff)
46
46
 
47
- def __repr__(self):
47
+ def __repr__(self, latex = False):
48
48
  def prx(i: int) -> str:
49
49
  if i == 0:
50
50
  return ""
51
51
  if i == 1:
52
52
  return self.__class__.print_x
53
+ if latex:
54
+ return self.__class__.print_x + "^{" + str(i) +"}"
53
55
  return self.__class__.print_x + self.__class__.print_pow + str(i)
54
56
 
55
57
  if not self:
@@ -91,6 +93,12 @@ class Poly:
91
93
  plus = " + "
92
94
  return tmp.strip()
93
95
 
96
+ def _repr_mimebundle_(self, **kwargs):
97
+ return {
98
+ "text/plain": self.__repr__(),
99
+ "text/latex": "$" + self.__repr__(latex = True) + "$"
100
+ }
101
+
94
102
  def __eq__(self, other):
95
103
  if not isinstance(other, self.__class__):
96
104
  return False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kryptools
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Implemenation of same basic algorithms used in cryptography.
5
5
  Author-email: Gerald Teschl <gerald.teschl@univie.ac.at>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kryptools"
3
- version = "1.0.2"
3
+ version = "1.0.3"
4
4
  authors = [
5
5
  { name="Gerald Teschl", email="gerald.teschl@univie.ac.at" },
6
6
  ]
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