ecdsa 0.1.3 → 0.1.4
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 +4 -4
- data/README.md +9 -3
- data/lib/ecdsa/format/point_octet_string.rb +1 -0
- data/lib/ecdsa/verify.rb +1 -1
- data/lib/ecdsa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 659d2790437db01e2e7392e4237a3058f9c7a211
|
4
|
+
data.tar.gz: 6583a0653af11baae081378b934b49a84deb827c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
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
|
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, '
|
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