hashToScalar

Obtains a suitable secure hash-to-scalar function as defined in RFC9380.

Return

a function mapping arbitrary bytes to a scalar multiplier in [0, ECCurve.order)

Parameters

domain

a suitable domain separation tag (DST) for your use case; this should be unique to this particular use case within your application! see RFC9380 3.1 Domain Separation Requirements for guidance

L

security parameter controlling the drift from uniform; defaults to log2(modulus) * (3/2), which is the value used in RFC9380 suites