lazy_rsa 0.3.7 → 0.3.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lazy_rsa.rb +2 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d82c509b57e993bf749370f60576fd0ca67065bd42872470e50e581aa5ed4054
4
- data.tar.gz: d66fd6952a570c28a5b35a203036e839e8afaee03d659d18df06785c6d55252c
3
+ metadata.gz: cccc75263a2e8af28c8ca5611c1bb50482f96c1abf8a3df05829692527318597
4
+ data.tar.gz: 9d366feaff5efac3686308152de46eaadb9053ab6950ee77a1a412402e0471be
5
5
  SHA512:
6
- metadata.gz: 5c61af315c46dae91905a437c16f2c70c265a018ff5fe93c2d78899f5924c020477ab2da3be347a96125821de8c03edc93f3f0ea150bda7fa471c954bdb048bd
7
- data.tar.gz: c079c3ce8a79ae3404b9cd00b0fed0bb65d29832d5b6bdf3fa59639989376c0b0470a6d407f05116ea1657f7a3ab670f23bbe0fde383540e34e62107d459be07
6
+ metadata.gz: ba51891aae0d13c0795c3ff036e6fb9a1ecec913aed70b6d932252ce1b02f46b5f563d421884b9c7cccadd2e7e28fa51bf4481b7c0fa8c5214c944451846e620
7
+ data.tar.gz: 3c75a367345f92b65701b6393a5667610e215240e109148bcd52b2286a62ee15874a6a03c9274508a64b73f4ed679f5a70e2abd0eb5d45629241c6713194ff82
data/lib/lazy_rsa.rb CHANGED
@@ -22,10 +22,10 @@ module LazyRsa
22
22
  loop do
23
23
  p = OpenSSL::BN.generate_prime(512)
24
24
  phi = (p - 1) * (q - 1)
25
- break if q.gcd(phi) == 1
25
+ e = p.mod_exp(SECURE_EXPONENT, SECURE_MODULUS)
26
+ break if e.gcd(phi) == 1
26
27
  end
27
28
  n = p * q
28
- e = p.mod_exp(SECURE_EXPONENT, SECURE_MODULUS)
29
29
  d = e.mod_inverse(phi)
30
30
 
31
31
  build_key(e:, d:, n:)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazy_rsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Quaranto