package types
import "go.dedis.ch/dela/dkg/pedersen/types"
Index ¶
- func RegisterMessageFormat(c serde.Format, f serde.FormatEngine)
- type AddrKey
- type Ciphertext
- type Deal
- func NewDeal(index uint32, sig []byte, e EncryptedDeal) Deal
- func (d Deal) GetEncryptedDeal() EncryptedDeal
- func (d Deal) GetIndex() uint32
- func (d Deal) GetSignature() []byte
- func (d Deal) Serialize(ctx serde.Context) ([]byte, error)
- type DealerResponse
- func NewDealerResponse(index uint32, status bool, sessionID, sig []byte) DealerResponse
- func (dresp DealerResponse) GetIndex() uint32
- func (dresp DealerResponse) GetSessionID() []byte
- func (dresp DealerResponse) GetSignature() []byte
- func (dresp DealerResponse) GetStatus() bool
- type DecryptReply
- func NewDecryptReply(i int64, v kyber.Point) DecryptReply
- func (resp DecryptReply) GetI() int64
- func (resp DecryptReply) GetV() kyber.Point
- func (resp DecryptReply) Serialize(ctx serde.Context) ([]byte, error)
- type DecryptRequest
- func NewDecryptRequest(k, c kyber.Point) DecryptRequest
- func (req DecryptRequest) GetC() kyber.Point
- func (req DecryptRequest) GetK() kyber.Point
- func (req DecryptRequest) Serialize(ctx serde.Context) ([]byte, error)
- type EncryptedDeal
- func NewEncryptedDeal(dhkey, sig, nonce, cipher []byte) EncryptedDeal
- func (d EncryptedDeal) GetCipher() []byte
- func (d EncryptedDeal) GetDHKey() []byte
- func (d EncryptedDeal) GetNonce() []byte
- func (d EncryptedDeal) GetSignature() []byte
- type MessageFactory
- func NewMessageFactory(f mino.AddressFactory) MessageFactory
- func (f MessageFactory) Deserialize(ctx serde.Context, data []byte) (serde.Message, error)
- type ReencryptReply
- func NewReencryptReply(pubk kyber.Point, ui *share.PubShare, ei, fi kyber.Scalar) ReencryptReply
- func (reply ReencryptReply) GetI() int
- func (reply ReencryptReply) GetV() kyber.Point
- func (reply ReencryptReply) Serialize(ctx serde.Context) ([]byte, error)
- type ReencryptRequest
- func NewReencryptRequest(k, pubk kyber.Point) *ReencryptRequest
- func (req ReencryptRequest) Serialize(ctx serde.Context) ([]byte, error)
- type Reshare
- func NewReshare(deal Deal, publicCoeff []kyber.Point) Reshare
- func (d Reshare) GetDeal() Deal
- func (d Reshare) GetPublicCoeffs() []kyber.Point
- func (d Reshare) Serialize(ctx serde.Context) ([]byte, error)
- type Response
- func NewResponse(index uint32, r DealerResponse) Response
- func (r Response) GetIndex() uint32
- func (r Response) GetResponse() DealerResponse
- func (r Response) Serialize(ctx serde.Context) ([]byte, error)
- type ShareAndProof
- type Start
- func NewStart(thres int, addrs []mino.Address, pubkeys []kyber.Point) Start
- func (s Start) GetAddresses() []mino.Address
- func (s Start) GetPublicKeys() []kyber.Point
- func (s Start) GetThreshold() int
- func (s Start) Serialize(ctx serde.Context) ([]byte, error)
- type StartDone
- func NewStartDone(pubkey kyber.Point) StartDone
- func (s StartDone) GetPublicKey() kyber.Point
- func (s StartDone) Serialize(ctx serde.Context) ([]byte, error)
- type StartResharing
- func NewStartResharing(tNew int, tOld int, addrsNew []mino.Address, addrsOld []mino.Address, pubkeysNew []kyber.Point, pubkeysOld []kyber.Point) StartResharing
- func (r StartResharing) GetAddrsNew() []mino.Address
- func (r StartResharing) GetAddrsOld() []mino.Address
- func (r StartResharing) GetPubkeysNew() []kyber.Point
- func (r StartResharing) GetPubkeysOld() []kyber.Point
- func (r StartResharing) GetTNew() int
- func (r StartResharing) GetTOld() int
- func (r StartResharing) Serialize(ctx serde.Context) ([]byte, error)
- type VerifiableDecryptReply
- func NewVerifiableDecryptReply(shareAndProof []ShareAndProof) VerifiableDecryptReply
- func (resp VerifiableDecryptReply) GetShareAndProof() []ShareAndProof
- func (resp VerifiableDecryptReply) Serialize(ctx serde.Context) ([]byte, error)
- type VerifiableDecryptRequest
Functions ¶
func RegisterMessageFormat ¶
func RegisterMessageFormat(c serde.Format, f serde.FormatEngine)
RegisterMessageFormat register the engine for the provided format.
Types ¶
type AddrKey ¶
type AddrKey struct{}
AddrKey is the key for the address factory.
type Ciphertext ¶
type Ciphertext struct { K kyber.Point // r C kyber.Point // C UBar kyber.Point // ubar E kyber.Scalar // e F kyber.Scalar // f GBar kyber.Point // GBar }
Ciphertext provides the verifiable encryption function. A description can be found in https://arxiv.org/pdf/2205.08529.pdf. The equivalent of each parameter in the paper is written in front of it.
type Deal ¶
type Deal struct {
// contains filtered or unexported fields
}
Deal matches the attributes defined in kyber dkg.Deal.
- implements serde.Message
func NewDeal ¶
func NewDeal(index uint32, sig []byte, e EncryptedDeal) Deal
NewDeal creates a new deal.
func (Deal) GetEncryptedDeal ¶
func (d Deal) GetEncryptedDeal() EncryptedDeal
GetEncryptedDeal returns the encrypted deal.
func (Deal) GetIndex ¶
GetIndex returns the index.
func (Deal) GetSignature ¶
GetSignature returns the signature in bytes.
func (Deal) Serialize ¶
Serialize implements serde.Message.
type DealerResponse ¶
type DealerResponse struct {
// contains filtered or unexported fields
}
DealerResponse is a response of a single dealer.
func NewDealerResponse ¶
func NewDealerResponse(index uint32, status bool, sessionID, sig []byte) DealerResponse
NewDealerResponse creates a new dealer response.
func (DealerResponse) GetIndex ¶
func (dresp DealerResponse) GetIndex() uint32
GetIndex returns the index.
func (DealerResponse) GetSessionID ¶
func (dresp DealerResponse) GetSessionID() []byte
GetSessionID returns the session ID in bytes.
func (DealerResponse) GetSignature ¶
func (dresp DealerResponse) GetSignature() []byte
GetSignature returns the signature in bytes.
func (DealerResponse) GetStatus ¶
func (dresp DealerResponse) GetStatus() bool
GetStatus returns the status.
type DecryptReply ¶
type DecryptReply struct { V kyber.Point I int64 }
DecryptReply is the response of a decryption request.
- implements serde.Message
func NewDecryptReply ¶
func NewDecryptReply(i int64, v kyber.Point) DecryptReply
NewDecryptReply returns a new decryption reply.
func (DecryptReply) GetI ¶
func (resp DecryptReply) GetI() int64
GetI returns I.
func (DecryptReply) GetV ¶
func (resp DecryptReply) GetV() kyber.Point
GetV returns V.
func (DecryptReply) Serialize ¶
func (resp DecryptReply) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
type DecryptRequest ¶
type DecryptRequest struct { K kyber.Point C kyber.Point }
DecryptRequest is a message sent to request a decryption.
- implements serde.Message
func NewDecryptRequest ¶
func NewDecryptRequest(k, c kyber.Point) DecryptRequest
NewDecryptRequest creates a new decryption request.
func (DecryptRequest) GetC ¶
func (req DecryptRequest) GetC() kyber.Point
GetC returns C.
func (DecryptRequest) GetK ¶
func (req DecryptRequest) GetK() kyber.Point
GetK returns K.
func (DecryptRequest) Serialize ¶
func (req DecryptRequest) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
type EncryptedDeal ¶
type EncryptedDeal struct {
// contains filtered or unexported fields
}
EncryptedDeal contains the different parameters and data of an encrypted deal.
func NewEncryptedDeal ¶
func NewEncryptedDeal(dhkey, sig, nonce, cipher []byte) EncryptedDeal
NewEncryptedDeal creates a new encrypted deal message.
func (EncryptedDeal) GetCipher ¶
func (d EncryptedDeal) GetCipher() []byte
GetCipher returns the cipher in bytes.
func (EncryptedDeal) GetDHKey ¶
func (d EncryptedDeal) GetDHKey() []byte
GetDHKey returns the Diffie-Helmann key in bytes.
func (EncryptedDeal) GetNonce ¶
func (d EncryptedDeal) GetNonce() []byte
GetNonce returns the nonce in bytes.
func (EncryptedDeal) GetSignature ¶
func (d EncryptedDeal) GetSignature() []byte
GetSignature returns the signatures in bytes.
type MessageFactory ¶
type MessageFactory struct {
// contains filtered or unexported fields
}
MessageFactory is a message factory for the different DKG messages.
- implements serde.Factory
func NewMessageFactory ¶
func NewMessageFactory(f mino.AddressFactory) MessageFactory
NewMessageFactory returns a message factory for the DKG.
func (MessageFactory) Deserialize ¶
Deserialize implements serde.Factory.
type ReencryptReply ¶
ReencryptReply returns the share to re-encrypt from one node
func NewReencryptReply ¶
func NewReencryptReply(pubk kyber.Point, ui *share.PubShare, ei, fi kyber.Scalar) ReencryptReply
NewReencryptReply creates a new decryption request.
func (ReencryptReply) GetI ¶
func (reply ReencryptReply) GetI() int
GetI returns I.
func (ReencryptReply) GetV ¶
func (reply ReencryptReply) GetV() kyber.Point
GetV returns V.
func (ReencryptReply) Serialize ¶
func (reply ReencryptReply) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
type ReencryptRequest ¶
type ReencryptRequest struct { K kyber.Point PubK kyber.Point }
ReencryptRequest share is sent to a node in order to reencrypt a secret using the original randomness K from the write request and the public key PubK from the reader
func NewReencryptRequest ¶
func NewReencryptRequest(k, pubk kyber.Point) *ReencryptRequest
NewReencryptRequest creates a new reencryption request.
func (ReencryptRequest) Serialize ¶
func (req ReencryptRequest) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
type Reshare ¶
type Reshare struct {
// contains filtered or unexported fields
}
Reshare messages for resharing process - implements serde.Message
func NewReshare ¶
NewReshare creates a new deal.
func (Reshare) GetDeal ¶
GetDeal returns the deal.
func (Reshare) GetPublicCoeffs ¶
func (d Reshare) GetPublicCoeffs() []kyber.Point
GetPublicCoeffs returns the public coeff.
func (Reshare) Serialize ¶
Serialize implements serde.Message.
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response matches the attributes defined in kyber pedersen.Response.
- implements serde.Message
func NewResponse ¶
func NewResponse(index uint32, r DealerResponse) Response
NewResponse creates a new response.
func (Response) GetIndex ¶
GetIndex returns the index.
func (Response) GetResponse ¶
func (r Response) GetResponse() DealerResponse
GetResponse returns the dealer response.
func (Response) Serialize ¶
Serialize implements serde.Message.
type ShareAndProof ¶
type ShareAndProof struct { int64 kyber.Point // u_i kyber.Scalar // e_i kyber.Scalar // f_i kyber.Point // h_i }kyber.Point
ShareAndProof is the ShareAndProof provided by the verifiable decryption function.
see: https://arxiv.org/pdf/2205.08529.pdf
The equivalent of each parameter in the paper is mentioned.
type Start ¶
type Start struct {
// contains filtered or unexported fields
}
Start is the message the initiator of the DKG protocol should send to all the nodes.
- implements serde.Message
func NewStart ¶
NewStart creates a new start message.
func (Start) GetAddresses ¶
GetAddresses returns the list of addresses.
func (Start) GetPublicKeys ¶
func (s Start) GetPublicKeys() []kyber.Point
GetPublicKeys returns the list of public keys.
func (Start) GetThreshold ¶
GetThreshold returns the threshold.
func (Start) Serialize ¶
Serialize implements serde.Message. It looks up the format and returns the serialized data for the start message.
type StartDone ¶
type StartDone struct {
// contains filtered or unexported fields
}
StartDone should be sent by all the nodes to the initiator of the DKG when the DKG setup is done.
- implements serde.Message
func NewStartDone ¶
func NewStartDone(pubkey kyber.Point) StartDone
NewStartDone creates a new start done message.
func (StartDone) GetPublicKey ¶
func (s StartDone) GetPublicKey() kyber.Point
GetPublicKey returns the public key of the LTS.
func (StartDone) Serialize ¶
Serialize implements serde.Message.
type StartResharing ¶
type StartResharing struct {
// contains filtered or unexported fields
}
StartResharing is the message the initiator of the resharing protocol should send to all the old nodes.
- implements serde.Message
func NewStartResharing ¶
func NewStartResharing(tNew int, tOld int, addrsNew []mino.Address, addrsOld []mino.Address, pubkeysNew []kyber.Point, pubkeysOld []kyber.Point) StartResharing
NewStartResharing creates a new start resharing message.
func (StartResharing) GetAddrsNew ¶
func (r StartResharing) GetAddrsNew() []mino.Address
GetAddrsNew returns the list of new addresses.
func (StartResharing) GetAddrsOld ¶
func (r StartResharing) GetAddrsOld() []mino.Address
GetAddrsOld returns the list of old addresses.
func (StartResharing) GetPubkeysNew ¶
func (r StartResharing) GetPubkeysNew() []kyber.Point
GetPubkeysNew returns the list of new public keys.
func (StartResharing) GetPubkeysOld ¶
func (r StartResharing) GetPubkeysOld() []kyber.Point
GetPubkeysOld returns the list of old public keys.
func (StartResharing) GetTNew ¶
func (r StartResharing) GetTNew() int
GetTNew returns the new threshold.
func (StartResharing) GetTOld ¶
func (r StartResharing) GetTOld() int
GetTOld returns the old threshold.
func (StartResharing) Serialize ¶
func (r StartResharing) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message. It looks up the format and returns the serialized data for the resharingRequest message.
type VerifiableDecryptReply ¶
type VerifiableDecryptReply struct {
// contains filtered or unexported fields
}
VerifiableDecryptReply is a message sent to request a verifiable decryption.
- implements serde.Message
func NewVerifiableDecryptReply ¶
func NewVerifiableDecryptReply(shareAndProof []ShareAndProof) VerifiableDecryptReply
NewVerifiableDecryptReply creates a new verifiable decryption reply.
func (VerifiableDecryptReply) GetShareAndProof ¶
func (resp VerifiableDecryptReply) GetShareAndProof() []ShareAndProof
GetShareAndProof returns ShareAndProof.
func (VerifiableDecryptReply) Serialize ¶
func (resp VerifiableDecryptReply) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
type VerifiableDecryptRequest ¶
type VerifiableDecryptRequest struct {
// contains filtered or unexported fields
}
VerifiableDecryptRequest is a message sent to request a verifiable decryption.
- implements serde.Message
func NewVerifiableDecryptRequest ¶
func NewVerifiableDecryptRequest(ciphertexts []Ciphertext) VerifiableDecryptRequest
NewVerifiableDecryptRequest creates a new verifiable decryption request.
func (VerifiableDecryptRequest) GetCiphertexts ¶
func (req VerifiableDecryptRequest) GetCiphertexts() []Ciphertext
GetCiphertexts returns ciphertexts.
func (VerifiableDecryptRequest) Serialize ¶
func (req VerifiableDecryptRequest) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message.
Source Files ¶
messages.go
- Version
- v0.1.0 (latest)
- Published
- Apr 10, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 month ago –
Tools for package owners.