Documentation
¶
Index ¶
- Constants
- type PublicParams
- func (pp *PublicParams) AddAuditor(auditor view.Identity)
- func (pp *PublicParams) AddIssuer(id view.Identity)
- func (pp *PublicParams) Auditors() []view.Identity
- func (pp *PublicParams) Bytes() ([]byte, error)
- func (pp *PublicParams) CertificationDriver() string
- func (pp *PublicParams) ComputeHash() ([]byte, error)
- func (pp *PublicParams) ComputeMaxTokenValue() uint64
- func (pp *PublicParams) Deserialize(raw []byte) error
- func (pp *PublicParams) GeneratePedersenParameters() error
- func (pp *PublicParams) GenerateRangeProofParameters(signer *pssign.Signer, maxValue uint) error
- func (pp *PublicParams) GraphHiding() bool
- func (pp *PublicParams) Identifier() string
- func (pp *PublicParams) MaxTokenValue() uint64
- func (pp *PublicParams) Precision() uint64
- func (pp *PublicParams) Serialize() ([]byte, error)
- func (pp *PublicParams) TokenDataHiding() bool
- func (pp *PublicParams) Validate() error
- type RangeProofParams
Constants ¶
View Source
const ( DLogPublicParameters = "zkatdlog" DefaultPrecision = uint64(64) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicParams ¶
type PublicParams struct {
// Label is the label associated with the PublicParams.
// It can be used by the driver for versioning purpose.
Label string
// Curve is the pairing-friendly elliptic curve used for everything but Idemix.
Curve mathlib.CurveID
// PedGen is the generator of the Pedersen commitment group.
PedGen *mathlib.G1
// PedParams contains the public parameters for the Pedersen commitment scheme.
PedParams []*mathlib.G1
// RangeProofParams contains the public parameters for the range proof scheme.
RangeProofParams *RangeProofParams
// IdemixCurveID is the pairing-friendly curve used for the idemix scheme.
IdemixCurveID mathlib.CurveID
// IdemixIssuerPK is the public key of the issuer of the idemix scheme.
IdemixIssuerPK []byte
// Auditor is the public key of the auditor.
Auditor []byte
// Issuers is a list of public keys of the entities that can issue tokens.
Issuers [][]byte
// MaxToken is the maximum quantity a token can hold
MaxToken uint64
// QuantityPrecision is the precision used to represent quantities
QuantityPrecision uint64
}
func NewPublicParamsFromBytes ¶
func NewPublicParamsFromBytes(raw []byte, label string) (*PublicParams, error)
func SetupWithCustomLabel ¶
func (*PublicParams) AddAuditor ¶
func (pp *PublicParams) AddAuditor(auditor view.Identity)
func (*PublicParams) AddIssuer ¶
func (pp *PublicParams) AddIssuer(id view.Identity)
func (*PublicParams) Auditors ¶
func (pp *PublicParams) Auditors() []view.Identity
func (*PublicParams) Bytes ¶
func (pp *PublicParams) Bytes() ([]byte, error)
func (*PublicParams) CertificationDriver ¶
func (pp *PublicParams) CertificationDriver() string
func (*PublicParams) ComputeHash ¶
func (pp *PublicParams) ComputeHash() ([]byte, error)
func (*PublicParams) ComputeMaxTokenValue ¶
func (pp *PublicParams) ComputeMaxTokenValue() uint64
func (*PublicParams) Deserialize ¶
func (pp *PublicParams) Deserialize(raw []byte) error
func (*PublicParams) GeneratePedersenParameters ¶
func (pp *PublicParams) GeneratePedersenParameters() error
func (*PublicParams) GenerateRangeProofParameters ¶
func (pp *PublicParams) GenerateRangeProofParameters(signer *pssign.Signer, maxValue uint) error
func (*PublicParams) GraphHiding ¶
func (pp *PublicParams) GraphHiding() bool
func (*PublicParams) Identifier ¶
func (pp *PublicParams) Identifier() string
func (*PublicParams) MaxTokenValue ¶
func (pp *PublicParams) MaxTokenValue() uint64
func (*PublicParams) Precision ¶
func (pp *PublicParams) Precision() uint64
func (*PublicParams) Serialize ¶
func (pp *PublicParams) Serialize() ([]byte, error)
func (*PublicParams) TokenDataHiding ¶
func (pp *PublicParams) TokenDataHiding() bool
func (*PublicParams) Validate ¶
func (pp *PublicParams) Validate() error
Directories
¶
| Path | Synopsis |
|---|---|
|
mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
nonanonym/mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
|
mock
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.