Documentation
¶
Index ¶
- type CROSSAllMethods
- type CROSSInstance
- func (c *CROSSInstance[T, P]) DummyKeyGen(seed_sk []byte) KeyPair
- func (c *CROSSInstance[T, P]) DummySign(salt, root_seed, sk, msg []byte) (Signature, error)
- func (c *CROSSInstance[T, P]) Expand_pk(seed_pk []byte) ([]P, []byte)
- func (c *CROSSInstance[T, P]) Expand_sk(seed_sk []byte) ([]P, []byte, []byte, []byte)
- func (c *CROSSInstance[T, P]) GetProtocolData() common.ProtocolData
- func (c *CROSSInstance[T, P]) GetTreeParams() common.TreeParams
- func (c *CROSSInstance[T, P]) KeyGen() KeyPair
- func (c *CROSSInstance[T, P]) Sign(sk, msg []byte) (Signature, error)
- func (c *CROSSInstance[T, P]) ToSig(inp []byte) Signature
- func (c *CROSSInstance[T, P]) TtoByte(arr []T) []byte
- func (c *CROSSInstance[T, P]) Verify(pk Pk, m []byte, sig Signature) (bool, error)
- type CROSSMethods
- type KeyPair
- type Pk
- type Resp_0_struct
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CROSSAllMethods ¶
type CROSSAllMethods interface {
GetProtocolData() common.ProtocolData
GetTreeParams() common.TreeParams
KeyGen() KeyPair
DummyKeyGen(seed_sk []byte) KeyPair
Sign(sk, msg []byte) (Signature, error)
DummySign(salt, root_seed, sk, msg []byte) (Signature, error)
Verify(pk Pk, m []byte, sig Signature) (bool, error)
//arith
Fz_dz_norm_n(v []byte) []byte
Fz_inf_w_by_fz_matrix(fz_vec_e, W_mat []byte) []byte
//seed
SeedLeaves(seed, salt []byte) [][]byte
RebuildLeaves(path [][]byte, salt []byte, chall_2 []bool) ([][]byte, bool)
SeedPath(seed, salt []byte, chall_2 []bool) [][]byte
//merkle
TreeProof(commitments [][]byte, chall_2 []bool) [][]byte
RecomputeRoot(cmt_0, proof [][]byte, chall_2 []bool) ([]byte, bool)
TreeRoot(commitments [][]byte) []byte
//Shake
CSPRNG(seed []byte, output_len int, dsc uint16) []byte
CSPRNG_fz_vec(seed []byte) []byte
CSPRNG_fp_vec(seed []byte) []byte
CSPRNG_fz_inf_w(seed []byte) []byte
CSPRNG_fz_mat(seed []byte) ([]byte, sha3.ShakeHash)
Expand_digest_to_fixed_weight(digest []byte) []bool
}
func NewCROSS ¶
func NewCROSS(scheme_identifier common.CONFIG_IDENT) (CROSSAllMethods, error)
NewCROSS creates a new CROSS instance
type CROSSInstance ¶
func (*CROSSInstance[T, P]) DummyKeyGen ¶
func (c *CROSSInstance[T, P]) DummyKeyGen(seed_sk []byte) KeyPair
Dummy KeyGen function for testing purposes ONLY
func (*CROSSInstance[T, P]) DummySign ¶
func (c *CROSSInstance[T, P]) DummySign(salt, root_seed, sk, msg []byte) (Signature, error)
func (*CROSSInstance[T, P]) Expand_pk ¶
func (c *CROSSInstance[T, P]) Expand_pk(seed_pk []byte) ([]P, []byte)
func (*CROSSInstance[T, P]) Expand_sk ¶
func (c *CROSSInstance[T, P]) Expand_sk(seed_sk []byte) ([]P, []byte, []byte, []byte)
func (*CROSSInstance[T, P]) GetProtocolData ¶
func (c *CROSSInstance[T, P]) GetProtocolData() common.ProtocolData
func (*CROSSInstance[T, P]) GetTreeParams ¶
func (c *CROSSInstance[T, P]) GetTreeParams() common.TreeParams
func (*CROSSInstance[T, P]) KeyGen ¶
func (c *CROSSInstance[T, P]) KeyGen() KeyPair
func (*CROSSInstance[T, P]) Sign ¶
func (c *CROSSInstance[T, P]) Sign(sk, msg []byte) (Signature, error)
func (*CROSSInstance[T, P]) ToSig ¶
func (c *CROSSInstance[T, P]) ToSig(inp []byte) Signature
func (*CROSSInstance[T, P]) TtoByte ¶
func (c *CROSSInstance[T, P]) TtoByte(arr []T) []byte
type CROSSMethods ¶
type Resp_0_struct ¶
Click to show internal directories.
Click to hide internal directories.