Documentation ¶
Index ¶
- func DeserializeECDSASecp256k1Signature(sigBytes []byte) (*curves.EcdsaSignature, error)
- func GetEncryptionKeyFromSecp256k1(publicKey PubKey) ([]byte, error)
- func GetSecretFromSecp256k1(publicKey PubKey) (*accumulator.SecretKey, error)
- func RunIteratedProtocol(firstParty pv1.Iterator, secondParty pv1.Iterator) (error, error)
- func SerializeECDSASecp256k1Signature(sig *curves.EcdsaSignature) ([]byte, error)
- func StringListToZkElements(strs ...string) []accumulator.Element
- func StringToZkElement(str string) accumulator.Element
- type Accumulator
- type Element
- type KeyshareRole
- type PubKey
- type Secp256k1PublicKey
- type SecretKey
- type ZKAccumulator
- type ZKEphemeralKey
- type ZKSet
- func (c ZKSet) AddElement(pk PubKey, elem string) error
- func (c ZKSet) Decrypt(key PubKey, ciphertext []byte) ([]byte, error)
- func (c ZKSet) Encrypt(key PubKey, bz []byte) ([]byte, error)
- func (s ZKSet) GetAccumulator() *ZKAccumulator
- func (c ZKSet) RemoveElement(pk PubKey, elem string) error
- func (s ZKSet) SetAccumulator(a *ZKAccumulator) error
- func (s ZKSet) String() string
- func (c ZKSet) ValidateMembership(spk PubKey, elem string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeserializeECDSASecp256k1Signature ¶
func DeserializeECDSASecp256k1Signature(sigBytes []byte) (*curves.EcdsaSignature, error)
func GetSecretFromSecp256k1 ¶
func GetSecretFromSecp256k1(publicKey PubKey) (*accumulator.SecretKey, error)
func RunIteratedProtocol ¶
For DKG bob starts first. For refresh and sign, Alice starts first.
func SerializeECDSASecp256k1Signature ¶
func SerializeECDSASecp256k1Signature(sig *curves.EcdsaSignature) ([]byte, error)
func StringListToZkElements ¶
func StringListToZkElements(strs ...string) []accumulator.Element
func StringToZkElement ¶
func StringToZkElement(str string) accumulator.Element
Types ¶
type Accumulator ¶
type Accumulator = accumulator.Accumulator
type Element ¶
type Element = accumulator.Element
type KeyshareRole ¶
type KeyshareRole string
const ( KeyshareRole = "alice" KeyshareRoleUser KeyshareRole = "bob" )KeyshareRolePublic
type PubKey ¶
type PubKey = cryptotypes.PubKey
type Secp256k1PublicKey ¶
type SecretKey ¶
type SecretKey = accumulator.SecretKey
type ZKAccumulator ¶
type ZKAccumulator = accumulator.Accumulator
type ZKEphemeralKey ¶
type ZKEphemeralKey []byte
func GetEphemeralFromSecp256k1 ¶
func GetEphemeralFromSecp256k1(publicKey PubKey) (ZKEphemeralKey, error)
func (ZKEphemeralKey) String ¶
func (zk ZKEphemeralKey) String() string
type ZKSet ¶
type ZKSet string
func CreateZkSet ¶
CreateZkSet creates a new ZKSet from a public key and a list of initial ids
func NewZKSet ¶
func NewZKSet(pubKey *crypto.Secp256k1PubKey, initialIds ...string) (ZKSet, error)
NewZKSet creates a new zero-knowledge set from a list of zero-knowledge proofs.
func (ZKSet) AddElement ¶
AddElement adds an element to the accumulator
func (ZKSet) GetAccumulator ¶
func (s ZKSet) GetAccumulator() *ZKAccumulator
GetAccumulator returns the accumulator for the ZKSet
func (ZKSet) RemoveElement ¶
RemoveElement removes an element from the accumulator
func (ZKSet) SetAccumulator ¶
func (s ZKSet) SetAccumulator(a *ZKAccumulator) error
SetAccumulator sets the accumulator for the ZKSet
Click to show internal directories.
Click to hide internal directories.