Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandMsgXmd ¶ added in v0.3.4
ExpandMsgXmd expands msg to a slice of lenInBytes bytes. https://tools.ietf.org/html/draft-irtf-cfrg-hash-to-curve-06#section-5 https://tools.ietf.org/html/rfc8017#section-4.1 (I2OSP/O2ISP)
func NafDecomposition ¶
NafDecomposition gets the naf decomposition of a big number
func PrecomputeLattice ¶ added in v0.3.0
PrecomputeLattice res such that res.V1, res.V2 are short vectors satisfying v11+v12lambda=v21+v22lambda=0[r]. cf https://www.iacr.org/archive/crypto2001/21390189.pdf
func SplitScalar ¶ added in v0.3.0
SplitScalar outputs u,v such that u+vlambda=s[r]. The method is to view s as (s,0) in ZxZ, and find a close vector w of (s,0) in <l>, where l is a sub Z-module of ker((a,b)->a+blambda[r]): then (u,v)=w-(s,0), and u+vlambda=s[r]. cf https://www.iacr.org/archive/crypto2001/21390189.pdf