Documentation
¶
Index ¶
- Variables
- func RangeProofGenerators(n int) (g_, h_ []*crypto.Generator)
- type FormatPrivate
- type FormatProof
- type FormatPublic
- type FormatZK
- type LinearEquationPrivate
- type LinearEquationProof
- type LinearEquationPublic
- type LinearEquationZK
- type RangePrivate
- type RangeProof
- type RangePublic
- type RangeZK
- type Signature
- type SignaturePrivate
- type SignatureProof
- type SignaturePublic
- type ZK
- type ZKPrivate
- type ZKProof
- type ZKPublic
Constants ¶
This section is empty.
Variables ¶
View Source
var RangeG, RangeH = RangeProofGenerators(common.RangeProofShortBits)
Functions ¶
func RangeProofGenerators ¶
Types ¶
type FormatPrivate ¶
type FormatPrivate struct { *FormatPublic // contains filtered or unexported fields }
func (*FormatPrivate) SetPrivate ¶
func (private *FormatPrivate) SetPrivate(v, r *big.Int, g, h *crypto.Generator, c1, c2 *crypto.Commitment) *FormatPrivate
type FormatProof ¶
type FormatProof struct {
// contains filtered or unexported fields
}
func (*FormatProof) Bytes ¶
func (proof *FormatProof) Bytes() []byte
func (*FormatProof) ProofCheck ¶
func (proof *FormatProof) ProofCheck(public *FormatPublic) bool
func (*FormatProof) ProofGen ¶
func (proof *FormatProof) ProofGen(private *FormatPrivate) (*FormatProof, error)
func (*FormatProof) SetBytes ¶
func (proof *FormatProof) SetBytes(b []byte) error
type FormatPublic ¶
type FormatPublic struct {
// contains filtered or unexported fields
}
func (*FormatPublic) SetPublic ¶
func (public *FormatPublic) SetPublic(g, h *crypto.Generator, c1, c2 *crypto.Commitment) *FormatPublic
type FormatZK ¶
type FormatZK struct { *FormatProof *FormatPrivate }
type LinearEquationPrivate ¶
type LinearEquationPrivate struct { *LinearEquationPublic // contains filtered or unexported fields }
LinearEquationPrivate contains the linear equation public variables
func (*LinearEquationPrivate) SetPrivate ¶
func (private *LinearEquationPrivate) SetPrivate(a []*big.Int, b *big.Int, x []*big.Int, y *crypto.Commitment, g []*crypto.Generator) (*LinearEquationPrivate, error)
SetPrivate init public
type LinearEquationProof ¶
type LinearEquationProof struct {
// contains filtered or unexported fields
}
LinearEquationProof contains the generated linear equation proof variables
func (*LinearEquationProof) Bytes ¶
func (proof *LinearEquationProof) Bytes() []byte
Bytes returns the bytes encode of proof
func (*LinearEquationProof) ProofCheck ¶
func (proof *LinearEquationProof) ProofCheck(public *LinearEquationPublic) bool
ProofCheck check weather the linear equation proof holds
func (*LinearEquationProof) ProofGen ¶
func (proof *LinearEquationProof) ProofGen(private *LinearEquationPrivate) (*LinearEquationProof, error)
ProofGen generates linear equation proof
func (*LinearEquationProof) SetBytes ¶
func (proof *LinearEquationProof) SetBytes(b []byte) error
SetBytes sets proof with the bytes b
type LinearEquationPublic ¶
type LinearEquationPublic struct {
// contains filtered or unexported fields
}
LinearEquationPublic contains the linear equation public variables
func (*LinearEquationPublic) SetPublic ¶
func (public *LinearEquationPublic) SetPublic(a []*big.Int, b *big.Int, y *crypto.Commitment, g []*crypto.Generator) (*LinearEquationPublic, error)
SetPublic init public
type LinearEquationZK ¶
type LinearEquationZK struct { *LinearEquationProof *LinearEquationPrivate }
func (*LinearEquationZK) Check ¶
func (zk *LinearEquationZK) Check() bool
func (*LinearEquationZK) Init ¶
func (zk *LinearEquationZK) Init() *LinearEquationZK
func (*LinearEquationZK) Proof ¶
func (zk *LinearEquationZK) Proof() (err error)
type RangePrivate ¶
type RangePrivate struct { *RangePublic // contains filtered or unexported fields }
func (*RangePrivate) SetPrivate ¶
func (private *RangePrivate) SetPrivate(value *crypto.Commitment, g, h *crypto.Generator, g_, h_ []*crypto.Generator, n uint8, v, r *big.Int) (*RangePrivate, error)
type RangeProof ¶
type RangeProof struct {
// contains filtered or unexported fields
}
func (*RangeProof) Bytes ¶
func (proof *RangeProof) Bytes() []byte
func (*RangeProof) ProofCheck ¶
func (proof *RangeProof) ProofCheck(public *RangePublic) bool
func (*RangeProof) ProofGen ¶
func (proof *RangeProof) ProofGen(private *RangePrivate) (*RangeProof, error)
func (*RangeProof) SetBytes ¶
func (proof *RangeProof) SetBytes(b []byte) error
type RangePublic ¶
type RangePublic struct {
// contains filtered or unexported fields
}
func (*RangePublic) SetPublic ¶
func (public *RangePublic) SetPublic(value *crypto.Commitment, g, h *crypto.Generator, g_, h_ []*crypto.Generator, n uint8) (*RangePublic, error)
type RangeZK ¶
type RangeZK struct { *RangeProof *RangePrivate }
type Signature ¶
type Signature struct { *SignatureProof *SignaturePrivate }
type SignaturePrivate ¶
type SignaturePrivate struct { *SignaturePublic // contains filtered or unexported fields }
func (*SignaturePrivate) SetPrivate ¶
func (private *SignaturePrivate) SetPrivate(sk *big.Int, addr crypto.Address, h *crypto.Generator, e *big.Int) *SignaturePrivate
type SignatureProof ¶
type SignatureProof struct {
// contains filtered or unexported fields
}
func (*SignatureProof) Bytes ¶
func (proof *SignatureProof) Bytes() []byte
func (*SignatureProof) ProofCheck ¶
func (proof *SignatureProof) ProofCheck(public *SignaturePublic) bool
func (*SignatureProof) ProofGen ¶
func (proof *SignatureProof) ProofGen(private *SignaturePrivate) (*SignatureProof, error)
func (*SignatureProof) SetBytes ¶
func (proof *SignatureProof) SetBytes(b []byte) error
type SignaturePublic ¶
type SignaturePublic struct {
// contains filtered or unexported fields
}
func (*SignaturePublic) SetPublic ¶
func (public *SignaturePublic) SetPublic(addr crypto.Address, e *big.Int) *SignaturePublic
type ZKProof ¶
type ZKProof interface { crypto.HashVariable }
Click to show internal directories.
Click to hide internal directories.