Versions in this module Expand all Collapse all v1 v1.1.3 Jan 28, 2022 v1.1.2 Jan 27, 2022 v1.1.1 Jan 12, 2021 v1.1.0 Jan 19, 2022 v1.0.0 Mar 7, 2021 Changes in this version + const Overhead + var ErrIntOverflowMixnet = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthMixnet = fmt.Errorf("proto: negative length found during unmarshaling") + var Source_name = map[int32]string + var Source_value = map[string]int32 + func Decrypt(private *big.Int, nonce *[24]byte, rx, ry *big.Int, ciphertext []byte) ([]byte, error) + func Encrypt(publicX, publicY *big.Int, nonce *[24]byte, plaintext []byte) (*big.Int, *big.Int, []byte) + func GenerateInnerKey() (*big.Int, *big.Int, *big.Int) + func OnionDecrypt(privates []*big.Int, nonce *[24]byte, rx, ry *big.Int, ciphertext []byte) ([]byte, error) + func OnionEncrypt(publicXs, publicYs []*big.Int, nonce *[24]byte, plaintext []byte) (*big.Int, *big.Int, []byte) + func RegisterMixServer(s *grpc.Server, srv MixServer) + type AddInnerCiphertextsRequest struct + Messages [][]byte + Round uint64 + func (*AddInnerCiphertextsRequest) Descriptor() ([]byte, []int) + func (*AddInnerCiphertextsRequest) ProtoMessage() + func (m *AddInnerCiphertextsRequest) GetMessages() [][]byte + func (m *AddInnerCiphertextsRequest) GetRound() uint64 + func (m *AddInnerCiphertextsRequest) Marshal() (dAtA []byte, err error) + func (m *AddInnerCiphertextsRequest) MarshalTo(dAtA []byte) (int, error) + func (m *AddInnerCiphertextsRequest) Reset() + func (m *AddInnerCiphertextsRequest) Size() (n int) + func (m *AddInnerCiphertextsRequest) String() string + func (m *AddInnerCiphertextsRequest) Unmarshal(dAtA []byte) error + type AddInnerCiphertextsResponse struct + func (*AddInnerCiphertextsResponse) Descriptor() ([]byte, []int) + func (*AddInnerCiphertextsResponse) ProtoMessage() + func (m *AddInnerCiphertextsResponse) Marshal() (dAtA []byte, err error) + func (m *AddInnerCiphertextsResponse) MarshalTo(dAtA []byte) (int, error) + func (m *AddInnerCiphertextsResponse) Reset() + func (m *AddInnerCiphertextsResponse) Size() (n int) + func (m *AddInnerCiphertextsResponse) String() string + func (m *AddInnerCiphertextsResponse) Unmarshal(dAtA []byte) error + type AddMessagesRequest struct + Messages [][]byte + Round uint64 + func (*AddMessagesRequest) Descriptor() ([]byte, []int) + func (*AddMessagesRequest) ProtoMessage() + func (m *AddMessagesRequest) GetMessages() [][]byte + func (m *AddMessagesRequest) GetRound() uint64 + func (m *AddMessagesRequest) Marshal() (dAtA []byte, err error) + func (m *AddMessagesRequest) MarshalTo(dAtA []byte) (int, error) + func (m *AddMessagesRequest) Reset() + func (m *AddMessagesRequest) Size() (n int) + func (m *AddMessagesRequest) String() string + func (m *AddMessagesRequest) Unmarshal(dAtA []byte) error + type AddMessagesResponse struct + func (*AddMessagesResponse) Descriptor() ([]byte, []int) + func (*AddMessagesResponse) ProtoMessage() + func (m *AddMessagesResponse) Marshal() (dAtA []byte, err error) + func (m *AddMessagesResponse) MarshalTo(dAtA []byte) (int, error) + func (m *AddMessagesResponse) Reset() + func (m *AddMessagesResponse) Size() (n int) + func (m *AddMessagesResponse) String() string + func (m *AddMessagesResponse) Unmarshal(dAtA []byte) error + type Ciphertext struct + Message []byte + X []byte + Y []byte + func (*Ciphertext) Descriptor() ([]byte, []int) + func (*Ciphertext) ProtoMessage() + func (m *Ciphertext) GetMessage() []byte + func (m *Ciphertext) GetX() []byte + func (m *Ciphertext) GetY() []byte + func (m *Ciphertext) Marshal() (dAtA []byte, err error) + func (m *Ciphertext) MarshalTo(dAtA []byte) (int, error) + func (m *Ciphertext) Reset() + func (m *Ciphertext) Size() (n int) + func (m *Ciphertext) String() string + func (m *Ciphertext) Unmarshal(dAtA []byte) error + type Client interface + EndRound func(round int) error + GenerateRoundInput func(round int, plaintext []byte) []byte + NewRound func(round int, publicXs, publicYs []*big.Int) + func NewClient() Client + type ConfirmVerificationRequest struct + Round uint64 + Verified bool + func (*ConfirmVerificationRequest) Descriptor() ([]byte, []int) + func (*ConfirmVerificationRequest) ProtoMessage() + func (m *ConfirmVerificationRequest) GetRound() uint64 + func (m *ConfirmVerificationRequest) GetVerified() bool + func (m *ConfirmVerificationRequest) Marshal() (dAtA []byte, err error) + func (m *ConfirmVerificationRequest) MarshalTo(dAtA []byte) (int, error) + func (m *ConfirmVerificationRequest) Reset() + func (m *ConfirmVerificationRequest) Size() (n int) + func (m *ConfirmVerificationRequest) String() string + func (m *ConfirmVerificationRequest) Unmarshal(dAtA []byte) error + type ConfirmVerificationResponse struct + func (*ConfirmVerificationResponse) Descriptor() ([]byte, []int) + func (*ConfirmVerificationResponse) ProtoMessage() + func (m *ConfirmVerificationResponse) Marshal() (dAtA []byte, err error) + func (m *ConfirmVerificationResponse) MarshalTo(dAtA []byte) (int, error) + func (m *ConfirmVerificationResponse) Reset() + func (m *ConfirmVerificationResponse) Size() (n int) + func (m *ConfirmVerificationResponse) String() string + func (m *ConfirmVerificationResponse) Unmarshal(dAtA []byte) error + type EndRoundRequest struct + Round uint64 + func (*EndRoundRequest) Descriptor() ([]byte, []int) + func (*EndRoundRequest) ProtoMessage() + func (m *EndRoundRequest) GetRound() uint64 + func (m *EndRoundRequest) Marshal() (dAtA []byte, err error) + func (m *EndRoundRequest) MarshalTo(dAtA []byte) (int, error) + func (m *EndRoundRequest) Reset() + func (m *EndRoundRequest) Size() (n int) + func (m *EndRoundRequest) String() string + func (m *EndRoundRequest) Unmarshal(dAtA []byte) error + type EndRoundResponse struct + func (*EndRoundResponse) Descriptor() ([]byte, []int) + func (*EndRoundResponse) ProtoMessage() + func (m *EndRoundResponse) Marshal() (dAtA []byte, err error) + func (m *EndRoundResponse) MarshalTo(dAtA []byte) (int, error) + func (m *EndRoundResponse) Reset() + func (m *EndRoundResponse) Size() (n int) + func (m *EndRoundResponse) String() string + func (m *EndRoundResponse) Unmarshal(dAtA []byte) error + type FinalizeRequest struct + Round uint64 + func (*FinalizeRequest) Descriptor() ([]byte, []int) + func (*FinalizeRequest) ProtoMessage() + func (m *FinalizeRequest) GetRound() uint64 + func (m *FinalizeRequest) Marshal() (dAtA []byte, err error) + func (m *FinalizeRequest) MarshalTo(dAtA []byte) (int, error) + func (m *FinalizeRequest) Reset() + func (m *FinalizeRequest) Size() (n int) + func (m *FinalizeRequest) String() string + func (m *FinalizeRequest) Unmarshal(dAtA []byte) error + type FinalizeResponse struct + Plaintexts [][]byte + func (*FinalizeResponse) Descriptor() ([]byte, []int) + func (*FinalizeResponse) ProtoMessage() + func (m *FinalizeResponse) GetPlaintexts() [][]byte + func (m *FinalizeResponse) Marshal() (dAtA []byte, err error) + func (m *FinalizeResponse) MarshalTo(dAtA []byte) (int, error) + func (m *FinalizeResponse) Reset() + func (m *FinalizeResponse) Size() (n int) + func (m *FinalizeResponse) String() string + func (m *FinalizeResponse) Unmarshal(dAtA []byte) error + type GetInnerKeyRequest struct + Round uint64 + func (*GetInnerKeyRequest) Descriptor() ([]byte, []int) + func (*GetInnerKeyRequest) ProtoMessage() + func (m *GetInnerKeyRequest) GetRound() uint64 + func (m *GetInnerKeyRequest) Marshal() (dAtA []byte, err error) + func (m *GetInnerKeyRequest) MarshalTo(dAtA []byte) (int, error) + func (m *GetInnerKeyRequest) Reset() + func (m *GetInnerKeyRequest) Size() (n int) + func (m *GetInnerKeyRequest) String() string + func (m *GetInnerKeyRequest) Unmarshal(dAtA []byte) error + type GetInnerKeyResponse struct + X []byte + Y []byte + func (*GetInnerKeyResponse) Descriptor() ([]byte, []int) + func (*GetInnerKeyResponse) ProtoMessage() + func (m *GetInnerKeyResponse) GetX() []byte + func (m *GetInnerKeyResponse) GetY() []byte + func (m *GetInnerKeyResponse) Marshal() (dAtA []byte, err error) + func (m *GetInnerKeyResponse) MarshalTo(dAtA []byte) (int, error) + func (m *GetInnerKeyResponse) Reset() + func (m *GetInnerKeyResponse) Size() (n int) + func (m *GetInnerKeyResponse) String() string + func (m *GetInnerKeyResponse) Unmarshal(dAtA []byte) error + type GetMessagesRequest struct + Round uint64 + func (*GetMessagesRequest) Descriptor() ([]byte, []int) + func (*GetMessagesRequest) ProtoMessage() + func (m *GetMessagesRequest) GetRound() uint64 + func (m *GetMessagesRequest) Marshal() (dAtA []byte, err error) + func (m *GetMessagesRequest) MarshalTo(dAtA []byte) (int, error) + func (m *GetMessagesRequest) Reset() + func (m *GetMessagesRequest) Size() (n int) + func (m *GetMessagesRequest) String() string + func (m *GetMessagesRequest) Unmarshal(dAtA []byte) error + type GetMessagesResponse struct + Messages [][]byte + func (*GetMessagesResponse) Descriptor() ([]byte, []int) + func (*GetMessagesResponse) ProtoMessage() + func (m *GetMessagesResponse) GetMessages() [][]byte + func (m *GetMessagesResponse) Marshal() (dAtA []byte, err error) + func (m *GetMessagesResponse) MarshalTo(dAtA []byte) (int, error) + func (m *GetMessagesResponse) Reset() + func (m *GetMessagesResponse) Size() (n int) + func (m *GetMessagesResponse) String() string + func (m *GetMessagesResponse) Unmarshal(dAtA []byte) error + type GetPrivateInnerKeyRequest struct + Round uint64 + func (*GetPrivateInnerKeyRequest) Descriptor() ([]byte, []int) + func (*GetPrivateInnerKeyRequest) ProtoMessage() + func (m *GetPrivateInnerKeyRequest) GetRound() uint64 + func (m *GetPrivateInnerKeyRequest) Marshal() (dAtA []byte, err error) + func (m *GetPrivateInnerKeyRequest) MarshalTo(dAtA []byte) (int, error) + func (m *GetPrivateInnerKeyRequest) Reset() + func (m *GetPrivateInnerKeyRequest) Size() (n int) + func (m *GetPrivateInnerKeyRequest) String() string + func (m *GetPrivateInnerKeyRequest) Unmarshal(dAtA []byte) error + type GetPrivateInnerKeyResponse struct + PrivateKey []byte + func (*GetPrivateInnerKeyResponse) Descriptor() ([]byte, []int) + func (*GetPrivateInnerKeyResponse) ProtoMessage() + func (m *GetPrivateInnerKeyResponse) GetPrivateKey() []byte + func (m *GetPrivateInnerKeyResponse) Marshal() (dAtA []byte, err error) + func (m *GetPrivateInnerKeyResponse) MarshalTo(dAtA []byte) (int, error) + func (m *GetPrivateInnerKeyResponse) Reset() + func (m *GetPrivateInnerKeyResponse) Size() (n int) + func (m *GetPrivateInnerKeyResponse) String() string + func (m *GetPrivateInnerKeyResponse) Unmarshal(dAtA []byte) error + type MixClient interface + AddInnerCiphertexts func(ctx context.Context, in *AddInnerCiphertextsRequest, opts ...grpc.CallOption) (*AddInnerCiphertextsResponse, error) + AddMessages func(ctx context.Context, opts ...grpc.CallOption) (Mix_AddMessagesClient, error) + ConfirmVerification func(ctx context.Context, in *ConfirmVerificationRequest, opts ...grpc.CallOption) (*ConfirmVerificationResponse, error) + EndRound func(ctx context.Context, in *EndRoundRequest, opts ...grpc.CallOption) (*EndRoundResponse, error) + Finalize func(ctx context.Context, in *FinalizeRequest, opts ...grpc.CallOption) (*FinalizeResponse, error) + GetInnerKey func(ctx context.Context, in *GetInnerKeyRequest, opts ...grpc.CallOption) (*GetInnerKeyResponse, error) + GetMessages func(ctx context.Context, in *GetMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error) + GetPrivateInnerKey func(ctx context.Context, in *GetPrivateInnerKeyRequest, opts ...grpc.CallOption) (*GetPrivateInnerKeyResponse, error) + NewRound func(ctx context.Context, in *NewRoundRequest, opts ...grpc.CallOption) (*NewRoundResponse, error) + StartRound func(ctx context.Context, in *StartRoundRequest, opts ...grpc.CallOption) (*StartRoundResponse, error) + SubmitCiphertexts func(ctx context.Context, opts ...grpc.CallOption) (Mix_SubmitCiphertextsClient, error) + VerifyProof func(ctx context.Context, opts ...grpc.CallOption) (Mix_VerifyProofClient, error) + func NewMixClient(cc *grpc.ClientConn) MixClient + type MixServer interface + AddInnerCiphertexts func(context.Context, *AddInnerCiphertextsRequest) (*AddInnerCiphertextsResponse, error) + AddMessages func(Mix_AddMessagesServer) error + ConfirmVerification func(context.Context, *ConfirmVerificationRequest) (*ConfirmVerificationResponse, error) + EndRound func(context.Context, *EndRoundRequest) (*EndRoundResponse, error) + Finalize func(context.Context, *FinalizeRequest) (*FinalizeResponse, error) + GetInnerKey func(context.Context, *GetInnerKeyRequest) (*GetInnerKeyResponse, error) + GetMessages func(context.Context, *GetMessagesRequest) (*GetMessagesResponse, error) + GetPrivateInnerKey func(context.Context, *GetPrivateInnerKeyRequest) (*GetPrivateInnerKeyResponse, error) + NewRound func(context.Context, *NewRoundRequest) (*NewRoundResponse, error) + StartRound func(context.Context, *StartRoundRequest) (*StartRoundResponse, error) + SubmitCiphertexts func(Mix_SubmitCiphertextsServer) error + VerifyProof func(Mix_VerifyProofServer) error + func NewMixServer(addr string, coordinator ecdsa.PublicKey, servers map[string]*config.Server, ...) MixServer + type Mix_AddMessagesClient interface + CloseAndRecv func() (*AddMessagesResponse, error) + Send func(*AddMessagesRequest) error + type Mix_AddMessagesServer interface + Recv func() (*AddMessagesRequest, error) + SendAndClose func(*AddMessagesResponse) error + type Mix_SubmitCiphertextsClient interface + CloseAndRecv func() (*SubmitCiphertextsResponse, error) + Send func(*SubmitCiphertextsRequest) error + type Mix_SubmitCiphertextsServer interface + Recv func() (*SubmitCiphertextsRequest, error) + SendAndClose func(*SubmitCiphertextsResponse) error + type Mix_VerifyProofClient interface + CloseAndRecv func() (*VerifyProofResponse, error) + Send func(*VerifyProofRequest) error + type Mix_VerifyProofServer interface + Recv func() (*VerifyProofRequest, error) + SendAndClose func(*VerifyProofResponse) error + type NewRoundRequest struct + Round uint64 + func (*NewRoundRequest) Descriptor() ([]byte, []int) + func (*NewRoundRequest) ProtoMessage() + func (m *NewRoundRequest) GetRound() uint64 + func (m *NewRoundRequest) Marshal() (dAtA []byte, err error) + func (m *NewRoundRequest) MarshalTo(dAtA []byte) (int, error) + func (m *NewRoundRequest) Reset() + func (m *NewRoundRequest) Size() (n int) + func (m *NewRoundRequest) String() string + func (m *NewRoundRequest) Unmarshal(dAtA []byte) error + type NewRoundResponse struct + func (*NewRoundResponse) Descriptor() ([]byte, []int) + func (*NewRoundResponse) ProtoMessage() + func (m *NewRoundResponse) Marshal() (dAtA []byte, err error) + func (m *NewRoundResponse) MarshalTo(dAtA []byte) (int, error) + func (m *NewRoundResponse) Reset() + func (m *NewRoundResponse) Size() (n int) + func (m *NewRoundResponse) String() string + func (m *NewRoundResponse) Unmarshal(dAtA []byte) error + type PrivateKey struct + X []byte + func (*PrivateKey) Descriptor() ([]byte, []int) + func (*PrivateKey) ProtoMessage() + func (m *PrivateKey) GetX() []byte + func (m *PrivateKey) Marshal() (dAtA []byte, err error) + func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error) + func (m *PrivateKey) Reset() + func (m *PrivateKey) Size() (n int) + func (m *PrivateKey) String() string + func (m *PrivateKey) Unmarshal(dAtA []byte) error + type PublicKey struct + X []byte + Y []byte + func (*PublicKey) Descriptor() ([]byte, []int) + func (*PublicKey) ProtoMessage() + func (m *PublicKey) GetX() []byte + func (m *PublicKey) GetY() []byte + func (m *PublicKey) Marshal() (dAtA []byte, err error) + func (m *PublicKey) MarshalTo(dAtA []byte) (int, error) + func (m *PublicKey) Reset() + func (m *PublicKey) Size() (n int) + func (m *PublicKey) String() string + func (m *PublicKey) Unmarshal(dAtA []byte) error + type Source int32 + const Source_CLIENT + const Source_SERVER + func (Source) EnumDescriptor() ([]byte, []int) + func (x Source) String() string + type StartRoundRequest struct + Round uint64 + func (*StartRoundRequest) Descriptor() ([]byte, []int) + func (*StartRoundRequest) ProtoMessage() + func (m *StartRoundRequest) GetRound() uint64 + func (m *StartRoundRequest) Marshal() (dAtA []byte, err error) + func (m *StartRoundRequest) MarshalTo(dAtA []byte) (int, error) + func (m *StartRoundRequest) Reset() + func (m *StartRoundRequest) Size() (n int) + func (m *StartRoundRequest) String() string + func (m *StartRoundRequest) Unmarshal(dAtA []byte) error + type StartRoundResponse struct + func (*StartRoundResponse) Descriptor() ([]byte, []int) + func (*StartRoundResponse) ProtoMessage() + func (m *StartRoundResponse) Marshal() (dAtA []byte, err error) + func (m *StartRoundResponse) MarshalTo(dAtA []byte) (int, error) + func (m *StartRoundResponse) Reset() + func (m *StartRoundResponse) Size() (n int) + func (m *StartRoundResponse) String() string + func (m *StartRoundResponse) Unmarshal(dAtA []byte) error + type SubmitCiphertextsRequest struct + Ciphertexts [][]byte + Proofs [][]byte + Round uint64 + func (*SubmitCiphertextsRequest) Descriptor() ([]byte, []int) + func (*SubmitCiphertextsRequest) ProtoMessage() + func (m *SubmitCiphertextsRequest) GetCiphertexts() [][]byte + func (m *SubmitCiphertextsRequest) GetProofs() [][]byte + func (m *SubmitCiphertextsRequest) GetRound() uint64 + func (m *SubmitCiphertextsRequest) Marshal() (dAtA []byte, err error) + func (m *SubmitCiphertextsRequest) MarshalTo(dAtA []byte) (int, error) + func (m *SubmitCiphertextsRequest) Reset() + func (m *SubmitCiphertextsRequest) Size() (n int) + func (m *SubmitCiphertextsRequest) String() string + func (m *SubmitCiphertextsRequest) Unmarshal(dAtA []byte) error + type SubmitCiphertextsResponse struct + func (*SubmitCiphertextsResponse) Descriptor() ([]byte, []int) + func (*SubmitCiphertextsResponse) ProtoMessage() + func (m *SubmitCiphertextsResponse) Marshal() (dAtA []byte, err error) + func (m *SubmitCiphertextsResponse) MarshalTo(dAtA []byte) (int, error) + func (m *SubmitCiphertextsResponse) Reset() + func (m *SubmitCiphertextsResponse) Size() (n int) + func (m *SubmitCiphertextsResponse) String() string + func (m *SubmitCiphertextsResponse) Unmarshal(dAtA []byte) error + type Verifier interface + AddInnerCiphertexts func(round int, msgs [][]byte) error + EndRound func(round int) error + Finalize func(round int, privateKeys [][]byte) ([][]byte, error) + NewRound func(round int) error + PrivateKey func(round int) (*big.Int, error) + PublicKey func(round int) (*big.Int, *big.Int, error) + SetPublicKey func(round int, x, y *big.Int) error + func NewVerifier(index int, groupSize int) Verifier + type VerifyProofRequest struct + Index uint32 + Keys [][]byte + Proof []byte + Round uint64 + func (*VerifyProofRequest) Descriptor() ([]byte, []int) + func (*VerifyProofRequest) ProtoMessage() + func (m *VerifyProofRequest) GetIndex() uint32 + func (m *VerifyProofRequest) GetKeys() [][]byte + func (m *VerifyProofRequest) GetProof() []byte + func (m *VerifyProofRequest) GetRound() uint64 + func (m *VerifyProofRequest) Marshal() (dAtA []byte, err error) + func (m *VerifyProofRequest) MarshalTo(dAtA []byte) (int, error) + func (m *VerifyProofRequest) Reset() + func (m *VerifyProofRequest) Size() (n int) + func (m *VerifyProofRequest) String() string + func (m *VerifyProofRequest) Unmarshal(dAtA []byte) error + type VerifyProofResponse struct + func (*VerifyProofResponse) Descriptor() ([]byte, []int) + func (*VerifyProofResponse) ProtoMessage() + func (m *VerifyProofResponse) Marshal() (dAtA []byte, err error) + func (m *VerifyProofResponse) MarshalTo(dAtA []byte) (int, error) + func (m *VerifyProofResponse) Reset() + func (m *VerifyProofResponse) Size() (n int) + func (m *VerifyProofResponse) String() string + func (m *VerifyProofResponse) Unmarshal(dAtA []byte) error