ecdsa 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0121dec834c8271050e3f0ac28a4cabd7992312
4
- data.tar.gz: 164644a297bbfba485495e665b93fa88b9e038ee
3
+ metadata.gz: 659d2790437db01e2e7392e4237a3058f9c7a211
4
+ data.tar.gz: 6583a0653af11baae081378b934b49a84deb827c
5
5
  SHA512:
6
- metadata.gz: 8ac219b31a4c03e2d25e0abb85d5c3fef74cca7911e0846f72278cfb7eadb3f1e2592fabacb32419deff5c7f67358a769e22a3a788e960edfdcff40f855e4548
7
- data.tar.gz: 0fea14c24369c83051b5aacc69cd437eae7426e4f47147f524ea5cedb45809ebfc4bdcabac8896b104bcde09badefa6da8cb4a07c449fa9f27ed0a3a9a527a7d
6
+ metadata.gz: 02e6bc216e5f61bf290d2a9386046412de388d135036771da1a9c52a9167268883025b8f50cb0d849a7eeb50782e9cdff181294b2839b82bdfa8e43675545c51
7
+ data.tar.gz: 431eeb2ee94b0515a48ad30d8fd9132c307536707cdf5907646658f3305e894a38e9764b74610af1d7c22e0400b55c718598640be42e1099c77d207b0b19aafc
data/README.md CHANGED
@@ -15,10 +15,10 @@ The pre-existing groups can be seen in the `lib/ecdsa/group` folder, and include
15
15
  defined in [SEC2](http://www.secg.org/collateral/sec2_final.pdf) and [NIST's Recommended Elliptic Curves for Federal Government Use](http://csrc.nist.gov/groups/ST/toolkit/documents/dss/NISTReCur.pdf).
16
16
 
17
17
  This gem does not use any randomness; all the algorithms are deterministic.
18
- In order to sign an ECDSA message, you must generate a secure random number _k_ between 0
18
+ In order to sign a message, you must generate a secure random number _k_ between 0
19
19
  and the order of the group and pass it as an argument to `ECDSA.sign`.
20
20
  You should take measures to ensure that you never use the same random number to sign
21
- two different messages, or else it would be easy for anyone to compute your
21
+ two different messages, or else it would be easy for someone to compute your
22
22
  private key from those two signatures.
23
23
 
24
24
  This gem is hosted at the [DavidEGrayson/ruby_ecdsa github repository](https://github.com/DavidEGrayson/ruby_ecdsa).
@@ -37,4 +37,10 @@ This gem is hosted at the [DavidEGrayson/ruby_ecdsa github repository](https://g
37
37
 
38
38
  This gem was not written by a cryptography expert and has not been carefully checked.
39
39
  It is provided "as is" and it is the user's responsibility to make sure it will be
40
- suitable for the desired purpose.
40
+ suitable for the desired purpose.
41
+
42
+ ## Installation
43
+
44
+ This library is destributed as a gem named [ecdsa](https://rubygems.org/gems/ecdsa) at RubyGems.org. To install it, run:
45
+
46
+ gem install ecdsa
@@ -53,6 +53,7 @@ module ECDSA
53
53
 
54
54
  possible_ys = group.solve_for_y(x)
55
55
  y = possible_ys.find { |py| (py % 2) == y_lsb }
56
+ raise DecodeError, 'Could not solve for y.' if y.nil?
56
57
 
57
58
  finish_decode x, y, group
58
59
  end
data/lib/ecdsa/verify.rb CHANGED
@@ -32,7 +32,7 @@ module ECDSA
32
32
 
33
33
  # Step 5
34
34
  r = group.generator.multiply_by_scalar(u1).add_to_point public_key.multiply_by_scalar(u2)
35
- raise InvalidSignatureError, 'R is infinity in step 5.' if r.infinity?
35
+ raise InvalidSignatureError, 'r is infinity in step 5.' if r.infinity?
36
36
 
37
37
  # Step 6
38
38
  xr = r.x
data/lib/ecdsa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ECDSA
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecdsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Grayson