zkp

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Iterations = 30

Variables

This section is empty.

Functions

func DlnVerify

func DlnVerify(dp *DlnProof, h1, h2, N *big.Int) bool

func NewPDLwSlackProve

func NewPDLwSlackProve(wit *PDLwSlackWitness, st *PDLwSlackStatement) (*PDLwSlackProof, *StatementParams)

NewPDLwSlackProof

func PDLwSlackVerify

func PDLwSlackVerify(pf *PDLwSlackProof, st *PDLwSlackStatement) bool

PDLwSlackVerify

func RangeVerify

func RangeVerify(rp *RangeProof, pk *paillier.PublicKey, NTilde, h1, h2, c *big.Int) bool

RangeVerify

Types

type DlnProof

type DlnProof struct {
	Alpha,
	T [Iterations]*big.Int
}

func NewDlnProve

func NewDlnProve(h1, h2, x, p, q, N *big.Int) *DlnProof

type PDLwSlackProof

type PDLwSlackProof struct {
	Z          *big.Int
	U1         *curves.ECPoint
	U2, U3     *big.Int
	S1, S2, S3 *big.Int
}

type PDLwSlackStatement

type PDLwSlackStatement struct {
	CipherText     *big.Int
	N              *big.Int
	Q, G           *curves.ECPoint
	H1, H2, NTilde *big.Int
}

type PDLwSlackWitness

type PDLwSlackWitness struct {
	X, R *big.Int
}

type RangeProof

type RangeProof struct {
	Z, U, W, S, S1, S2 *big.Int
}

func RangeProve

func RangeProve(pk *paillier.PublicKey, NTilde, h1, h2, c, r, m *big.Int) (*RangeProof, error)

https://eprint.iacr.org/2019/114.pdf A.1 Range Proof RangeProve

type StatementParams

type StatementParams struct {
	H1, H2, NTilde *big.Int
}

Jump to

Keyboard shortcuts

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