paillier 1.2.0 → 1.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 3d489649541fa6f023075161d2d2772bd0d05539
4
- data.tar.gz: 8b6138fbebb78bcb2a8e3360b753bb2a43faa4ab
2
+ SHA256:
3
+ metadata.gz: 7249ae0f52583a0bff4159dc519f60461b2fcd09838b327ba89a7c3a2d45f342
4
+ data.tar.gz: 97c7d194075a08c97cb132e1a66611d13934f86f11c99406856de21ae12c3772
5
5
  SHA512:
6
- metadata.gz: 823b4a093380c87f0403589bf9a982fdf59628ced3df9fdf0bc3c0fbcee0338113d049e6b3423468df3b70570a2540cf95c2f12e5bed958ac07552ea29cb63dd
7
- data.tar.gz: 0b931043d6fefe9bae67ef4765f59098ec8b102244af1fc62a5502c32b8501779bc9fa4bb1879f07825473f85f315a6c9512f9386c537d548c808a55affdb41a
6
+ metadata.gz: 3cf18e9512f89d0f44d0c1f7e2f90b3866f982ed1fa15eb158526d581cb0e2b5bbf351bbae715db8751d325f7637f463f398e752584dd34af1006d9e1bfea86a
7
+ data.tar.gz: 621dc6395654c2c357efe4ef8b5212502327d6d16b44e7225d91485f79a1ccb24622b844cc9aa9f1b647e8f67f29b7a0bdf768df6a4a7e00528c98c2cb1c3502
@@ -98,7 +98,7 @@ module Paillier
98
98
  while( true )
99
99
  # We have to use BigMath here to make sure 'log' doesn't round
100
100
  # to infinity and throw an exception
101
- big_n = BigDecimal.new(pub.n)
101
+ big_n = BigDecimal(pub.n)
102
102
  r = Primes.generateCoprime(BigMath.log(big_n, 2).round, pub.n)
103
103
  if( r > 0 and r < pub.n )
104
104
  break
@@ -27,7 +27,7 @@ module Paillier
27
27
  a = 2 + rand(target-4)
28
28
  x = a.to_bn.mod_exp(d, target)
29
29
  next if x == 1 || x == target-1
30
- for r in (1..s - 1)
30
+ (s - 1).times do
31
31
  x = x.to_bn.mod_exp(2, target)
32
32
  return false if x == 1
33
33
  break if x == target - 1
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paillier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daylighting Society
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 2.6.10
43
+ rubygems_version: 2.7.6
44
44
  signing_key:
45
45
  specification_version: 4
46
46
  summary: Paillier Homomorphic Cryptosystem