Documentation
¶
Overview ¶
Package expand implements message expansion according to RFC9380.
This package implements the expand_message_xmd function from RFC9380 Section 5.3.1. The package uses hard-coded hash function SHA2-256.
Please open issue in gnark repository in case there is a need for using other hash functions beyond SHA2-256 or expand_message_xof using extendable-output function (SHAKE3 family etc.). We currently have implemented only specific instance for compatibility with gnark-crypto, which is available at github.com/consensys/gnark-crypto/field/hash.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandMsgXmd ¶
ExpandMsgXmd implements the expand_message_xmd function from RFC9380 Section 5.3.1. It is hardcoded to use SHA2-256 as the hash function (but can be made optionally configurable in the future).
It expand a message `msg` with a fixed domain separation tag `dst` to a slice of length `lenInBytes`.
For gnark-crypto implementation see gnark-crypto.
Types ¶
This section is empty.