bip-schnorr 0.5.0 → 0.6.0
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/lib/schnorr/version.rb +1 -1
- data/lib/schnorr.rb +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b728c49a4a5ce1d674d0db21d5e7dfd2771bd5f13f20a368ac95fdf42c8b2fcd
|
4
|
+
data.tar.gz: fd169afb436506a4e6797c3593331d83773ab79762625f53754d549f2e93a2c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a011fd1d9fd3e5285065d42a7a9fd3fed8a15cb4b40e3b4975dbae3d3ed314c7b9c54d649b3a360c273828c6da91d0624fdb255d02ef4018da2d27af8cdf94
|
7
|
+
data.tar.gz: a1cc7d6de6e931ae81ee5f9144505c7af14da0bc9e6fb35f999bd163d3650378d357072923ceb8744b1627386dbbb0d12b6483161ef5b3f8c03f928fe10d8d90
|
data/lib/schnorr/version.rb
CHANGED
data/lib/schnorr.rb
CHANGED
@@ -18,7 +18,6 @@ module Schnorr
|
|
18
18
|
# If not specified, random data is not used and the private key is used to calculate the nonce.
|
19
19
|
# @return [Schnorr::Signature]
|
20
20
|
def sign(message, private_key, aux_rand = nil)
|
21
|
-
raise 'The message must be a 32-byte array.' unless message.bytesize == 32
|
22
21
|
private_key = private_key.unpack1('H*') unless hex_string?(private_key)
|
23
22
|
|
24
23
|
d0 = private_key.to_i(16)
|
@@ -66,7 +65,6 @@ module Schnorr
|
|
66
65
|
def check_sig!(message, public_key, signature)
|
67
66
|
message = hex2bin(message)
|
68
67
|
public_key = hex2bin(public_key)
|
69
|
-
raise InvalidSignatureError, 'The message must be a 32-byte array.' unless message.bytesize == 32
|
70
68
|
public_key = [public_key].pack('H*') if hex_string?(public_key)
|
71
69
|
raise InvalidSignatureError, 'The public key must be a 32-byte array.' unless public_key.bytesize == 32
|
72
70
|
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- azuchi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ecdsa_ext
|