bip-schnorr 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -4
- data/README.md +2 -2
- data/lib/schnorr.rb +1 -1
- data/lib/schnorr/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59a58963a82f699909cca6b06ac8dcd548f9bd0422f4bf6e70b97c98dcab5f5a
|
4
|
+
data.tar.gz: 8dbdae61ff3bbcef518572873a2075fe70dffc7db0fe780f535c601f5d23422b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61c23efb396954378c60219d61743d83e6bb50ecfa7ee0e26218c5974e8d52dca4293a5d8c86e4bd0aee87b77d93366bdd4f0c3576064c183d8e93c29d5775b7
|
7
|
+
data.tar.gz: 29a13266559a6d3ec5eb5d856ae1059bf68d5ee429c8c5c803b010a2d1823a252b50f83a2bd7c34cbf85fb03bc2e913ee8ae8bf5233d8a246e8b5395fe276c52
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
## Usage
|
25
25
|
|
26
|
-
###
|
26
|
+
### Signing
|
27
27
|
|
28
28
|
```ruby
|
29
29
|
require 'schnorr'
|
@@ -76,4 +76,4 @@ This library changes the following functions of `ecdsa` gem in `lib/schnorr/ec_p
|
|
76
76
|
* `ECDSA::Point` class has following two instance methods.
|
77
77
|
* `#has_even_y?` check the y-coordinate of this point is an even.
|
78
78
|
* `#encode(only_x = false)` encode this point into a binary string.
|
79
|
-
* `ECDSA::Format::PointOctetString#decode` supports decoding only from x coordinate.
|
79
|
+
* `ECDSA::Format::PointOctetString#decode` supports decoding only from x coordinate.
|
data/lib/schnorr.rb
CHANGED
@@ -61,7 +61,7 @@ module Schnorr
|
|
61
61
|
raise InvalidSignatureError, 'The public key must be a 32-byte array.' unless public_key.bytesize == 32
|
62
62
|
|
63
63
|
sig = Schnorr::Signature.decode(signature)
|
64
|
-
pubkey = ECDSA::Format::PointOctetString.
|
64
|
+
pubkey = ECDSA::Format::PointOctetString.decode_from_x(public_key, GROUP)
|
65
65
|
field = GROUP.field
|
66
66
|
|
67
67
|
raise Schnorr::InvalidSignatureError, 'Invalid signature: r is zero.' if sig.r.zero?
|
data/lib/schnorr/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bip-schnorr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ecdsa
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
|
-
rubygems_version: 3.
|
112
|
+
rubygems_version: 3.1.4
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: The ruby implementation of bip-schnorr.
|