Documentation ¶
Overview ¶
Package h2c provides implementations of hashing functions that take arbitrary-length byte strings and output a point on an elliptic curve.
These methods follow the current work-in-progress standardization effort at IETF https://datatracker.ietf.org/doc/draft-irtf-cfrg-hash-to-curve.
Version: draft-irtf-cfrg-hash-to-curve-05
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashToPoint ¶
type HashToPoint interface { // IsRandomOracle returns true if the output distribution is // indifferentiable from a random oracle. IsRandomOracle() bool // Hash returns a point on an elliptic curve given as input a string and a // domain separation tag. Hash(in, dst []byte) C.Point // GetCurve returns the destination elliptic curve. GetCurve() C.EllCurve }
HashToPoint represents a complete and secure function for hashing strings to points.
type SuiteID ¶
type SuiteID string
SuiteID is the identifier of supported hash to curve suites.
const ( P256_SHA256_SSWU_NU_ SuiteID = "P256-SHA256-SSWU-NU-" P256_SHA256_SSWU_RO_ SuiteID = "P256-SHA256-SSWU-RO-" P256_SHA256_SVDW_NU_ SuiteID = "P256-SHA256-SVDW-NU-" P256_SHA256_SVDW_RO_ SuiteID = "P256-SHA256-SVDW-RO-" P384_SHA512_SSWU_NU_ SuiteID = "P384-SHA512-SSWU-NU-" P384_SHA512_SSWU_RO_ SuiteID = "P384-SHA512-SSWU-RO-" P384_SHA512_SVDW_NU_ SuiteID = "P384-SHA512-SVDW-NU-" P384_SHA512_SVDW_RO_ SuiteID = "P384-SHA512-SVDW-RO-" P521_SHA512_SSWU_NU_ SuiteID = "P521-SHA512-SSWU-NU-" P521_SHA512_SSWU_RO_ SuiteID = "P521-SHA512-SSWU-RO-" P521_SHA512_SVDW_NU_ SuiteID = "P521-SHA512-SVDW-NU-" P521_SHA512_SVDW_RO_ SuiteID = "P521-SHA512-SVDW-RO-" Curve25519_SHA256_ELL2_NU_ SuiteID = "curve25519-SHA256-ELL2-NU-" Curve25519_SHA256_ELL2_RO_ SuiteID = "curve25519-SHA256-ELL2-RO-" Edwards25519_SHA256_EDELL2_NU_ SuiteID = "edwards25519-SHA256-EDELL2-NU-" Edwards25519_SHA256_EDELL2_RO_ SuiteID = "edwards25519-SHA256-EDELL2-RO-" Curve448_SHA512_ELL2_NU_ SuiteID = "curve448-SHA512-ELL2-NU-" Curve448_SHA512_ELL2_RO_ SuiteID = "curve448-SHA512-ELL2-RO-" Edwards448_SHA512_EDELL2_NU_ SuiteID = "edwards448-SHA512-EDELL2-NU-" Edwards448_SHA512_EDELL2_RO_ SuiteID = "edwards448-SHA512-EDELL2-RO-" SECP256k1_SHA256_SSWU_NU_ SuiteID = "secp256k1-SHA256-SSWU-NU-" SECP256k1_SHA256_SSWU_RO_ SuiteID = "secp256k1-SHA256-SSWU-RO-" SECP256k1_SHA256_SVDW_NU_ SuiteID = "secp256k1-SHA256-SVDW-NU-" SECP256k1_SHA256_SVDW_RO_ SuiteID = "secp256k1-SHA256-SVDW-RO-" BLS12381G1_SHA256_SSWU_NU_ SuiteID = "BLS12381G1-SHA256-SSWU-NU-" BLS12381G1_SHA256_SSWU_RO_ SuiteID = "BLS12381G1-SHA256-SSWU-RO-" BLS12381G1_SHA256_SVDW_NU_ SuiteID = "BLS12381G1-SHA256-SVDW-NU-" BLS12381G1_SHA256_SVDW_RO_ SuiteID = "BLS12381G1-SHA256-SVDW-RO-" )
func (SuiteID) Get ¶
func (id SuiteID) Get() (HashToPoint, error)
Get returns a HashToPoint based on the SuiteID, otherwise returns an error if the SuiteID is not supported or invalid.
Directories ¶
Path | Synopsis |
---|---|
Package curve provides definitions of several models of elliptic curves defined over finite fields of large prime characteristic.
|
Package curve provides definitions of several models of elliptic curves defined over finite fields of large prime characteristic. |
Package field provides implementations of finite fields of large-prime characteristic.
|
Package field provides implementations of finite fields of large-prime characteristic. |
internal
|
|
toy
Package toy provides small instances of elliptic curves.
|
Package toy provides small instances of elliptic curves. |
Package mapping contains a set of functions to construct functions that take a field element and return a point on an elliptic curve.
|
Package mapping contains a set of functions to construct functions that take a field element and return a point on an elliptic curve. |
Click to show internal directories.
Click to hide internal directories.