bls12-381 0.1.0 → 0.2.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/README.md +1 -1
- data/lib/bls/point.rb +8 -0
- data/lib/bls/version.rb +1 -1
- 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: 952b53216e9eeccf529ec7547cc4dc21e6a666fdc200f49172f09050967de278
|
|
4
|
+
data.tar.gz: 60b3f46b0bd8c94cf25bfffa0fa9da003b9df30bc740bb604bcb3f2386500125
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 80e3701fff445cdc50c6445fedf6cb67577a5e5ef4916fb4f97293666563474962c84ac8d757b18d53e5608075d8373c4fb3a89cd6e2bbb96cfb5ef608ebc124
|
|
7
|
+
data.tar.gz: f1e23e6abf7d5c17a1b7b7ea0413e2ff18d0ca8901f10a854f63b8043fa0b1ceb4598c8897d17830445b0574ef8b3cdbe1bf9fbac5b455d3c673dcb3c683fc62
|
data/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# BLS12
|
|
1
|
+
# BLS12-381 for Ruby [](https://github.com/azuchi/bls12-381/actions/workflows/main.yml/badge.svg?branch=main) [](https://badge.fury.io/rb/bls12-381) [](LICENSE)
|
|
2
2
|
|
|
3
3
|
This library is a Ruby BLS12-381 implementation based on the JavaScript implementation [noble-bls12-381](https://github.com/paulmillr/noble-bls12-381).
|
|
4
4
|
|
data/lib/bls/point.rb
CHANGED
|
@@ -341,6 +341,14 @@ module BLS
|
|
|
341
341
|
point
|
|
342
342
|
end
|
|
343
343
|
|
|
344
|
+
# Parse Point from private key.
|
|
345
|
+
# @param [String|Integer] private_key a private key with hex or number.
|
|
346
|
+
# @return [PointG1] G1Point corresponding to private keys.
|
|
347
|
+
# @raise [BLS::Error] Occur when the private key is zero.
|
|
348
|
+
def self.from_private_key(private_key)
|
|
349
|
+
BASE * BLS.normalize_priv_key(private_key)
|
|
350
|
+
end
|
|
351
|
+
|
|
344
352
|
# Convert hash to PointG2
|
|
345
353
|
# @param [String] message a hash with hex format.
|
|
346
354
|
# @return [BLS::PointG2] point.
|
data/lib/bls/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bls12-381
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shigeyuki Azuchi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-09-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|