qnr

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProveQNR

func ProveQNR(y *big.Int, qr *qr.RSA) (bool, error)

ProveQNR demonstrates how the prover can prove that y is not quadratic residue (there does not exist element y1 such that y1^2 = y in group RSA.

Types

type Prover

type Prover struct {
	QR *qr.RSA
	Y  *big.Int
	// contains filtered or unexported fields
}

func NewProver

func NewProver(qr *qr.RSA, y *big.Int) *Prover

func (*Prover) GetChallenge

func (p *Prover) GetChallenge() []int

func (*Prover) GetProofData

func (p *Prover) GetProofData(challenge *big.Int) (int, error)

func (*Prover) SetProofRandomData

func (p *Prover) SetProofRandomData(w *big.Int)

func (*Prover) Verify

func (p *Prover) Verify(pairs, verProof []*common.Pair) bool

type Verifier

type Verifier struct {
	QR *qr.RSA
	// contains filtered or unexported fields
}

func NewQNRVerifier

func NewQNRVerifier(qr *qr.RSA, y *big.Int) *Verifier

func (*Verifier) GetChallenge

func (v *Verifier) GetChallenge() (*big.Int, []*common.Pair)

func (*Verifier) GetProofData

func (v *Verifier) GetProofData(randVector []int) []*common.Pair

func (*Verifier) Verify

func (v *Verifier) Verify(typ int) bool

Jump to

Keyboard shortcuts

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