zkproof

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDifferentCurves is returned if the two points are in different curves
	ErrDifferentCurves = errors.New("different curves")
)
View Source
var (
	//ErrVerifyFailure is returned if the verification is failure.
	ErrVerifyFailure = errors.New("the verification is failure")
)

Functions

This section is empty.

Types

type IntegerFactorizationProofMessage

type IntegerFactorizationProofMessage struct {
	PublicKey            []byte   `protobuf:"bytes,1,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	Challenge            []byte   `protobuf:"bytes,2,opt,name=challenge,proto3" json:"challenge,omitempty"`
	Proof                []byte   `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewIntegerFactorizationProofMessage

func NewIntegerFactorizationProofMessage(primeFactor []*big.Int, publicKey *big.Int) (*IntegerFactorizationProofMessage, error)

func (*IntegerFactorizationProofMessage) Descriptor

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

func (*IntegerFactorizationProofMessage) GetChallenge

func (m *IntegerFactorizationProofMessage) GetChallenge() []byte

func (*IntegerFactorizationProofMessage) GetProof

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

func (*IntegerFactorizationProofMessage) GetPublicKey

func (m *IntegerFactorizationProofMessage) GetPublicKey() []byte

func (*IntegerFactorizationProofMessage) ProtoMessage

func (*IntegerFactorizationProofMessage) ProtoMessage()

func (*IntegerFactorizationProofMessage) Reset

func (*IntegerFactorizationProofMessage) String

func (*IntegerFactorizationProofMessage) Verify

func (*IntegerFactorizationProofMessage) XXX_DiscardUnknown

func (m *IntegerFactorizationProofMessage) XXX_DiscardUnknown()

func (*IntegerFactorizationProofMessage) XXX_Marshal

func (m *IntegerFactorizationProofMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*IntegerFactorizationProofMessage) XXX_Merge

func (*IntegerFactorizationProofMessage) XXX_Size

func (m *IntegerFactorizationProofMessage) XXX_Size() int

func (*IntegerFactorizationProofMessage) XXX_Unmarshal

func (m *IntegerFactorizationProofMessage) XXX_Unmarshal(b []byte) error

type SchnorrProofMessage

type SchnorrProofMessage struct {
	Blake2BKey           []byte                          `protobuf:"bytes,1,opt,name=blake2bKey,proto3" json:"blake2bKey,omitempty"`
	V                    *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,2,opt,name=V,proto3" json:"V,omitempty"`
	Alpha                *ecpointgrouplaw.EcPointMessage `protobuf:"bytes,3,opt,name=alpha,proto3" json:"alpha,omitempty"`
	U                    []byte                          `protobuf:"bytes,4,opt,name=u,proto3" json:"u,omitempty"`
	T                    []byte                          `protobuf:"bytes,5,opt,name=t,proto3" json:"t,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                        `json:"-"`
	XXX_unrecognized     []byte                          `json:"-"`
	XXX_sizecache        int32                           `json:"-"`
}

func NewBaseSchorrMessage

func NewBaseSchorrMessage(curve elliptic.Curve, a1 *big.Int) (*SchnorrProofMessage, error)

func NewSchorrMessage

func NewSchorrMessage(a1 *big.Int, a2 *big.Int, R *pt.ECPoint) (*SchnorrProofMessage, error)

func (*SchnorrProofMessage) Descriptor

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

func (*SchnorrProofMessage) GetAlpha

func (*SchnorrProofMessage) GetBlake2BKey

func (m *SchnorrProofMessage) GetBlake2BKey() []byte

func (*SchnorrProofMessage) GetT

func (m *SchnorrProofMessage) GetT() []byte

func (*SchnorrProofMessage) GetU

func (m *SchnorrProofMessage) GetU() []byte

func (*SchnorrProofMessage) GetV

func (*SchnorrProofMessage) ProtoMessage

func (*SchnorrProofMessage) ProtoMessage()

func (*SchnorrProofMessage) Reset

func (m *SchnorrProofMessage) Reset()

func (*SchnorrProofMessage) String

func (m *SchnorrProofMessage) String() string

func (*SchnorrProofMessage) Verify

func (s *SchnorrProofMessage) Verify(R *pt.ECPoint) error

func (*SchnorrProofMessage) XXX_DiscardUnknown

func (m *SchnorrProofMessage) XXX_DiscardUnknown()

func (*SchnorrProofMessage) XXX_Marshal

func (m *SchnorrProofMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SchnorrProofMessage) XXX_Merge

func (m *SchnorrProofMessage) XXX_Merge(src proto.Message)

func (*SchnorrProofMessage) XXX_Size

func (m *SchnorrProofMessage) XXX_Size() int

func (*SchnorrProofMessage) XXX_Unmarshal

func (m *SchnorrProofMessage) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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