Documentation
¶
Overview ¶
Package h2c implements the "Hashing to Elliptic Curves" IETF draft.
Index ¶
- func Edwards25519_XMD_ELL2_NU(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func Edwards25519_XMD_ELL2_RO(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func Edwards25519_XMD_SHA512_ELL2_NU(domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func Edwards25519_XMD_SHA512_ELL2_RO(domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func Edwards25519_XOF_ELL2_NU(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func Edwards25519_XOF_ELL2_RO(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
- func ExpandMessageXMD(out []byte, hFunc crypto.Hash, domainSeparator, message []byte) error
- func ExpandMessageXOF(out []byte, xofFunc sha3.ShakeHash, domainSeparator, message []byte) error
- func Ristretto255_XMD_R255MAP_RO(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.RistrettoPoint, error)
- func Ristretto255_XOF_R255MAP_RO(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.RistrettoPoint, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Edwards25519_XMD_ELL2_NU ¶
func Edwards25519_XMD_ELL2_NU(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XMD_ELL2_NU implements a generic edwards25519 nonuniform suite using `expand_messsage_xmd`.
func Edwards25519_XMD_ELL2_RO ¶
func Edwards25519_XMD_ELL2_RO(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XMD_ELL2_RO implements a generic edwards25519 random oracle suite using `expand_message_xmd`.
func Edwards25519_XMD_SHA512_ELL2_NU ¶
func Edwards25519_XMD_SHA512_ELL2_NU(domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XMD_SHA512_ELL2_NU implements the edwards25519_XMD:SHA-512_ELL2_NU_ suite.
func Edwards25519_XMD_SHA512_ELL2_RO ¶
func Edwards25519_XMD_SHA512_ELL2_RO(domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XMD_SHA512_ELL2_RO implements the edwards25519_XMD:SHA-512_ELL2_RO_ suite.
func Edwards25519_XOF_ELL2_NU ¶
func Edwards25519_XOF_ELL2_NU(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XOF_ELL2_NU implements a generic edwards25519 nonuniform suite using `expand_messsage_xof`.
func Edwards25519_XOF_ELL2_RO ¶
func Edwards25519_XOF_ELL2_RO(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.EdwardsPoint, error)
Edwards25519_XOF_ELL2_RO implements a generic edwards25519 random oracle suite using `expand_message_xof`.
func ExpandMessageXMD ¶
ExpandMessageXMD implements expand_message_xmd, overwriting out with uniformly random data generated by the provided hash function, domain separation tag, and message.
func ExpandMessageXOF ¶
ExpandMessageXOF implements expand_message_xof, overwriting out with uniformly random data generated by the provided extensible-output function, domain separation tag, and message.
Note: This needs to use the Clone() method of the XOF to instantiate a new instance of the XOF. At present there are 3 different XOF interfaces in the x/crypto package, all mutually incompatible due to the return type of Clone(). Complain to the x/crypto developers, not me.
func Ristretto255_XMD_R255MAP_RO ¶
func Ristretto255_XMD_R255MAP_RO(hFunc crypto.Hash, domainSeparator, message []byte) (*curve.RistrettoPoint, error)
Ristretto255_XMD_R255MAP_RO implements a generic ristretto255 random oracle suite using `expand_message_xmd`.
func Ristretto255_XOF_R255MAP_RO ¶
func Ristretto255_XOF_R255MAP_RO(xofFunc sha3.ShakeHash, domainSeparator, message []byte) (*curve.RistrettoPoint, error)
Ristretto255_XOF_R255MAP_RO implements a generic ristretto255 random oracle suite using `expand_message_xof`.
Types ¶
This section is empty.