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 Expander ¶
type Expander struct { Ty ExpanderType ID uint // This id is converted to crytpo.Hash or to xof.Xof }
Expander identifies the type of expander function.
type ExpanderType ¶
type ExpanderType int
ExpanderType is
const ( // XMD denotes an expander based on a Merkle-Damgard hash function. XMD ExpanderType = iota // XOF denotes an expander based on an extendable output function. XOF // OTHER is reserved for user-designed expander functions. OTHER )
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 a byte string. Hash(in []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_XMDSHA256_SSWU_NU_ SuiteID = "P256_XMD:SHA-256_SSWU_NU_" P256_XMDSHA256_SSWU_RO_ SuiteID = "P256_XMD:SHA-256_SSWU_RO_" P256_XMDSHA256_SVDW_NU_ SuiteID = "P256_XMD:SHA-256_SVDW_NU_" P256_XMDSHA256_SVDW_RO_ SuiteID = "P256_XMD:SHA-256_SVDW_RO_" P384_XMDSHA512_SSWU_NU_ SuiteID = "P384_XMD:SHA-512_SSWU_NU_" P384_XMDSHA512_SSWU_RO_ SuiteID = "P384_XMD:SHA-512_SSWU_RO_" P384_XMDSHA512_SVDW_NU_ SuiteID = "P384_XMD:SHA-512_SVDW_NU_" P384_XMDSHA512_SVDW_RO_ SuiteID = "P384_XMD:SHA-512_SVDW_RO_" P521_XMDSHA512_SSWU_NU_ SuiteID = "P521_XMD:SHA-512_SSWU_NU_" P521_XMDSHA512_SSWU_RO_ SuiteID = "P521_XMD:SHA-512_SSWU_RO_" P521_XMDSHA512_SVDW_NU_ SuiteID = "P521_XMD:SHA-512_SVDW_NU_" P521_XMDSHA512_SVDW_RO_ SuiteID = "P521_XMD:SHA-512_SVDW_RO_" Curve25519_XMDSHA256_ELL2_NU_ SuiteID = "curve25519_XMD:SHA-256_ELL2_NU_" Curve25519_XMDSHA256_ELL2_RO_ SuiteID = "curve25519_XMD:SHA-256_ELL2_RO_" Curve25519_XMDSHA512_ELL2_NU_ SuiteID = "curve25519_XMD:SHA-512_ELL2_NU_" Curve25519_XMDSHA512_ELL2_RO_ SuiteID = "curve25519_XMD:SHA-512_ELL2_RO_" Edwards25519_XMDSHA256_ELL2_NU_ SuiteID = "edwards25519_XMD:SHA-256_ELL2_NU_" Edwards25519_XMDSHA256_ELL2_RO_ SuiteID = "edwards25519_XMD:SHA-256_ELL2_RO_" Edwards25519_XMDSHA512_ELL2_NU_ SuiteID = "edwards25519_XMD:SHA-512_ELL2_NU_" Edwards25519_XMDSHA512_ELL2_RO_ SuiteID = "edwards25519_XMD:SHA-512_ELL2_RO_" Curve448_XMDSHA512_ELL2_NU_ SuiteID = "curve448_XMD:SHA-512_ELL2_NU_" Curve448_XMDSHA512_ELL2_RO_ SuiteID = "curve448_XMD:SHA-512_ELL2_RO_" Edwards448_XMDSHA512_ELL2_NU_ SuiteID = "edwards448_XMD:SHA-512_ELL2_NU_" Edwards448_XMDSHA512_ELL2_RO_ SuiteID = "edwards448_XMD:SHA-512_ELL2_RO_" Secp256k1_XMDSHA256_SSWU_NU_ SuiteID = "secp256k1_XMD:SHA-256_SSWU_NU_" Secp256k1_XMDSHA256_SSWU_RO_ SuiteID = "secp256k1_XMD:SHA-256_SSWU_RO_" Secp256k1_XMDSHA256_SVDW_NU_ SuiteID = "secp256k1_XMD:SHA-256_SVDW_NU_" Secp256k1_XMDSHA256_SVDW_RO_ SuiteID = "secp256k1_XMD:SHA-256_SVDW_RO_" BLS12381G1_XMDSHA256_SSWU_NU_ SuiteID = "BLS12381G1_XMD:SHA-256_SSWU_NU_" BLS12381G1_XMDSHA256_SSWU_RO_ SuiteID = "BLS12381G1_XMD:SHA-256_SSWU_RO_" BLS12381G1_XMDSHA256_SVDW_NU_ SuiteID = "BLS12381G1_XMD:SHA-256_SVDW_NU_" BLS12381G1_XMDSHA256_SVDW_RO_ SuiteID = "BLS12381G1_XMD:SHA-256_SVDW_RO_" )
Directories
¶
Path | Synopsis |
---|---|
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.