Documentation
¶
Overview ¶
Package hash2curve Hashing to Elliptic Curves as specified in RFC 9380 (https://datatracker.ietf.org/doc/rfc9380).
Index ¶
- func ExpandXMD(id crypto.Hash, input, dst []byte, length uint) []byte
- func ExpandXOF(ext *hash.ExtendableHash, input, dst []byte, length uint) []byte
- func HashToFieldXMD(id crypto.Hash, input, dst []byte, count, ext, securityLength uint, ...) []*big.Int
- func HashToFieldXOF(id *hash.ExtendableHash, input, dst []byte, count, ext, securityLength uint, ...) []*big.Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandXMD ¶
ExpandXMD expands the input and dst using the given fixed length hash function. - dst MUST be non-nil, longer than 0 and lower than 256. It's recommended that DST at least 16 bytes long. - length must be a positive integer lower than 255 * (size of digest).
func ExpandXOF ¶
func ExpandXOF(ext *hash.ExtendableHash, input, dst []byte, length uint) []byte
ExpandXOF expands the input and dst using the given extendable output hash function. - dst MUST be non-nil and its length longer than 0. It's recommended that DST at least 16 bytes long. - length must be a positive integer higher than 32.
func HashToFieldXMD ¶
func HashToFieldXMD(id crypto.Hash, input, dst []byte, count, ext, securityLength uint, modulo *big.Int) []*big.Int
HashToFieldXMD hashes the input with the domain separation tag (dst) to an integer under modulo, using a merkle-damgard based expander (e.g. SHA256). - dst MUST be non-nil, longer than 0 and lower than 256. It's recommended that DST at least 16 bytes long. - count * ext * securityLength must be a positive integer lower than 255 * (size of digest).
func HashToFieldXOF ¶
func HashToFieldXOF( id *hash.ExtendableHash, input, dst []byte, count, ext, securityLength uint, modulo *big.Int, ) []*big.Int
HashToFieldXOF hashes the input with the domain separation tag (dst) to an integer under modulo, using an extensible output function (e.g. SHAKE). - dst MUST be non-nil and its length longer than 0. It's recommended that DST at least 16 bytes long. - count * ext * securityLength must be positive integers higher than 32.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package edwards25519 implements RFC9380 for the edwards25519 group, and returns points and scalars in filippo.io/edwards25519.
|
Package edwards25519 implements RFC9380 for the edwards25519 group, and returns points and scalars in filippo.io/edwards25519. |
Package internal values, structures, and functions that are not part of the public API.
|
Package internal values, structures, and functions that are not part of the public API. |
nist
|
|
internal
Package internal implements the core functionalities for RFC9380 on NIST groups.
|
Package internal implements the core functionalities for RFC9380 on NIST groups. |
internal/field
Package field provides modular operations over very high integers.
|
Package field provides modular operations over very high integers. |
p256
Package p256 implements RFC9380 for the P256 group.
|
Package p256 implements RFC9380 for the P256 group. |
p384
Package p384 implements RFC9380 for the P384 group.
|
Package p384 implements RFC9380 for the P384 group. |
p521
Package p521 implements RFC9380 for the P521 group.
|
Package p521 implements RFC9380 for the P521 group. |
Package ristretto255 implements RFC9380 for the ristretto255 group, and returns points and scalar from github.com/gtank/ristretto255.
|
Package ristretto255 implements RFC9380 for the ristretto255 group, and returns points and scalar from github.com/gtank/ristretto255. |
Package secp256k1 implements RFC9380 for the secp256k1 group.
|
Package secp256k1 implements RFC9380 for the secp256k1 group. |