serialnumberprivacy

package
v1.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SNPrivacyProof

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

SNPrivacyProof represents a zero-knowledge proof for proving the the serial number is correctly generated from the secret key and the SND with the following formula: SN = (sk + snd)^-1 * G[0].

func (SNPrivacyProof) Bytes

func (proof SNPrivacyProof) Bytes() []byte

Bytes returns the byte-representation of an SNPrivacyProof.

func (SNPrivacyProof) GetComInput

func (proof SNPrivacyProof) GetComInput() *crypto.Point

GetComInput returns the input commitment of an SNPrivacyProof.

func (SNPrivacyProof) GetComSK

func (proof SNPrivacyProof) GetComSK() *crypto.Point

GetComSK returns the secret key commitment of an SNPrivacyProof.

func (SNPrivacyProof) GetSN

func (proof SNPrivacyProof) GetSN() *crypto.Point

GetSN returns the serial number of an SNPrivacyProof.

func (*SNPrivacyProof) Init

func (proof *SNPrivacyProof) Init() *SNPrivacyProof

Init creates an empty SNPrivacyProof.

func (*SNPrivacyProof) Set

func (proof *SNPrivacyProof) Set(
	stmt *SerialNumberPrivacyStatement,
	tSK *crypto.Point,
	tInput *crypto.Point,
	tSN *crypto.Point,
	zSK *crypto.Scalar,
	zRSK *crypto.Scalar,
	zInput *crypto.Scalar,
	zRInput *crypto.Scalar)

Set sets data to an SNPrivacyProof.

func (*SNPrivacyProof) SetBytes

func (proof *SNPrivacyProof) SetBytes(bytes []byte) error

SetBytes sets raw-byte data into an SNPrivacyProof.

type SNPrivacyWitness

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

SNPrivacyWitness represents the witness of an SNPrivacyProof.

func (SNPrivacyWitness) Prove

func (wit SNPrivacyWitness) Prove(mess []byte) (*SNPrivacyProof, error)

Prove returns an SNPrivacyProof given its witness.

func (*SNPrivacyWitness) Set

func (wit *SNPrivacyWitness) Set(
	stmt *SerialNumberPrivacyStatement,
	SK *crypto.Scalar,
	rSK *crypto.Scalar,
	input *crypto.Scalar,
	rInput *crypto.Scalar)

Set sets data to an SNPrivacyWitness.

type SerialNumberPrivacyStatement

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

SerialNumberPrivacyStatement represents a statement of a SNPrivacyProof.

func (*SerialNumberPrivacyStatement) Set

func (stmt *SerialNumberPrivacyStatement) Set(
	SN *crypto.Point,
	comSK *crypto.Point,
	comInput *crypto.Point)

Set sets data to a SerialNumberPrivacyStatement.

Jump to

Keyboard shortcuts

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