zkproof

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//ErrVerifyFailure is returned if the verification is failure.
	ErrVerifyFailure = errors.New("the verification is failure")
	//ErrSmallPublicKeySize is returned if the size of public key is small
	ErrSmallPublicKeySize = errors.New("small public key")
	//ErrNotCoprime is returned if two integers are not coprime
	ErrNotCoprime = errors.New("two integers are not coprime")
	//ErrExceedMaxRetry is returned if we retried over times
	ErrExceedMaxRetry = errors.New("exceed max retries")
	//ErrTrivialCase is returned if z is one
	ErrTrivialCase = errors.New("z is 1")
)
View Source
var (
	// ErrDifferentCurves is returned if the two points are in different curves
	ErrDifferentCurves = errors.New("different curves")
)
View Source
var File_github_com_getamis_alice_crypto_zkproof_message_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type IntegerFactorizationProofMessage

type IntegerFactorizationProofMessage struct {
	Salt      []byte `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,omitempty"`
	PublicKey []byte `protobuf:"bytes,2,opt,name=publicKey,proto3" json:"publicKey,omitempty"`
	X         []byte `protobuf:"bytes,3,opt,name=x,proto3" json:"x,omitempty"`
	Y         []byte `protobuf:"bytes,4,opt,name=y,proto3" json:"y,omitempty"`
	// contains filtered or unexported fields
}

func NewIntegerFactorizationProofMessage

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

func (*IntegerFactorizationProofMessage) Descriptor deprecated

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

Deprecated: Use IntegerFactorizationProofMessage.ProtoReflect.Descriptor instead.

func (*IntegerFactorizationProofMessage) GetPublicKey

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

func (*IntegerFactorizationProofMessage) GetSalt added in v1.0.2

func (x *IntegerFactorizationProofMessage) GetSalt() []byte

func (*IntegerFactorizationProofMessage) GetX added in v1.0.2

func (*IntegerFactorizationProofMessage) GetY added in v1.0.2

func (*IntegerFactorizationProofMessage) ProtoMessage

func (*IntegerFactorizationProofMessage) ProtoMessage()

func (*IntegerFactorizationProofMessage) ProtoReflect added in v1.0.2

func (*IntegerFactorizationProofMessage) Reset

func (*IntegerFactorizationProofMessage) String

func (*IntegerFactorizationProofMessage) Verify

type SchnorrProofMessage

type SchnorrProofMessage struct {
	Salt  []byte                          `protobuf:"bytes,1,opt,name=salt,proto3" json:"salt,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"`
	// contains filtered or unexported fields
}

func NewBaseSchorrMessage

func NewBaseSchorrMessage(curve elliptic.Curve, a1 *big.Int, seedInfo ...[]byte) (*SchnorrProofMessage, error)

func NewSchnorrMessageWithGivenMN added in v1.0.2

func NewSchnorrMessageWithGivenMN(a1 *big.Int, a2 *big.Int, m, n *big.Int, R *pt.ECPoint, seedInfo ...[]byte) (*SchnorrProofMessage, error)

func NewSchorrMessage

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

func (*SchnorrProofMessage) Descriptor deprecated

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

Deprecated: Use SchnorrProofMessage.ProtoReflect.Descriptor instead.

func (*SchnorrProofMessage) GetAlpha

func (*SchnorrProofMessage) GetSalt added in v1.0.2

func (x *SchnorrProofMessage) GetSalt() []byte

func (*SchnorrProofMessage) GetT

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

func (*SchnorrProofMessage) GetU

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

func (*SchnorrProofMessage) GetV

func (*SchnorrProofMessage) ProtoMessage

func (*SchnorrProofMessage) ProtoMessage()

func (*SchnorrProofMessage) ProtoReflect added in v1.0.2

func (x *SchnorrProofMessage) ProtoReflect() protoreflect.Message

func (*SchnorrProofMessage) Reset

func (x *SchnorrProofMessage) Reset()

func (*SchnorrProofMessage) String

func (x *SchnorrProofMessage) String() string

func (*SchnorrProofMessage) Verify

func (s *SchnorrProofMessage) Verify(R *pt.ECPoint, seedInfo ...[]byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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