pryvx 2.1.0__tar.gz → 2.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pryvx
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: A comprehensive package for privacy-enhancing technologies
5
5
  Home-page: UNKNOWN
6
6
  Author: PryvX (Jayesh Kenaudekar)
@@ -49,4 +49,11 @@ class PHE:
49
49
  def homomorphic_add(c1, c2, public_key):
50
50
  n, _ = public_key
51
51
  n2 = n * n
52
- return (c1 * c2) % n2
52
+ return (c1 * c2) % n2
53
+
54
+ @staticmethod
55
+ def homomorphic_sub(c1, c2, public_key):
56
+ n, _ = public_key
57
+ n2 = n * n
58
+ c2_inv = mod_inverse(c2, n2)
59
+ return (c1 * c2_inv) % n2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pryvx
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: A comprehensive package for privacy-enhancing technologies
5
5
  Home-page: UNKNOWN
6
6
  Author: PryvX (Jayesh Kenaudekar)
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- VERSION = '2.1.0'
3
+ VERSION = '2.2.0'
4
4
 
5
5
 
6
6
  # Setting up
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