Skip to content

Commit

Permalink
Fix rubocop error
Browse files Browse the repository at this point in the history
  • Loading branch information
azuchi committed Feb 6, 2024
1 parent 787f75a commit 1aea212
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/h2c/hash_to_point.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def digest(msg)
# https://www.ietf.org/archive/id/draft-irtf-cfrg-hash-to-curve-16.html#name-hash_to_field-implementatio
# @param [String] msg A byte string containing the message to hash.
# @param [Integer] count The number of elements of Field to output.
# @param [Integer] modulo (Optional) This value is a finite field of characteristic p in the hash to curve specification.
# Other protocols such as FROST can be order of curve.
# @param [Integer] modulo (Optional) This value is a finite field of characteristic p in the
# hash to curve specification. Other protocols such as FROST can be order of curve.
# @return [Array]
def hash_to_field(msg, count, modulo = suite.curve.field.prime)
len = count * suite.m * suite.l
Expand Down
4 changes: 2 additions & 2 deletions spec/h2c/hash_to_point_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
describe "hash to field" do
context "with modulo" do
it do
dst = "FROST-secp256k1-SHA256-v1" + "nonce"
dst = "FROST-secp256k1-SHA256-v1nonce"
h2c = H2C.get(H2C::Suite::SECP256K1_XMDSHA256_SSWU_NU_, dst)
msg = [
"7ea5ed09af19f6ff21040c07ec2d2adbd35b759da5a401d4c99dd26b82391cb208f89ffe80ac94dcb920c26f3f46140bfc7f95b493f8310f5fc1ea2b01f4254c"
"7ea5ed09af19f6ff21040c07ec2d2adbd35b759da5a401d4c99dd26b82391cb208f89ffe80ac94dcb920c26f3f46140bfc7f95b493f8310f5fc1ea2b01f4254c" # rubocop:disable all
].pack("H*")
field = h2c.hash_to_field(msg, 1, ECDSA::Group::Secp256k1.order).first
expect(field).to eq(
Expand Down

0 comments on commit 1aea212

Please sign in to comment.