mixnet

package
v0.0.0-...-7462608 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package mixnet is a generated protocol buffer package.

It is generated from these files:

mixnet.proto

It has these top-level messages:

NewRoundRequest
NewRoundResponse
EndRoundRequest
EndRoundResponse
AddMessagesRequest
AddMessagesResponse
StartRoundRequest
StartRoundResponse
GetMessagesRequest
GetMessagesResponse
SubmitCiphertextsRequest
SubmitCiphertextsResponse
VerifyProofRequest
VerifyProofResponse
ConfirmVerificationRequest
ConfirmVerificationResponse
PrivateKey
PublicKey
Ciphertext
GetInnerKeyRequest
GetInnerKeyResponse
AddInnerCiphertextsRequest
AddInnerCiphertextsResponse
GetPrivateInnerKeyRequest
GetPrivateInnerKeyResponse
FinalizeRequest
FinalizeResponse

Index

Constants

View Source
const Overhead = 32 + 32 + secretbox.Overhead

overhead of oninon enryption is (x,y) coordinates + sercretbox overhead

Variables

View Source
var (
	ErrInvalidLengthMixnet = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMixnet   = fmt.Errorf("proto: integer overflow")
)
View Source
var Source_name = map[int32]string{
	0: "CLIENT",
	1: "SERVER",
}
View Source
var Source_value = map[string]int32{
	"CLIENT": 0,
	"SERVER": 1,
}

Functions

func Decrypt

func Decrypt(private *big.Int, nonce *[24]byte, rx, ry *big.Int, ciphertext []byte) ([]byte, error)

Decrypt returns the plaintext message decrypted using private.

func Encrypt

func Encrypt(publicX, publicY *big.Int, nonce *[24]byte, plaintext []byte) (*big.Int, *big.Int, []byte)

Encrypt returns a triplet, which is a ciphertext encrypted under the trustees public key (publicX, publicY) using the key encapsulation technique. The ciphertext consists of randomness used to established the shared key and the encrypted plaintext.

func GenerateInnerKey

func GenerateInnerKey() (*big.Int, *big.Int, *big.Int)

func OnionDecrypt

func OnionDecrypt(privates []*big.Int, nonce *[24]byte, rx, ry *big.Int, ciphertext []byte) ([]byte, error)

OnoinDecrypt returns the plaintext message decyprted using all given keys.

func OnionEncrypt

func OnionEncrypt(publicXs, publicYs []*big.Int, nonce *[24]byte, plaintext []byte) (*big.Int, *big.Int, []byte)

OnoinEncrypt returns a ciphertext that encrypts plaintext under all given keys.

func RegisterMixServer

func RegisterMixServer(s *grpc.Server, srv MixServer)

Types

type AddInnerCiphertextsRequest

type AddInnerCiphertextsRequest struct {
	Round    uint64   `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
	Messages [][]byte `protobuf:"bytes,2,rep,name=messages" json:"messages,omitempty"`
}

func (*AddInnerCiphertextsRequest) Descriptor

func (*AddInnerCiphertextsRequest) Descriptor() ([]byte, []int)

func (*AddInnerCiphertextsRequest) GetMessages

func (m *AddInnerCiphertextsRequest) GetMessages() [][]byte

func (*AddInnerCiphertextsRequest) GetRound

func (m *AddInnerCiphertextsRequest) GetRound() uint64

func (*AddInnerCiphertextsRequest) Marshal

func (m *AddInnerCiphertextsRequest) Marshal() (dAtA []byte, err error)

func (*AddInnerCiphertextsRequest) MarshalTo

func (m *AddInnerCiphertextsRequest) MarshalTo(dAtA []byte) (int, error)

func (*AddInnerCiphertextsRequest) ProtoMessage

func (*AddInnerCiphertextsRequest) ProtoMessage()

func (*AddInnerCiphertextsRequest) Reset

func (m *AddInnerCiphertextsRequest) Reset()

func (*AddInnerCiphertextsRequest) Size

func (m *AddInnerCiphertextsRequest) Size() (n int)

func (*AddInnerCiphertextsRequest) String

func (m *AddInnerCiphertextsRequest) String() string

func (*AddInnerCiphertextsRequest) Unmarshal

func (m *AddInnerCiphertextsRequest) Unmarshal(dAtA []byte) error

type AddInnerCiphertextsResponse

type AddInnerCiphertextsResponse struct {
}

func (*AddInnerCiphertextsResponse) Descriptor

func (*AddInnerCiphertextsResponse) Descriptor() ([]byte, []int)

func (*AddInnerCiphertextsResponse) Marshal

func (m *AddInnerCiphertextsResponse) Marshal() (dAtA []byte, err error)

func (*AddInnerCiphertextsResponse) MarshalTo

func (m *AddInnerCiphertextsResponse) MarshalTo(dAtA []byte) (int, error)

func (*AddInnerCiphertextsResponse) ProtoMessage

func (*AddInnerCiphertextsResponse) ProtoMessage()

func (*AddInnerCiphertextsResponse) Reset

func (m *AddInnerCiphertextsResponse) Reset()

func (*AddInnerCiphertextsResponse) Size

func (m *AddInnerCiphertextsResponse) Size() (n int)

func (*AddInnerCiphertextsResponse) String

func (m *AddInnerCiphertextsResponse) String() string

func (*AddInnerCiphertextsResponse) Unmarshal

func (m *AddInnerCiphertextsResponse) Unmarshal(dAtA []byte) error

type AddMessagesRequest

type AddMessagesRequest struct {
	Round    uint64   `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
	Messages [][]byte `protobuf:"bytes,2,rep,name=messages" json:"messages,omitempty"`
}

func (*AddMessagesRequest) Descriptor

func (*AddMessagesRequest) Descriptor() ([]byte, []int)

func (*AddMessagesRequest) GetMessages

func (m *AddMessagesRequest) GetMessages() [][]byte

func (*AddMessagesRequest) GetRound

func (m *AddMessagesRequest) GetRound() uint64

func (*AddMessagesRequest) Marshal

func (m *AddMessagesRequest) Marshal() (dAtA []byte, err error)

func (*AddMessagesRequest) MarshalTo

func (m *AddMessagesRequest) MarshalTo(dAtA []byte) (int, error)

func (*AddMessagesRequest) ProtoMessage

func (*AddMessagesRequest) ProtoMessage()

func (*AddMessagesRequest) Reset

func (m *AddMessagesRequest) Reset()

func (*AddMessagesRequest) Size

func (m *AddMessagesRequest) Size() (n int)

func (*AddMessagesRequest) String

func (m *AddMessagesRequest) String() string

func (*AddMessagesRequest) Unmarshal

func (m *AddMessagesRequest) Unmarshal(dAtA []byte) error

type AddMessagesResponse

type AddMessagesResponse struct {
}

func (*AddMessagesResponse) Descriptor

func (*AddMessagesResponse) Descriptor() ([]byte, []int)

func (*AddMessagesResponse) Marshal

func (m *AddMessagesResponse) Marshal() (dAtA []byte, err error)

func (*AddMessagesResponse) MarshalTo

func (m *AddMessagesResponse) MarshalTo(dAtA []byte) (int, error)

func (*AddMessagesResponse) ProtoMessage

func (*AddMessagesResponse) ProtoMessage()

func (*AddMessagesResponse) Reset

func (m *AddMessagesResponse) Reset()

func (*AddMessagesResponse) Size

func (m *AddMessagesResponse) Size() (n int)

func (*AddMessagesResponse) String

func (m *AddMessagesResponse) String() string

func (*AddMessagesResponse) Unmarshal

func (m *AddMessagesResponse) Unmarshal(dAtA []byte) error

type Ciphertext

type Ciphertext struct {
	X       []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
	Y       []byte `protobuf:"bytes,2,opt,name=y,proto3" json:"y,omitempty"`
	Message []byte `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
}

func (*Ciphertext) Descriptor

func (*Ciphertext) Descriptor() ([]byte, []int)

func (*Ciphertext) GetMessage

func (m *Ciphertext) GetMessage() []byte

func (*Ciphertext) GetX

func (m *Ciphertext) GetX() []byte

func (*Ciphertext) GetY

func (m *Ciphertext) GetY() []byte

func (*Ciphertext) Marshal

func (m *Ciphertext) Marshal() (dAtA []byte, err error)

func (*Ciphertext) MarshalTo

func (m *Ciphertext) MarshalTo(dAtA []byte) (int, error)

func (*Ciphertext) ProtoMessage

func (*Ciphertext) ProtoMessage()

func (*Ciphertext) Reset

func (m *Ciphertext) Reset()

func (*Ciphertext) Size

func (m *Ciphertext) Size() (n int)

func (*Ciphertext) String

func (m *Ciphertext) String() string

func (*Ciphertext) Unmarshal

func (m *Ciphertext) Unmarshal(dAtA []byte) error

type Client

type Client interface {
	// NewRound sets the public key for a particular round.
	NewRound(round int, publicXs, publicYs []*big.Int)
	// EndRound deletes the round state.
	EndRound(round int) error

	// GenerateRoundInput encrypts the plaintext, and returns
	// the inner ciphertext and the corresponding shares.
	GenerateRoundInput(round int, plaintext []byte) []byte
}

func NewClient

func NewClient() Client

type ConfirmVerificationRequest

type ConfirmVerificationRequest struct {
	Round    uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
	Verified bool   `protobuf:"varint,2,opt,name=verified,proto3" json:"verified,omitempty"`
}

func (*ConfirmVerificationRequest) Descriptor

func (*ConfirmVerificationRequest) Descriptor() ([]byte, []int)

func (*ConfirmVerificationRequest) GetRound

func (m *ConfirmVerificationRequest) GetRound() uint64

func (*ConfirmVerificationRequest) GetVerified

func (m *ConfirmVerificationRequest) GetVerified() bool

func (*ConfirmVerificationRequest) Marshal

func (m *ConfirmVerificationRequest) Marshal() (dAtA []byte, err error)

func (*ConfirmVerificationRequest) MarshalTo

func (m *ConfirmVerificationRequest) MarshalTo(dAtA []byte) (int, error)

func (*ConfirmVerificationRequest) ProtoMessage

func (*ConfirmVerificationRequest) ProtoMessage()

func (*ConfirmVerificationRequest) Reset

func (m *ConfirmVerificationRequest) Reset()

func (*ConfirmVerificationRequest) Size

func (m *ConfirmVerificationRequest) Size() (n int)

func (*ConfirmVerificationRequest) String

func (m *ConfirmVerificationRequest) String() string

func (*ConfirmVerificationRequest) Unmarshal

func (m *ConfirmVerificationRequest) Unmarshal(dAtA []byte) error

type ConfirmVerificationResponse

type ConfirmVerificationResponse struct {
}

func (*ConfirmVerificationResponse) Descriptor

func (*ConfirmVerificationResponse) Descriptor() ([]byte, []int)

func (*ConfirmVerificationResponse) Marshal

func (m *ConfirmVerificationResponse) Marshal() (dAtA []byte, err error)

func (*ConfirmVerificationResponse) MarshalTo

func (m *ConfirmVerificationResponse) MarshalTo(dAtA []byte) (int, error)

func (*ConfirmVerificationResponse) ProtoMessage

func (*ConfirmVerificationResponse) ProtoMessage()

func (*ConfirmVerificationResponse) Reset

func (m *ConfirmVerificationResponse) Reset()

func (*ConfirmVerificationResponse) Size

func (m *ConfirmVerificationResponse) Size() (n int)

func (*ConfirmVerificationResponse) String

func (m *ConfirmVerificationResponse) String() string

func (*ConfirmVerificationResponse) Unmarshal

func (m *ConfirmVerificationResponse) Unmarshal(dAtA []byte) error

type EndRoundRequest

type EndRoundRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*EndRoundRequest) Descriptor

func (*EndRoundRequest) Descriptor() ([]byte, []int)

func (*EndRoundRequest) GetRound

func (m *EndRoundRequest) GetRound() uint64

func (*EndRoundRequest) Marshal

func (m *EndRoundRequest) Marshal() (dAtA []byte, err error)

func (*EndRoundRequest) MarshalTo

func (m *EndRoundRequest) MarshalTo(dAtA []byte) (int, error)

func (*EndRoundRequest) ProtoMessage

func (*EndRoundRequest) ProtoMessage()

func (*EndRoundRequest) Reset

func (m *EndRoundRequest) Reset()

func (*EndRoundRequest) Size

func (m *EndRoundRequest) Size() (n int)

func (*EndRoundRequest) String

func (m *EndRoundRequest) String() string

func (*EndRoundRequest) Unmarshal

func (m *EndRoundRequest) Unmarshal(dAtA []byte) error

type EndRoundResponse

type EndRoundResponse struct {
}

func (*EndRoundResponse) Descriptor

func (*EndRoundResponse) Descriptor() ([]byte, []int)

func (*EndRoundResponse) Marshal

func (m *EndRoundResponse) Marshal() (dAtA []byte, err error)

func (*EndRoundResponse) MarshalTo

func (m *EndRoundResponse) MarshalTo(dAtA []byte) (int, error)

func (*EndRoundResponse) ProtoMessage

func (*EndRoundResponse) ProtoMessage()

func (*EndRoundResponse) Reset

func (m *EndRoundResponse) Reset()

func (*EndRoundResponse) Size

func (m *EndRoundResponse) Size() (n int)

func (*EndRoundResponse) String

func (m *EndRoundResponse) String() string

func (*EndRoundResponse) Unmarshal

func (m *EndRoundResponse) Unmarshal(dAtA []byte) error

type FinalizeRequest

type FinalizeRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*FinalizeRequest) Descriptor

func (*FinalizeRequest) Descriptor() ([]byte, []int)

func (*FinalizeRequest) GetRound

func (m *FinalizeRequest) GetRound() uint64

func (*FinalizeRequest) Marshal

func (m *FinalizeRequest) Marshal() (dAtA []byte, err error)

func (*FinalizeRequest) MarshalTo

func (m *FinalizeRequest) MarshalTo(dAtA []byte) (int, error)

func (*FinalizeRequest) ProtoMessage

func (*FinalizeRequest) ProtoMessage()

func (*FinalizeRequest) Reset

func (m *FinalizeRequest) Reset()

func (*FinalizeRequest) Size

func (m *FinalizeRequest) Size() (n int)

func (*FinalizeRequest) String

func (m *FinalizeRequest) String() string

func (*FinalizeRequest) Unmarshal

func (m *FinalizeRequest) Unmarshal(dAtA []byte) error

type FinalizeResponse

type FinalizeResponse struct {
	Plaintexts [][]byte `protobuf:"bytes,1,rep,name=plaintexts" json:"plaintexts,omitempty"`
}

func (*FinalizeResponse) Descriptor

func (*FinalizeResponse) Descriptor() ([]byte, []int)

func (*FinalizeResponse) GetPlaintexts

func (m *FinalizeResponse) GetPlaintexts() [][]byte

func (*FinalizeResponse) Marshal

func (m *FinalizeResponse) Marshal() (dAtA []byte, err error)

func (*FinalizeResponse) MarshalTo

func (m *FinalizeResponse) MarshalTo(dAtA []byte) (int, error)

func (*FinalizeResponse) ProtoMessage

func (*FinalizeResponse) ProtoMessage()

func (*FinalizeResponse) Reset

func (m *FinalizeResponse) Reset()

func (*FinalizeResponse) Size

func (m *FinalizeResponse) Size() (n int)

func (*FinalizeResponse) String

func (m *FinalizeResponse) String() string

func (*FinalizeResponse) Unmarshal

func (m *FinalizeResponse) Unmarshal(dAtA []byte) error

type GetInnerKeyRequest

type GetInnerKeyRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*GetInnerKeyRequest) Descriptor

func (*GetInnerKeyRequest) Descriptor() ([]byte, []int)

func (*GetInnerKeyRequest) GetRound

func (m *GetInnerKeyRequest) GetRound() uint64

func (*GetInnerKeyRequest) Marshal

func (m *GetInnerKeyRequest) Marshal() (dAtA []byte, err error)

func (*GetInnerKeyRequest) MarshalTo

func (m *GetInnerKeyRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetInnerKeyRequest) ProtoMessage

func (*GetInnerKeyRequest) ProtoMessage()

func (*GetInnerKeyRequest) Reset

func (m *GetInnerKeyRequest) Reset()

func (*GetInnerKeyRequest) Size

func (m *GetInnerKeyRequest) Size() (n int)

func (*GetInnerKeyRequest) String

func (m *GetInnerKeyRequest) String() string

func (*GetInnerKeyRequest) Unmarshal

func (m *GetInnerKeyRequest) Unmarshal(dAtA []byte) error

type GetInnerKeyResponse

type GetInnerKeyResponse struct {
	X []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
	Y []byte `protobuf:"bytes,2,opt,name=y,proto3" json:"y,omitempty"`
}

func (*GetInnerKeyResponse) Descriptor

func (*GetInnerKeyResponse) Descriptor() ([]byte, []int)

func (*GetInnerKeyResponse) GetX

func (m *GetInnerKeyResponse) GetX() []byte

func (*GetInnerKeyResponse) GetY

func (m *GetInnerKeyResponse) GetY() []byte

func (*GetInnerKeyResponse) Marshal

func (m *GetInnerKeyResponse) Marshal() (dAtA []byte, err error)

func (*GetInnerKeyResponse) MarshalTo

func (m *GetInnerKeyResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetInnerKeyResponse) ProtoMessage

func (*GetInnerKeyResponse) ProtoMessage()

func (*GetInnerKeyResponse) Reset

func (m *GetInnerKeyResponse) Reset()

func (*GetInnerKeyResponse) Size

func (m *GetInnerKeyResponse) Size() (n int)

func (*GetInnerKeyResponse) String

func (m *GetInnerKeyResponse) String() string

func (*GetInnerKeyResponse) Unmarshal

func (m *GetInnerKeyResponse) Unmarshal(dAtA []byte) error

type GetMessagesRequest

type GetMessagesRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*GetMessagesRequest) Descriptor

func (*GetMessagesRequest) Descriptor() ([]byte, []int)

func (*GetMessagesRequest) GetRound

func (m *GetMessagesRequest) GetRound() uint64

func (*GetMessagesRequest) Marshal

func (m *GetMessagesRequest) Marshal() (dAtA []byte, err error)

func (*GetMessagesRequest) MarshalTo

func (m *GetMessagesRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetMessagesRequest) ProtoMessage

func (*GetMessagesRequest) ProtoMessage()

func (*GetMessagesRequest) Reset

func (m *GetMessagesRequest) Reset()

func (*GetMessagesRequest) Size

func (m *GetMessagesRequest) Size() (n int)

func (*GetMessagesRequest) String

func (m *GetMessagesRequest) String() string

func (*GetMessagesRequest) Unmarshal

func (m *GetMessagesRequest) Unmarshal(dAtA []byte) error

type GetMessagesResponse

type GetMessagesResponse struct {
	Messages [][]byte `protobuf:"bytes,1,rep,name=messages" json:"messages,omitempty"`
}

func (*GetMessagesResponse) Descriptor

func (*GetMessagesResponse) Descriptor() ([]byte, []int)

func (*GetMessagesResponse) GetMessages

func (m *GetMessagesResponse) GetMessages() [][]byte

func (*GetMessagesResponse) Marshal

func (m *GetMessagesResponse) Marshal() (dAtA []byte, err error)

func (*GetMessagesResponse) MarshalTo

func (m *GetMessagesResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetMessagesResponse) ProtoMessage

func (*GetMessagesResponse) ProtoMessage()

func (*GetMessagesResponse) Reset

func (m *GetMessagesResponse) Reset()

func (*GetMessagesResponse) Size

func (m *GetMessagesResponse) Size() (n int)

func (*GetMessagesResponse) String

func (m *GetMessagesResponse) String() string

func (*GetMessagesResponse) Unmarshal

func (m *GetMessagesResponse) Unmarshal(dAtA []byte) error

type GetPrivateInnerKeyRequest

type GetPrivateInnerKeyRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*GetPrivateInnerKeyRequest) Descriptor

func (*GetPrivateInnerKeyRequest) Descriptor() ([]byte, []int)

func (*GetPrivateInnerKeyRequest) GetRound

func (m *GetPrivateInnerKeyRequest) GetRound() uint64

func (*GetPrivateInnerKeyRequest) Marshal

func (m *GetPrivateInnerKeyRequest) Marshal() (dAtA []byte, err error)

func (*GetPrivateInnerKeyRequest) MarshalTo

func (m *GetPrivateInnerKeyRequest) MarshalTo(dAtA []byte) (int, error)

func (*GetPrivateInnerKeyRequest) ProtoMessage

func (*GetPrivateInnerKeyRequest) ProtoMessage()

func (*GetPrivateInnerKeyRequest) Reset

func (m *GetPrivateInnerKeyRequest) Reset()

func (*GetPrivateInnerKeyRequest) Size

func (m *GetPrivateInnerKeyRequest) Size() (n int)

func (*GetPrivateInnerKeyRequest) String

func (m *GetPrivateInnerKeyRequest) String() string

func (*GetPrivateInnerKeyRequest) Unmarshal

func (m *GetPrivateInnerKeyRequest) Unmarshal(dAtA []byte) error

type GetPrivateInnerKeyResponse

type GetPrivateInnerKeyResponse struct {
	PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
}

func (*GetPrivateInnerKeyResponse) Descriptor

func (*GetPrivateInnerKeyResponse) Descriptor() ([]byte, []int)

func (*GetPrivateInnerKeyResponse) GetPrivateKey

func (m *GetPrivateInnerKeyResponse) GetPrivateKey() []byte

func (*GetPrivateInnerKeyResponse) Marshal

func (m *GetPrivateInnerKeyResponse) Marshal() (dAtA []byte, err error)

func (*GetPrivateInnerKeyResponse) MarshalTo

func (m *GetPrivateInnerKeyResponse) MarshalTo(dAtA []byte) (int, error)

func (*GetPrivateInnerKeyResponse) ProtoMessage

func (*GetPrivateInnerKeyResponse) ProtoMessage()

func (*GetPrivateInnerKeyResponse) Reset

func (m *GetPrivateInnerKeyResponse) Reset()

func (*GetPrivateInnerKeyResponse) Size

func (m *GetPrivateInnerKeyResponse) Size() (n int)

func (*GetPrivateInnerKeyResponse) String

func (m *GetPrivateInnerKeyResponse) String() string

func (*GetPrivateInnerKeyResponse) Unmarshal

func (m *GetPrivateInnerKeyResponse) Unmarshal(dAtA []byte) error

type MixClient

type MixClient interface {
	NewRound(ctx context.Context, in *NewRoundRequest, opts ...grpc.CallOption) (*NewRoundResponse, error)
	EndRound(ctx context.Context, in *EndRoundRequest, opts ...grpc.CallOption) (*EndRoundResponse, error)
	AddMessages(ctx context.Context, opts ...grpc.CallOption) (Mix_AddMessagesClient, error)
	GetMessages(ctx context.Context, in *GetMessagesRequest, opts ...grpc.CallOption) (*GetMessagesResponse, error)
	StartRound(ctx context.Context, in *StartRoundRequest, opts ...grpc.CallOption) (*StartRoundResponse, error)
	SubmitCiphertexts(ctx context.Context, opts ...grpc.CallOption) (Mix_SubmitCiphertextsClient, error)
	VerifyProof(ctx context.Context, opts ...grpc.CallOption) (Mix_VerifyProofClient, error)
	ConfirmVerification(ctx context.Context, in *ConfirmVerificationRequest, opts ...grpc.CallOption) (*ConfirmVerificationResponse, error)
	// inner ciphertext related
	GetInnerKey(ctx context.Context, in *GetInnerKeyRequest, opts ...grpc.CallOption) (*GetInnerKeyResponse, error)
	AddInnerCiphertexts(ctx context.Context, in *AddInnerCiphertextsRequest, opts ...grpc.CallOption) (*AddInnerCiphertextsResponse, error)
	GetPrivateInnerKey(ctx context.Context, in *GetPrivateInnerKeyRequest, opts ...grpc.CallOption) (*GetPrivateInnerKeyResponse, error)
	Finalize(ctx context.Context, in *FinalizeRequest, opts ...grpc.CallOption) (*FinalizeResponse, error)
}

func NewMixClient

func NewMixClient(cc *grpc.ClientConn) MixClient

type Mix_AddMessagesClient

type Mix_AddMessagesClient interface {
	Send(*AddMessagesRequest) error
	CloseAndRecv() (*AddMessagesResponse, error)
	grpc.ClientStream
}

type Mix_AddMessagesServer

type Mix_AddMessagesServer interface {
	SendAndClose(*AddMessagesResponse) error
	Recv() (*AddMessagesRequest, error)
	grpc.ServerStream
}

type Mix_SubmitCiphertextsClient

type Mix_SubmitCiphertextsClient interface {
	Send(*SubmitCiphertextsRequest) error
	CloseAndRecv() (*SubmitCiphertextsResponse, error)
	grpc.ClientStream
}

type Mix_SubmitCiphertextsServer

type Mix_SubmitCiphertextsServer interface {
	SendAndClose(*SubmitCiphertextsResponse) error
	Recv() (*SubmitCiphertextsRequest, error)
	grpc.ServerStream
}

type Mix_VerifyProofClient

type Mix_VerifyProofClient interface {
	Send(*VerifyProofRequest) error
	CloseAndRecv() (*VerifyProofResponse, error)
	grpc.ClientStream
}

type Mix_VerifyProofServer

type Mix_VerifyProofServer interface {
	SendAndClose(*VerifyProofResponse) error
	Recv() (*VerifyProofRequest, error)
	grpc.ServerStream
}

type NewRoundRequest

type NewRoundRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*NewRoundRequest) Descriptor

func (*NewRoundRequest) Descriptor() ([]byte, []int)

func (*NewRoundRequest) GetRound

func (m *NewRoundRequest) GetRound() uint64

func (*NewRoundRequest) Marshal

func (m *NewRoundRequest) Marshal() (dAtA []byte, err error)

func (*NewRoundRequest) MarshalTo

func (m *NewRoundRequest) MarshalTo(dAtA []byte) (int, error)

func (*NewRoundRequest) ProtoMessage

func (*NewRoundRequest) ProtoMessage()

func (*NewRoundRequest) Reset

func (m *NewRoundRequest) Reset()

func (*NewRoundRequest) Size

func (m *NewRoundRequest) Size() (n int)

func (*NewRoundRequest) String

func (m *NewRoundRequest) String() string

func (*NewRoundRequest) Unmarshal

func (m *NewRoundRequest) Unmarshal(dAtA []byte) error

type NewRoundResponse

type NewRoundResponse struct {
}

func (*NewRoundResponse) Descriptor

func (*NewRoundResponse) Descriptor() ([]byte, []int)

func (*NewRoundResponse) Marshal

func (m *NewRoundResponse) Marshal() (dAtA []byte, err error)

func (*NewRoundResponse) MarshalTo

func (m *NewRoundResponse) MarshalTo(dAtA []byte) (int, error)

func (*NewRoundResponse) ProtoMessage

func (*NewRoundResponse) ProtoMessage()

func (*NewRoundResponse) Reset

func (m *NewRoundResponse) Reset()

func (*NewRoundResponse) Size

func (m *NewRoundResponse) Size() (n int)

func (*NewRoundResponse) String

func (m *NewRoundResponse) String() string

func (*NewRoundResponse) Unmarshal

func (m *NewRoundResponse) Unmarshal(dAtA []byte) error

type PrivateKey

type PrivateKey struct {
	X []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
}

func (*PrivateKey) Descriptor

func (*PrivateKey) Descriptor() ([]byte, []int)

func (*PrivateKey) GetX

func (m *PrivateKey) GetX() []byte

func (*PrivateKey) Marshal

func (m *PrivateKey) Marshal() (dAtA []byte, err error)

func (*PrivateKey) MarshalTo

func (m *PrivateKey) MarshalTo(dAtA []byte) (int, error)

func (*PrivateKey) ProtoMessage

func (*PrivateKey) ProtoMessage()

func (*PrivateKey) Reset

func (m *PrivateKey) Reset()

func (*PrivateKey) Size

func (m *PrivateKey) Size() (n int)

func (*PrivateKey) String

func (m *PrivateKey) String() string

func (*PrivateKey) Unmarshal

func (m *PrivateKey) Unmarshal(dAtA []byte) error

type PublicKey

type PublicKey struct {
	X []byte `protobuf:"bytes,1,opt,name=x,proto3" json:"x,omitempty"`
	Y []byte `protobuf:"bytes,2,opt,name=y,proto3" json:"y,omitempty"`
}

func (*PublicKey) Descriptor

func (*PublicKey) Descriptor() ([]byte, []int)

func (*PublicKey) GetX

func (m *PublicKey) GetX() []byte

func (*PublicKey) GetY

func (m *PublicKey) GetY() []byte

func (*PublicKey) Marshal

func (m *PublicKey) Marshal() (dAtA []byte, err error)

func (*PublicKey) MarshalTo

func (m *PublicKey) MarshalTo(dAtA []byte) (int, error)

func (*PublicKey) ProtoMessage

func (*PublicKey) ProtoMessage()

func (*PublicKey) Reset

func (m *PublicKey) Reset()

func (*PublicKey) Size

func (m *PublicKey) Size() (n int)

func (*PublicKey) String

func (m *PublicKey) String() string

func (*PublicKey) Unmarshal

func (m *PublicKey) Unmarshal(dAtA []byte) error

type Source

type Source int32
const (
	Source_CLIENT Source = 0
	Source_SERVER Source = 1
)

func (Source) EnumDescriptor

func (Source) EnumDescriptor() ([]byte, []int)

func (Source) String

func (x Source) String() string

type StartRoundRequest

type StartRoundRequest struct {
	Round uint64 `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
}

func (*StartRoundRequest) Descriptor

func (*StartRoundRequest) Descriptor() ([]byte, []int)

func (*StartRoundRequest) GetRound

func (m *StartRoundRequest) GetRound() uint64

func (*StartRoundRequest) Marshal

func (m *StartRoundRequest) Marshal() (dAtA []byte, err error)

func (*StartRoundRequest) MarshalTo

func (m *StartRoundRequest) MarshalTo(dAtA []byte) (int, error)

func (*StartRoundRequest) ProtoMessage

func (*StartRoundRequest) ProtoMessage()

func (*StartRoundRequest) Reset

func (m *StartRoundRequest) Reset()

func (*StartRoundRequest) Size

func (m *StartRoundRequest) Size() (n int)

func (*StartRoundRequest) String

func (m *StartRoundRequest) String() string

func (*StartRoundRequest) Unmarshal

func (m *StartRoundRequest) Unmarshal(dAtA []byte) error

type StartRoundResponse

type StartRoundResponse struct {
}

func (*StartRoundResponse) Descriptor

func (*StartRoundResponse) Descriptor() ([]byte, []int)

func (*StartRoundResponse) Marshal

func (m *StartRoundResponse) Marshal() (dAtA []byte, err error)

func (*StartRoundResponse) MarshalTo

func (m *StartRoundResponse) MarshalTo(dAtA []byte) (int, error)

func (*StartRoundResponse) ProtoMessage

func (*StartRoundResponse) ProtoMessage()

func (*StartRoundResponse) Reset

func (m *StartRoundResponse) Reset()

func (*StartRoundResponse) Size

func (m *StartRoundResponse) Size() (n int)

func (*StartRoundResponse) String

func (m *StartRoundResponse) String() string

func (*StartRoundResponse) Unmarshal

func (m *StartRoundResponse) Unmarshal(dAtA []byte) error

type SubmitCiphertextsRequest

type SubmitCiphertextsRequest struct {
	Round       uint64   `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
	Ciphertexts [][]byte `protobuf:"bytes,2,rep,name=ciphertexts" json:"ciphertexts,omitempty"`
	Proofs      [][]byte `protobuf:"bytes,3,rep,name=proofs" json:"proofs,omitempty"`
}

func (*SubmitCiphertextsRequest) Descriptor

func (*SubmitCiphertextsRequest) Descriptor() ([]byte, []int)

func (*SubmitCiphertextsRequest) GetCiphertexts

func (m *SubmitCiphertextsRequest) GetCiphertexts() [][]byte

func (*SubmitCiphertextsRequest) GetProofs

func (m *SubmitCiphertextsRequest) GetProofs() [][]byte

func (*SubmitCiphertextsRequest) GetRound

func (m *SubmitCiphertextsRequest) GetRound() uint64

func (*SubmitCiphertextsRequest) Marshal

func (m *SubmitCiphertextsRequest) Marshal() (dAtA []byte, err error)

func (*SubmitCiphertextsRequest) MarshalTo

func (m *SubmitCiphertextsRequest) MarshalTo(dAtA []byte) (int, error)

func (*SubmitCiphertextsRequest) ProtoMessage

func (*SubmitCiphertextsRequest) ProtoMessage()

func (*SubmitCiphertextsRequest) Reset

func (m *SubmitCiphertextsRequest) Reset()

func (*SubmitCiphertextsRequest) Size

func (m *SubmitCiphertextsRequest) Size() (n int)

func (*SubmitCiphertextsRequest) String

func (m *SubmitCiphertextsRequest) String() string

func (*SubmitCiphertextsRequest) Unmarshal

func (m *SubmitCiphertextsRequest) Unmarshal(dAtA []byte) error

type SubmitCiphertextsResponse

type SubmitCiphertextsResponse struct {
}

func (*SubmitCiphertextsResponse) Descriptor

func (*SubmitCiphertextsResponse) Descriptor() ([]byte, []int)

func (*SubmitCiphertextsResponse) Marshal

func (m *SubmitCiphertextsResponse) Marshal() (dAtA []byte, err error)

func (*SubmitCiphertextsResponse) MarshalTo

func (m *SubmitCiphertextsResponse) MarshalTo(dAtA []byte) (int, error)

func (*SubmitCiphertextsResponse) ProtoMessage

func (*SubmitCiphertextsResponse) ProtoMessage()

func (*SubmitCiphertextsResponse) Reset

func (m *SubmitCiphertextsResponse) Reset()

func (*SubmitCiphertextsResponse) Size

func (m *SubmitCiphertextsResponse) Size() (n int)

func (*SubmitCiphertextsResponse) String

func (m *SubmitCiphertextsResponse) String() string

func (*SubmitCiphertextsResponse) Unmarshal

func (m *SubmitCiphertextsResponse) Unmarshal(dAtA []byte) error

type Verifier

type Verifier interface {
	NewRound(round int) error

	EndRound(round int) error

	SetPublicKey(round int, x, y *big.Int) error

	PublicKey(round int) (*big.Int, *big.Int, error)

	PrivateKey(round int) (*big.Int, error)

	AddInnerCiphertexts(round int, msgs [][]byte) error

	Finalize(round int, privateKeys [][]byte) ([][]byte, error)
}

func NewVerifier

func NewVerifier(index int, groupSize int) Verifier

type VerifyProofRequest

type VerifyProofRequest struct {
	Round uint64   `protobuf:"fixed64,1,opt,name=round,proto3" json:"round,omitempty"`
	Index uint32   `protobuf:"fixed32,2,opt,name=index,proto3" json:"index,omitempty"`
	Keys  [][]byte `protobuf:"bytes,3,rep,name=keys" json:"keys,omitempty"`
	Proof []byte   `protobuf:"bytes,5,opt,name=proof,proto3" json:"proof,omitempty"`
}

func (*VerifyProofRequest) Descriptor

func (*VerifyProofRequest) Descriptor() ([]byte, []int)

func (*VerifyProofRequest) GetIndex

func (m *VerifyProofRequest) GetIndex() uint32

func (*VerifyProofRequest) GetKeys

func (m *VerifyProofRequest) GetKeys() [][]byte

func (*VerifyProofRequest) GetProof

func (m *VerifyProofRequest) GetProof() []byte

func (*VerifyProofRequest) GetRound

func (m *VerifyProofRequest) GetRound() uint64

func (*VerifyProofRequest) Marshal

func (m *VerifyProofRequest) Marshal() (dAtA []byte, err error)

func (*VerifyProofRequest) MarshalTo

func (m *VerifyProofRequest) MarshalTo(dAtA []byte) (int, error)

func (*VerifyProofRequest) ProtoMessage

func (*VerifyProofRequest) ProtoMessage()

func (*VerifyProofRequest) Reset

func (m *VerifyProofRequest) Reset()

func (*VerifyProofRequest) Size

func (m *VerifyProofRequest) Size() (n int)

func (*VerifyProofRequest) String

func (m *VerifyProofRequest) String() string

func (*VerifyProofRequest) Unmarshal

func (m *VerifyProofRequest) Unmarshal(dAtA []byte) error

type VerifyProofResponse

type VerifyProofResponse struct {
}

func (*VerifyProofResponse) Descriptor

func (*VerifyProofResponse) Descriptor() ([]byte, []int)

func (*VerifyProofResponse) Marshal

func (m *VerifyProofResponse) Marshal() (dAtA []byte, err error)

func (*VerifyProofResponse) MarshalTo

func (m *VerifyProofResponse) MarshalTo(dAtA []byte) (int, error)

func (*VerifyProofResponse) ProtoMessage

func (*VerifyProofResponse) ProtoMessage()

func (*VerifyProofResponse) Reset

func (m *VerifyProofResponse) Reset()

func (*VerifyProofResponse) Size

func (m *VerifyProofResponse) Size() (n int)

func (*VerifyProofResponse) String

func (m *VerifyProofResponse) String() string

func (*VerifyProofResponse) Unmarshal

func (m *VerifyProofResponse) Unmarshal(dAtA []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL