package pedersen
import "go.dedis.ch/dela/dkg/pedersen"
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
- func NewHandler(privKey kyber.Scalar, me mino.Address) *Handler
- func (h *Handler) Stream(out mino.Sender, in mino.Receiver) error
- type Pedersen
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) Reencrypt ¶
Reencrypt 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
func (*Handler) Stream ¶
Stream implements mino.Handler. It allows one to stream messages to the players.
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
func (*Pedersen) Listen ¶
Listen implements dkg.DKG. It must be called on each node that participates in the DKG. Creates the RPC.
Source Files ¶
crypto.go dkg.go handler.go pedersen.go reencrypt.go state.go
Directories ¶
Path | Synopsis |
---|---|
dkg/pedersen/controller | |
dkg/pedersen/dkgcli | |
dkg/pedersen/json | |
dkg/pedersen/types |
- Version
- v0.1.0 (latest)
- Published
- Apr 10, 2024
- Platform
- linux/amd64
- Imports
- 27 packages
- Last checked
- 1 month ago –
Tools for package owners.