Documentation
¶
Index ¶
- type Actor
- func (a *Actor) Decrypt(K kyber.Point, Cs []kyber.Point) ([]byte, error)
- func (a *Actor) Encrypt(msg []byte) (kyber.Point, []kyber.Point, error)
- func (a *Actor) GetPublicKey() (kyber.Point, error)
- func (a *Actor) Reencrypt(K kyber.Point, pubk kyber.Point) (XhatEnc kyber.Point, err error)
- func (a *Actor) Reshare(coAuth crypto.CollectiveAuthority, thresholdNew int) error
- func (a *Actor) Setup(coAuth crypto.CollectiveAuthority, threshold int) (kyber.Point, error)
- func (a *Actor) VerifiableDecrypt(ciphertexts []types.Ciphertext) ([][]byte, error)
- func (a *Actor) VerifiableEncrypt(message []byte, GBar kyber.Point) (types.Ciphertext, []byte, error)
- type Handler
- type Pedersen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
Actor allows one to perform DKG operations like encrypt/decrypt a message
Currently, a lot of the Actor code is dealing with low-level crypto. TODO: split (high-level) Actor functions and (low-level) DKG crypto. (#241)
- implements dkg.Actor
func (*Actor) Decrypt ¶
Decrypt implements dkg.Actor. It gets the private shares of the nodes and decrypt the message.
func (*Actor) Encrypt ¶
Encrypt implements dkg.Actor. It uses the DKG public key to encrypt a message, and returns a random, ephemeral part K and the cipher as an array of Kyber points
func (*Actor) GetPublicKey ¶
GetPublicKey implements dkg.Actor
func (*Actor) Reshare ¶
func (a *Actor) Reshare(coAuth crypto.CollectiveAuthority, thresholdNew int) error
Reshare implements dkg.Actor. It recreates the DKG with an updated list of participants.
func (*Actor) Setup ¶
func (a *Actor) Setup(coAuth crypto.CollectiveAuthority, threshold int) (kyber.Point, error)
Setup implement dkg.Actor. It initializes the DKG.
func (*Actor) VerifiableDecrypt ¶
func (a *Actor) VerifiableDecrypt(ciphertexts []types.Ciphertext) ([][]byte, error)
VerifiableDecrypt implements dkg.Actor. It does as Decrypt() but in addition it checks whether the decryption proofs are valid.
See https://arxiv.org/pdf/2205.08529.pdf / section 5.4 Protocol / step 3
func (*Actor) VerifiableEncrypt ¶
func (a *Actor) VerifiableEncrypt(message []byte, GBar kyber.Point) (types.Ciphertext, []byte, error)
VerifiableEncrypt implements dkg.Actor. It uses the DKG public key to encrypt a message and provide a zero knowledge proof that the encryption is done by this person.
See https://arxiv.org/pdf/2205.08529.pdf / section 5.4 Protocol / step 1
type Handler ¶
type Handler struct { mino.UnsupportedHandler sync.RWMutex // contains filtered or unexported fields }
Handler represents the RPC executed on each node
- implements mino.Handler
func NewHandler ¶
NewHandler creates a new handler
type Pedersen ¶
type Pedersen struct {
// contains filtered or unexported fields
}
Pedersen allows one to initialize a new DKG protocol.
- implements dkg.DKG
func NewPedersen ¶
NewPedersen returns a new DKG Pedersen factory