privacy

package
v0.0.0-...-1b893ba Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnonymousBase

type AnonymousBase struct {
	// contains filtered or unexported fields
}

func (*AnonymousBase) BaseMode

func (base *AnonymousBase) BaseMode() uint8

func (*AnonymousBase) Bytes

func (base *AnonymousBase) Bytes() []byte

func (*AnonymousBase) Check

func (base *AnonymousBase) Check(value *AnonymousValue, zk *AnonymousZK) bool

func (*AnonymousBase) NewAnonymousOutputSlot

func (base *AnonymousBase) NewAnonymousOutputSlot(value, r *big.Int, solvable bool, contractMode uint8, c ContractSlot) (*AnonymousSlot, error)

func (*AnonymousBase) Proof

func (base *AnonymousBase) Proof(v, r *big.Int, value *AnonymousValue) (*AnonymousZK, error)

func (*AnonymousBase) SetBytes

func (base *AnonymousBase) SetBytes(b []byte) error

func (*AnonymousBase) SetValue

func (base *AnonymousBase) SetValue(v, r *big.Int, solvable bool) *AnonymousValue

type AnonymousSlot

type AnonymousSlot struct {
	*AnonymousBase
	*AnonymousValue
	*AnonymousZK
	ContractSlot
	// contains filtered or unexported fields
}

func NewAnonymousInputSlot

func NewAnonymousInputSlot(outputSlot *AnonymousSlot) *AnonymousSlot

NewAnonymousInputSlot UTXO

func (*AnonymousSlot) Base

func (slot *AnonymousSlot) Base() Base

func (*AnonymousSlot) Bytes

func (slot *AnonymousSlot) Bytes() []byte

func (*AnonymousSlot) CheckZKs

func (slot *AnonymousSlot) CheckZKs() bool

func (*AnonymousSlot) Init

func (slot *AnonymousSlot) Init() *AnonymousSlot

func (*AnonymousSlot) SetBase

func (slot *AnonymousSlot) SetBase(base *AnonymousBase)

func (*AnonymousSlot) SetBytes

func (slot *AnonymousSlot) SetBytes(b []byte) (*AnonymousSlot, error)

func (*AnonymousSlot) SetMode

func (slot *AnonymousSlot) SetMode(mode uint8) error

func (*AnonymousSlot) SetSelfValue

func (slot *AnonymousSlot) SetSelfValue(value *AnonymousValue)

func (*AnonymousSlot) SetValue

func (slot *AnonymousSlot) SetValue(v, r *big.Int)

func (*AnonymousSlot) SlotMode

func (slot *AnonymousSlot) SlotMode() uint8

func (*AnonymousSlot) Value

func (slot *AnonymousSlot) Value() Value

func (*AnonymousSlot) ZKs

func (slot *AnonymousSlot) ZKs() ZKs

type AnonymousValue

type AnonymousValue struct {
	// contains filtered or unexported fields
}

func (*AnonymousValue) Bytes

func (value *AnonymousValue) Bytes() []byte

func (*AnonymousValue) SetBytes

func (value *AnonymousValue) SetBytes(b []byte) (*AnonymousValue, error)

func (*AnonymousValue) Solvable

func (value *AnonymousValue) Solvable() bool

func (*AnonymousValue) Solve

func (value *AnonymousValue) Solve(prv *PrivateKey) (*big.Int, error)

func (*AnonymousValue) ValueMode

func (value *AnonymousValue) ValueMode() uint8

type AnonymousZK

type AnonymousZK struct {
	// contains filtered or unexported fields
}

func (*AnonymousZK) Bytes

func (zk *AnonymousZK) Bytes() []byte

func (*AnonymousZK) SetBytes

func (zk *AnonymousZK) SetBytes(b []byte) error

func (*AnonymousZK) ZKMode

func (zk *AnonymousZK) ZKMode() uint8

type Base

type Base interface {
	BaseMode() uint8
	crypto.HashVariable
}

type ContractCallSlot

type ContractCallSlot struct {
	// contains filtered or unexported fields
}

func (*ContractCallSlot) ContractSlotMode

func (slot *ContractCallSlot) ContractSlotMode() uint8

type ContractCreateSlot

type ContractCreateSlot struct {
	// contains filtered or unexported fields
}

func (*ContractCreateSlot) Bytes

func (slot *ContractCreateSlot) Bytes() []byte

func (*ContractCreateSlot) ContractSlotMode

func (slot *ContractCreateSlot) ContractSlotMode() uint8

func (*ContractCreateSlot) SetBytes

func (slot *ContractCreateSlot) SetBytes(b []byte) error

type ContractReceiptSlot

type ContractReceiptSlot struct {
	// contains filtered or unexported fields
}

func (*ContractReceiptSlot) ContractSlotMode

func (slot *ContractReceiptSlot) ContractSlotMode() uint8

type ContractSlot

type ContractSlot interface {
	ContractSlotMode() uint8
	SetBytes(b []byte) error
	crypto.HashVariable
}

type PlaintextBase

type PlaintextBase struct {
	// contains filtered or unexported fields
}

func (*PlaintextBase) BaseMode

func (base *PlaintextBase) BaseMode() uint8

func (*PlaintextBase) Bytes

func (base *PlaintextBase) Bytes() []byte

func (*PlaintextBase) Check

func (base *PlaintextBase) Check(value *PlaintextValue, zk *PlaintextZK) bool

func (*PlaintextBase) NewPlaintextOutputSlot

func (base *PlaintextBase) NewPlaintextOutputSlot(value *big.Int, contractMode uint8, c ContractSlot) (*PlaintextSlot, error)

func (*PlaintextBase) Proof

func (base *PlaintextBase) Proof(prv *PrivateKey, value *PlaintextValue) (*PlaintextZK, error)

func (*PlaintextBase) SetBytes

func (base *PlaintextBase) SetBytes(b []byte) error

func (*PlaintextBase) SetValue

func (base *PlaintextBase) SetValue(nonce, v *big.Int) *PlaintextValue

type PlaintextSlot

type PlaintextSlot struct {
	*PlaintextBase
	*PlaintextValue
	*PlaintextZK
	ContractSlot
	// contains filtered or unexported fields
}

func (*PlaintextSlot) Base

func (slot *PlaintextSlot) Base() Base

func (*PlaintextSlot) Bytes

func (slot *PlaintextSlot) Bytes() []byte

func (*PlaintextSlot) CheckZKs

func (slot *PlaintextSlot) CheckZKs() bool

func (*PlaintextSlot) Init

func (slot *PlaintextSlot) Init() *PlaintextSlot

func (*PlaintextSlot) Nonce

func (slot *PlaintextSlot) Nonce() (*big.Int, error)

func (*PlaintextSlot) SetBase

func (slot *PlaintextSlot) SetBase(base *PlaintextBase)

func (*PlaintextSlot) SetBytes

func (slot *PlaintextSlot) SetBytes(b []byte) (*PlaintextSlot, error)

func (*PlaintextSlot) SetMode

func (slot *PlaintextSlot) SetMode(mode uint8) error

func (*PlaintextSlot) SetValue

func (slot *PlaintextSlot) SetValue(nonce, value *big.Int)

func (*PlaintextSlot) SlotMode

func (slot *PlaintextSlot) SlotMode() uint8

func (*PlaintextSlot) Value

func (slot *PlaintextSlot) Value() Value

func (*PlaintextSlot) ZKs

func (slot *PlaintextSlot) ZKs() ZKs

type PlaintextValue

type PlaintextValue struct {
	// contains filtered or unexported fields
}

func (*PlaintextValue) Bytes

func (value *PlaintextValue) Bytes() []byte

func (*PlaintextValue) SetBytes

func (value *PlaintextValue) SetBytes(b []byte) (*PlaintextValue, error)

func (*PlaintextValue) Solvable

func (value *PlaintextValue) Solvable() bool

func (*PlaintextValue) Solve

func (value *PlaintextValue) Solve(prv *PrivateKey) (*big.Int, error)

func (*PlaintextValue) ValueMode

func (value *PlaintextValue) ValueMode() uint8

type PlaintextZK

type PlaintextZK struct {
	// contains filtered or unexported fields
}

func (*PlaintextZK) Bytes

func (zk *PlaintextZK) Bytes() []byte

func (*PlaintextZK) SetBytes

func (zk *PlaintextZK) SetBytes(b []byte) error

func (*PlaintextZK) ZKMode

func (zk *PlaintextZK) ZKMode() uint8

type PrivateKey

type PrivateKey struct{ *big.Int }

func NewHashPrivateKey

func NewHashPrivateKey(v ...crypto.HashVariable) *PrivateKey

func NewRandomPrivateKey

func NewRandomPrivateKey() *PrivateKey

func (PrivateKey) GenAnonymousBase

func (prv PrivateKey) GenAnonymousBase() *AnonymousBase

func (PrivateKey) GenPlaintextBase

func (prv PrivateKey) GenPlaintextBase() *PlaintextBase

func (PrivateKey) GenSecretBase

func (prv PrivateKey) GenSecretBase() *SecretBase

func (*PrivateKey) NewPlaintextInputSlot

func (prv *PrivateKey) NewPlaintextInputSlot(nonce, value *big.Int) *PlaintextSlot

func (*PrivateKey) Solve

func (prv *PrivateKey) Solve(c, d *crypto.Commitment) (*big.Int, error)

type SecretBase

type SecretBase struct {
	// contains filtered or unexported fields
}

func (*SecretBase) BaseMode

func (base *SecretBase) BaseMode() uint8

func (*SecretBase) Bytes

func (base *SecretBase) Bytes() []byte

func (*SecretBase) Check

func (base *SecretBase) Check(value *SecretValue, zk *SecretZK) bool

func (*SecretBase) GenAnonymousBase

func (base *SecretBase) GenAnonymousBase() *AnonymousBase

func (*SecretBase) GenPlaintextBase

func (base *SecretBase) GenPlaintextBase() *PlaintextBase

func (*SecretBase) NewSecretOutputSlot

func (base *SecretBase) NewSecretOutputSlot(value, r *big.Int, solvable bool, contractMode uint8, c ContractSlot) (*SecretSlot, error)

func (*SecretBase) Proof

func (base *SecretBase) Proof(v, r *big.Int, value *SecretValue) (*SecretZK, error)

func (*SecretBase) SetBytes

func (base *SecretBase) SetBytes(b []byte) error

func (*SecretBase) SetValue

func (base *SecretBase) SetValue(v, r *big.Int, solvable bool) *SecretValue

type SecretSlot

type SecretSlot struct {
	*SecretBase
	*SecretValue
	*SecretZK
	ContractSlot
	// contains filtered or unexported fields
}

func NewSecretInputSlot

func NewSecretInputSlot(outputSlot *SecretSlot) *SecretSlot

NewSecretInputSlot UTXO

func (*SecretSlot) Base

func (slot *SecretSlot) Base() Base

func (*SecretSlot) Bytes

func (slot *SecretSlot) Bytes() []byte

func (*SecretSlot) CheckZKs

func (slot *SecretSlot) CheckZKs() bool

func (*SecretSlot) Init

func (slot *SecretSlot) Init() *SecretSlot

func (*SecretSlot) SetBase

func (slot *SecretSlot) SetBase(base *SecretBase)

func (*SecretSlot) SetBytes

func (slot *SecretSlot) SetBytes(b []byte) (*SecretSlot, error)

func (*SecretSlot) SetMode

func (slot *SecretSlot) SetMode(mode uint8) error

func (*SecretSlot) SetSelfValue

func (slot *SecretSlot) SetSelfValue(value *SecretValue)

func (*SecretSlot) SetValue

func (slot *SecretSlot) SetValue(v, r *big.Int)

func (*SecretSlot) SlotMode

func (slot *SecretSlot) SlotMode() uint8

func (*SecretSlot) Value

func (slot *SecretSlot) Value() Value

func (*SecretSlot) ZKs

func (slot *SecretSlot) ZKs() ZKs

type SecretValue

type SecretValue struct {
	// contains filtered or unexported fields
}

func (*SecretValue) Bytes

func (value *SecretValue) Bytes() []byte

func (*SecretValue) SetBytes

func (value *SecretValue) SetBytes(b []byte) (*SecretValue, error)

func (*SecretValue) Solvable

func (value *SecretValue) Solvable() bool

func (*SecretValue) Solve

func (value *SecretValue) Solve(prv *PrivateKey) (*big.Int, error)

func (*SecretValue) ValueMode

func (value *SecretValue) ValueMode() uint8

type SecretZK

type SecretZK struct {
	// contains filtered or unexported fields
}

func (*SecretZK) Bytes

func (zk *SecretZK) Bytes() []byte

func (*SecretZK) SetBytes

func (zk *SecretZK) SetBytes(b []byte) error

func (*SecretZK) ZKMode

func (zk *SecretZK) ZKMode() uint8

type Slot

type Slot interface {
	SlotMode() uint8
	CheckZKs() bool
	Base() Base
	Value() Value
	ZKs() ZKs
	crypto.HashVariable
}

type Value

type Value interface {
	ValueMode() uint8
	Solvable() bool
	Solve(prv *PrivateKey) (*big.Int, error)
	crypto.HashVariable
}

type ZKs

type ZKs interface {
	ZKMode() uint8
	crypto.HashVariable
}

Jump to

Keyboard shortcuts

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