Module: H2C

Defined in:
lib/h2c.rb,
lib/h2c/m2c.rb,
lib/h2c/suite.rb,
lib/h2c/version.rb,
lib/h2c/expander.rb,
lib/h2c/m2c/sswu.rb,
lib/h2c/m2c/isogeny.rb,
lib/h2c/m2c/sswuab0.rb,
lib/h2c/expander/xmd.rb,
lib/h2c/hash_to_point.rb,
lib/h2c/m2c/isogeny/secp256k1.rb,
lib/h2c/m2c/isogeny/bls12381_g1.rb

Overview

Defined Under Namespace

Modules: Expander, HashFunc, M2C Classes: Error, HashToPoint, Suite

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.get(suite, dst) ⇒ H2C::HashToPoint

Get hash to curve corresponding to suite.

Currently supported are “secp256k1_XMD:SHA-256_SSWU_NU_” and “secp256k1_XMD:SHA-256_SSWU_RO_”.

Parameters:

  • suite (String)

    Suite name for hashing.

  • dst (String)

    Domain separation tag.

Returns:



38
39
40
41
# File 'lib/h2c.rb', line 38

def get(suite, dst)
  suite = Suite.new(suite, dst)
  HashToPoint.new(suite)
end