Documentation ¶
Index ¶
- Variables
- func AggregatePk(apk []byte, pks ...[]byte) (newApk []byte, err error)
- func AggregateSig(sig []byte, sigs ...[]byte) (aggregatedSig []byte, err error)
- func Connect()
- func CreateApk(pk []byte) (apk []byte, err error)
- func Disconnect()
- func GenerateKeys() (secret []byte, public []byte)
- func RegisterSignerServer(s *grpc.Server, srv SignerServer)
- func Sign(sk, pk, msg []byte) (signature []byte, err error)
- func Verify(apk, sig, msg []byte) (err error)
- type AggregatePKRequest
- func (*AggregatePKRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AggregatePKRequest) GetAPK() []byte
- func (x *AggregatePKRequest) GetKeys() [][]byte
- func (*AggregatePKRequest) ProtoMessage()
- func (x *AggregatePKRequest) ProtoReflect() protoreflect.Message
- func (x *AggregatePKRequest) Reset()
- func (x *AggregatePKRequest) String() string
- type AggregateResponse
- func (*AggregateResponse) Descriptor() ([]byte, []int)deprecated
- func (m *AggregateResponse) GetAgg() isAggregateResponse_Agg
- func (x *AggregateResponse) GetCode() []byte
- func (x *AggregateResponse) GetError() Error
- func (*AggregateResponse) ProtoMessage()
- func (x *AggregateResponse) ProtoReflect() protoreflect.Message
- func (x *AggregateResponse) Reset()
- func (x *AggregateResponse) String() string
- type AggregateResponse_Code
- type AggregateResponse_Error
- type AggregateSigRequest
- func (*AggregateSigRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AggregateSigRequest) GetSignature() []byte
- func (x *AggregateSigRequest) GetSignatures() [][]byte
- func (*AggregateSigRequest) ProtoMessage()
- func (x *AggregateSigRequest) ProtoReflect() protoreflect.Message
- func (x *AggregateSigRequest) Reset()
- func (x *AggregateSigRequest) String() string
- type CreateAPKRequest
- type CreateAPKResponse
- func (*CreateAPKResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateAPKResponse) GetAPK() []byte
- func (m *CreateAPKResponse) GetApk() isCreateAPKResponse_Apk
- func (x *CreateAPKResponse) GetError() Error
- func (*CreateAPKResponse) ProtoMessage()
- func (x *CreateAPKResponse) ProtoReflect() protoreflect.Message
- func (x *CreateAPKResponse) Reset()
- func (x *CreateAPKResponse) String() string
- type CreateAPKResponse_APK
- type CreateAPKResponse_Error
- type Error
- type GenerateKeysRequest
- type GenerateKeysResponse
- func (*GenerateKeysResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GenerateKeysResponse) GetPublicKey() []byte
- func (x *GenerateKeysResponse) GetSecretKey() []byte
- func (*GenerateKeysResponse) ProtoMessage()
- func (x *GenerateKeysResponse) ProtoReflect() protoreflect.Message
- func (x *GenerateKeysResponse) Reset()
- func (x *GenerateKeysResponse) String() string
- type SignRequest
- func (*SignRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignRequest) GetMessage() []byte
- func (x *SignRequest) GetPublicKey() []byte
- func (x *SignRequest) GetSecretKey() []byte
- func (*SignRequest) ProtoMessage()
- func (x *SignRequest) ProtoReflect() protoreflect.Message
- func (x *SignRequest) Reset()
- func (x *SignRequest) String() string
- type SignResponse
- func (*SignResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SignResponse) GetError() Error
- func (m *SignResponse) GetSig() isSignResponse_Sig
- func (x *SignResponse) GetSignature() []byte
- func (*SignResponse) ProtoMessage()
- func (x *SignResponse) ProtoReflect() protoreflect.Message
- func (x *SignResponse) Reset()
- func (x *SignResponse) String() string
- type SignResponse_Error
- type SignResponse_Signature
- type SignerClient
- type SignerServer
- type UnimplementedSignerServer
- func (*UnimplementedSignerServer) AggregatePK(context.Context, *AggregatePKRequest) (*AggregateResponse, error)
- func (*UnimplementedSignerServer) AggregateSig(context.Context, *AggregateSigRequest) (*AggregateResponse, error)
- func (*UnimplementedSignerServer) CreateAPK(context.Context, *CreateAPKRequest) (*CreateAPKResponse, error)
- func (*UnimplementedSignerServer) GenerateKeys(context.Context, *GenerateKeysRequest) (*GenerateKeysResponse, error)
- func (*UnimplementedSignerServer) Sign(context.Context, *SignRequest) (*SignResponse, error)
- func (*UnimplementedSignerServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyRequest) GetApk() []byte
- func (x *VerifyRequest) GetMessage() []byte
- func (x *VerifyRequest) GetSignature() []byte
- func (*VerifyRequest) ProtoMessage()
- func (x *VerifyRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyRequest) Reset()
- func (x *VerifyRequest) String() string
- type VerifyResponse
- func (*VerifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyResponse) GetError() Error
- func (x *VerifyResponse) GetValid() bool
- func (m *VerifyResponse) GetVer() isVerifyResponse_Ver
- func (*VerifyResponse) ProtoMessage()
- func (x *VerifyResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyResponse) Reset()
- func (x *VerifyResponse) String() string
- type VerifyResponse_Error
- type VerifyResponse_Valid
Constants ¶
This section is empty.
Variables ¶
var ( Error_name = map[int32]string{ 0: "BLS_INVALID_BYTES", 1: "BLS_VERIFICATION_FAILED", 2: "UNKNOWN", } Error_value = map[string]int32{ "BLS_INVALID_BYTES": 0, "BLS_VERIFICATION_FAILED": 1, "UNKNOWN": 2, } )
Enum value maps for Error.
var Binary []byte
var File_bls12381sig_proto protoreflect.FileDescriptor
Functions ¶
func AggregateSig ¶
func Disconnect ¶
func Disconnect()
Disconnect closes the socket, stops the GRPC server and cleans up
func GenerateKeys ¶
func RegisterSignerServer ¶
func RegisterSignerServer(s *grpc.Server, srv SignerServer)
Types ¶
type AggregatePKRequest ¶
type AggregatePKRequest struct { APK []byte `protobuf:"bytes,1,opt,name=APK,proto3" json:"APK,omitempty"` Keys [][]byte `protobuf:"bytes,2,rep,name=Keys,proto3" json:"Keys,omitempty"` // contains filtered or unexported fields }
func (*AggregatePKRequest) Descriptor
deprecated
func (*AggregatePKRequest) Descriptor() ([]byte, []int)
Deprecated: Use AggregatePKRequest.ProtoReflect.Descriptor instead.
func (*AggregatePKRequest) GetAPK ¶
func (x *AggregatePKRequest) GetAPK() []byte
func (*AggregatePKRequest) GetKeys ¶
func (x *AggregatePKRequest) GetKeys() [][]byte
func (*AggregatePKRequest) ProtoMessage ¶
func (*AggregatePKRequest) ProtoMessage()
func (*AggregatePKRequest) ProtoReflect ¶
func (x *AggregatePKRequest) ProtoReflect() protoreflect.Message
func (*AggregatePKRequest) Reset ¶
func (x *AggregatePKRequest) Reset()
func (*AggregatePKRequest) String ¶
func (x *AggregatePKRequest) String() string
type AggregateResponse ¶
type AggregateResponse struct { // Types that are assignable to Agg: // *AggregateResponse_Code // *AggregateResponse_Error Agg isAggregateResponse_Agg `protobuf_oneof:"agg"` // contains filtered or unexported fields }
func (*AggregateResponse) Descriptor
deprecated
func (*AggregateResponse) Descriptor() ([]byte, []int)
Deprecated: Use AggregateResponse.ProtoReflect.Descriptor instead.
func (*AggregateResponse) GetAgg ¶
func (m *AggregateResponse) GetAgg() isAggregateResponse_Agg
func (*AggregateResponse) GetCode ¶
func (x *AggregateResponse) GetCode() []byte
func (*AggregateResponse) GetError ¶
func (x *AggregateResponse) GetError() Error
func (*AggregateResponse) ProtoMessage ¶
func (*AggregateResponse) ProtoMessage()
func (*AggregateResponse) ProtoReflect ¶
func (x *AggregateResponse) ProtoReflect() protoreflect.Message
func (*AggregateResponse) Reset ¶
func (x *AggregateResponse) Reset()
func (*AggregateResponse) String ¶
func (x *AggregateResponse) String() string
type AggregateResponse_Code ¶
type AggregateResponse_Code struct {
Code []byte `protobuf:"bytes,1,opt,name=Code,proto3,oneof"`
}
type AggregateResponse_Error ¶
type AggregateResponse_Error struct {
Error Error `protobuf:"varint,2,opt,name=Error,proto3,enum=signer.Error,oneof"`
}
type AggregateSigRequest ¶
type AggregateSigRequest struct { Signature []byte `protobuf:"bytes,1,opt,name=Signature,proto3" json:"Signature,omitempty"` Signatures [][]byte `protobuf:"bytes,2,rep,name=Signatures,proto3" json:"Signatures,omitempty"` // contains filtered or unexported fields }
func (*AggregateSigRequest) Descriptor
deprecated
func (*AggregateSigRequest) Descriptor() ([]byte, []int)
Deprecated: Use AggregateSigRequest.ProtoReflect.Descriptor instead.
func (*AggregateSigRequest) GetSignature ¶
func (x *AggregateSigRequest) GetSignature() []byte
func (*AggregateSigRequest) GetSignatures ¶
func (x *AggregateSigRequest) GetSignatures() [][]byte
func (*AggregateSigRequest) ProtoMessage ¶
func (*AggregateSigRequest) ProtoMessage()
func (*AggregateSigRequest) ProtoReflect ¶
func (x *AggregateSigRequest) ProtoReflect() protoreflect.Message
func (*AggregateSigRequest) Reset ¶
func (x *AggregateSigRequest) Reset()
func (*AggregateSigRequest) String ¶
func (x *AggregateSigRequest) String() string
type CreateAPKRequest ¶
type CreateAPKRequest struct { PublicKey []byte `protobuf:"bytes,1,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` // contains filtered or unexported fields }
func (*CreateAPKRequest) Descriptor
deprecated
func (*CreateAPKRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateAPKRequest.ProtoReflect.Descriptor instead.
func (*CreateAPKRequest) GetPublicKey ¶
func (x *CreateAPKRequest) GetPublicKey() []byte
func (*CreateAPKRequest) ProtoMessage ¶
func (*CreateAPKRequest) ProtoMessage()
func (*CreateAPKRequest) ProtoReflect ¶
func (x *CreateAPKRequest) ProtoReflect() protoreflect.Message
func (*CreateAPKRequest) Reset ¶
func (x *CreateAPKRequest) Reset()
func (*CreateAPKRequest) String ¶
func (x *CreateAPKRequest) String() string
type CreateAPKResponse ¶
type CreateAPKResponse struct { // Types that are assignable to Apk: // *CreateAPKResponse_APK // *CreateAPKResponse_Error Apk isCreateAPKResponse_Apk `protobuf_oneof:"apk"` // contains filtered or unexported fields }
func (*CreateAPKResponse) Descriptor
deprecated
func (*CreateAPKResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateAPKResponse.ProtoReflect.Descriptor instead.
func (*CreateAPKResponse) GetAPK ¶
func (x *CreateAPKResponse) GetAPK() []byte
func (*CreateAPKResponse) GetApk ¶
func (m *CreateAPKResponse) GetApk() isCreateAPKResponse_Apk
func (*CreateAPKResponse) GetError ¶
func (x *CreateAPKResponse) GetError() Error
func (*CreateAPKResponse) ProtoMessage ¶
func (*CreateAPKResponse) ProtoMessage()
func (*CreateAPKResponse) ProtoReflect ¶
func (x *CreateAPKResponse) ProtoReflect() protoreflect.Message
func (*CreateAPKResponse) Reset ¶
func (x *CreateAPKResponse) Reset()
func (*CreateAPKResponse) String ¶
func (x *CreateAPKResponse) String() string
type CreateAPKResponse_APK ¶
type CreateAPKResponse_APK struct {
APK []byte `protobuf:"bytes,1,opt,name=APK,proto3,oneof"`
}
type CreateAPKResponse_Error ¶
type CreateAPKResponse_Error struct {
Error Error `protobuf:"varint,2,opt,name=Error,proto3,enum=signer.Error,oneof"`
}
type Error ¶
type Error int32
func (Error) Descriptor ¶
func (Error) Descriptor() protoreflect.EnumDescriptor
func (Error) EnumDescriptor
deprecated
func (Error) Number ¶
func (x Error) Number() protoreflect.EnumNumber
func (Error) Type ¶
func (Error) Type() protoreflect.EnumType
type GenerateKeysRequest ¶
type GenerateKeysRequest struct {
// contains filtered or unexported fields
}
func (*GenerateKeysRequest) Descriptor
deprecated
func (*GenerateKeysRequest) Descriptor() ([]byte, []int)
Deprecated: Use GenerateKeysRequest.ProtoReflect.Descriptor instead.
func (*GenerateKeysRequest) ProtoMessage ¶
func (*GenerateKeysRequest) ProtoMessage()
func (*GenerateKeysRequest) ProtoReflect ¶
func (x *GenerateKeysRequest) ProtoReflect() protoreflect.Message
func (*GenerateKeysRequest) Reset ¶
func (x *GenerateKeysRequest) Reset()
func (*GenerateKeysRequest) String ¶
func (x *GenerateKeysRequest) String() string
type GenerateKeysResponse ¶
type GenerateKeysResponse struct { SecretKey []byte `protobuf:"bytes,1,opt,name=SecretKey,proto3" json:"SecretKey,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` // contains filtered or unexported fields }
func (*GenerateKeysResponse) Descriptor
deprecated
func (*GenerateKeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use GenerateKeysResponse.ProtoReflect.Descriptor instead.
func (*GenerateKeysResponse) GetPublicKey ¶
func (x *GenerateKeysResponse) GetPublicKey() []byte
func (*GenerateKeysResponse) GetSecretKey ¶
func (x *GenerateKeysResponse) GetSecretKey() []byte
func (*GenerateKeysResponse) ProtoMessage ¶
func (*GenerateKeysResponse) ProtoMessage()
func (*GenerateKeysResponse) ProtoReflect ¶
func (x *GenerateKeysResponse) ProtoReflect() protoreflect.Message
func (*GenerateKeysResponse) Reset ¶
func (x *GenerateKeysResponse) Reset()
func (*GenerateKeysResponse) String ¶
func (x *GenerateKeysResponse) String() string
type SignRequest ¶
type SignRequest struct { SecretKey []byte `protobuf:"bytes,1,opt,name=SecretKey,proto3" json:"SecretKey,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=PublicKey,proto3" json:"PublicKey,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"` // contains filtered or unexported fields }
func (*SignRequest) Descriptor
deprecated
func (*SignRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignRequest.ProtoReflect.Descriptor instead.
func (*SignRequest) GetMessage ¶
func (x *SignRequest) GetMessage() []byte
func (*SignRequest) GetPublicKey ¶
func (x *SignRequest) GetPublicKey() []byte
func (*SignRequest) GetSecretKey ¶
func (x *SignRequest) GetSecretKey() []byte
func (*SignRequest) ProtoMessage ¶
func (*SignRequest) ProtoMessage()
func (*SignRequest) ProtoReflect ¶
func (x *SignRequest) ProtoReflect() protoreflect.Message
func (*SignRequest) Reset ¶
func (x *SignRequest) Reset()
func (*SignRequest) String ¶
func (x *SignRequest) String() string
type SignResponse ¶
type SignResponse struct { // Types that are assignable to Sig: // *SignResponse_Signature // *SignResponse_Error Sig isSignResponse_Sig `protobuf_oneof:"sig"` // contains filtered or unexported fields }
func (*SignResponse) Descriptor
deprecated
func (*SignResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignResponse.ProtoReflect.Descriptor instead.
func (*SignResponse) GetError ¶
func (x *SignResponse) GetError() Error
func (*SignResponse) GetSig ¶
func (m *SignResponse) GetSig() isSignResponse_Sig
func (*SignResponse) GetSignature ¶
func (x *SignResponse) GetSignature() []byte
func (*SignResponse) ProtoMessage ¶
func (*SignResponse) ProtoMessage()
func (*SignResponse) ProtoReflect ¶
func (x *SignResponse) ProtoReflect() protoreflect.Message
func (*SignResponse) Reset ¶
func (x *SignResponse) Reset()
func (*SignResponse) String ¶
func (x *SignResponse) String() string
type SignResponse_Error ¶
type SignResponse_Error struct {
Error Error `protobuf:"varint,2,opt,name=Error,proto3,enum=signer.Error,oneof"`
}
type SignResponse_Signature ¶
type SignResponse_Signature struct {
Signature []byte `protobuf:"bytes,1,opt,name=Signature,proto3,oneof"`
}
type SignerClient ¶
type SignerClient interface { GenerateKeys(ctx context.Context, in *GenerateKeysRequest, opts ...grpc.CallOption) (*GenerateKeysResponse, error) Sign(ctx context.Context, in *SignRequest, opts ...grpc.CallOption) (*SignResponse, error) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) CreateAPK(ctx context.Context, in *CreateAPKRequest, opts ...grpc.CallOption) (*CreateAPKResponse, error) AggregatePK(ctx context.Context, in *AggregatePKRequest, opts ...grpc.CallOption) (*AggregateResponse, error) AggregateSig(ctx context.Context, in *AggregateSigRequest, opts ...grpc.CallOption) (*AggregateResponse, error) }
SignerClient is the client API for Signer service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSignerClient ¶
func NewSignerClient(cc grpc.ClientConnInterface) SignerClient
type SignerServer ¶
type SignerServer interface { GenerateKeys(context.Context, *GenerateKeysRequest) (*GenerateKeysResponse, error) Sign(context.Context, *SignRequest) (*SignResponse, error) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) CreateAPK(context.Context, *CreateAPKRequest) (*CreateAPKResponse, error) AggregatePK(context.Context, *AggregatePKRequest) (*AggregateResponse, error) AggregateSig(context.Context, *AggregateSigRequest) (*AggregateResponse, error) }
SignerServer is the server API for Signer service.
type UnimplementedSignerServer ¶
type UnimplementedSignerServer struct { }
UnimplementedSignerServer can be embedded to have forward compatible implementations.
func (*UnimplementedSignerServer) AggregatePK ¶
func (*UnimplementedSignerServer) AggregatePK(context.Context, *AggregatePKRequest) (*AggregateResponse, error)
func (*UnimplementedSignerServer) AggregateSig ¶
func (*UnimplementedSignerServer) AggregateSig(context.Context, *AggregateSigRequest) (*AggregateResponse, error)
func (*UnimplementedSignerServer) CreateAPK ¶
func (*UnimplementedSignerServer) CreateAPK(context.Context, *CreateAPKRequest) (*CreateAPKResponse, error)
func (*UnimplementedSignerServer) GenerateKeys ¶
func (*UnimplementedSignerServer) GenerateKeys(context.Context, *GenerateKeysRequest) (*GenerateKeysResponse, error)
func (*UnimplementedSignerServer) Sign ¶
func (*UnimplementedSignerServer) Sign(context.Context, *SignRequest) (*SignResponse, error)
func (*UnimplementedSignerServer) Verify ¶
func (*UnimplementedSignerServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
type VerifyRequest ¶
type VerifyRequest struct { Apk []byte `protobuf:"bytes,1,opt,name=Apk,proto3" json:"Apk,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=Signature,proto3" json:"Signature,omitempty"` Message []byte `protobuf:"bytes,3,opt,name=Message,proto3" json:"Message,omitempty"` // contains filtered or unexported fields }
func (*VerifyRequest) Descriptor
deprecated
func (*VerifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
func (*VerifyRequest) GetApk ¶
func (x *VerifyRequest) GetApk() []byte
func (*VerifyRequest) GetMessage ¶
func (x *VerifyRequest) GetMessage() []byte
func (*VerifyRequest) GetSignature ¶
func (x *VerifyRequest) GetSignature() []byte
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) ProtoReflect ¶
func (x *VerifyRequest) ProtoReflect() protoreflect.Message
func (*VerifyRequest) Reset ¶
func (x *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (x *VerifyRequest) String() string
type VerifyResponse ¶
type VerifyResponse struct { // Types that are assignable to Ver: // *VerifyResponse_Valid // *VerifyResponse_Error Ver isVerifyResponse_Ver `protobuf_oneof:"ver"` // contains filtered or unexported fields }
func (*VerifyResponse) Descriptor
deprecated
func (*VerifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
func (*VerifyResponse) GetError ¶
func (x *VerifyResponse) GetError() Error
func (*VerifyResponse) GetValid ¶
func (x *VerifyResponse) GetValid() bool
func (*VerifyResponse) GetVer ¶
func (m *VerifyResponse) GetVer() isVerifyResponse_Ver
func (*VerifyResponse) ProtoMessage ¶
func (*VerifyResponse) ProtoMessage()
func (*VerifyResponse) ProtoReflect ¶
func (x *VerifyResponse) ProtoReflect() protoreflect.Message
func (*VerifyResponse) Reset ¶
func (x *VerifyResponse) Reset()
func (*VerifyResponse) String ¶
func (x *VerifyResponse) String() string
type VerifyResponse_Error ¶
type VerifyResponse_Error struct {
Error Error `protobuf:"varint,2,opt,name=Error,proto3,enum=signer.Error,oneof"`
}
type VerifyResponse_Valid ¶
type VerifyResponse_Valid struct {
Valid bool `protobuf:"varint,1,opt,name=Valid,proto3,oneof"`
}