Documentation ¶
Index ¶
- Constants
- func AliceEnd(ec elliptic.Curve, pkA *paillier.PublicKey, pf *ProofBob, ...) (*big.Int, error)
- func AliceEndWC(ec elliptic.Curve, pkA *paillier.PublicKey, pf *ProofBobWC, B *crypto.ECPoint, ...) (*big.Int, error)
- type ProofBob
- type ProofBobWC
- func BobMidWC(ec elliptic.Curve, pkA *paillier.PublicKey, pf *RangeProofAlice, ...) (beta, cB, betaPrm *big.Int, piB *ProofBobWC, err error)
- func ProofBobWCFromBytes(ec elliptic.Curve, bzs [][]byte) (*ProofBobWC, error)
- func ProveBobWC(ec elliptic.Curve, pk *paillier.PublicKey, ...) (*ProofBobWC, error)
- type RangeProofAlice
- func AliceInit(ec elliptic.Curve, pkA *paillier.PublicKey, a, NTildeB, h1B, h2B *big.Int) (cA *big.Int, pf *RangeProofAlice, err error)
- func ProveRangeAlice(ec elliptic.Curve, pk *paillier.PublicKey, c, NTilde, h1, h2, m, r *big.Int) (*RangeProofAlice, error)
- func RangeProofAliceFromBytes(bzs [][]byte) (*RangeProofAlice, error)
Constants ¶
View Source
const ( ProofBobBytesParts = 10 ProofBobWCBytesParts = 12 )
View Source
const (
RangeProofAliceBytesParts = 6
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ProofBob ¶
func ProofBobFromBytes ¶
func ProveBob ¶
func ProveBob(ec elliptic.Curve, pk *paillier.PublicKey, NTilde, h1, h2, c1, c2, x, y, r *big.Int) (*ProofBob, error)
ProveBob implements Bob's proof "ProveMta_Bob" used in the MtA protocol from GG18Spec (9) Fig. 11.
func (*ProofBob) Bytes ¶
func (pf *ProofBob) Bytes() [ProofBobBytesParts][]byte
func (*ProofBob) ValidateBasic ¶
type ProofBobWC ¶
func ProofBobWCFromBytes ¶
func ProofBobWCFromBytes(ec elliptic.Curve, bzs [][]byte) (*ProofBobWC, error)
func ProveBobWC ¶
func ProveBobWC(ec elliptic.Curve, pk *paillier.PublicKey, NTilde, h1, h2, c1, c2, x, y, r *big.Int, X *crypto.ECPoint) (*ProofBobWC, error)
ProveBobWC implements Bob's proof both with or without check "ProveMtawc_Bob" and "ProveMta_Bob" used in the MtA protocol from GG18Spec (9) Figs. 10 & 11. an absent `X` generates the proof without the X consistency check X = g^x
func (*ProofBobWC) Bytes ¶
func (pf *ProofBobWC) Bytes() [ProofBobWCBytesParts][]byte
func (*ProofBobWC) ValidateBasic ¶
func (pf *ProofBobWC) ValidateBasic() bool
func (*ProofBobWC) Verify ¶
func (pf *ProofBobWC) Verify(ec elliptic.Curve, pk *paillier.PublicKey, NTilde, h1, h2, c1, c2 *big.Int, X *crypto.ECPoint) bool
ProveBobWC.Verify implements verification of Bob's proof with check "VerifyMtawc_Bob" used in the MtA protocol from GG18Spec (9) Fig. 10. an absent `X` verifies a proof generated without the X consistency check X = g^x
type RangeProofAlice ¶
func ProveRangeAlice ¶
func ProveRangeAlice(ec elliptic.Curve, pk *paillier.PublicKey, c, NTilde, h1, h2, m, r *big.Int) (*RangeProofAlice, error)
ProveRangeAlice implements Alice's range proof used in the MtA and MtAwc protocols from GG18Spec (9) Fig. 9.
func RangeProofAliceFromBytes ¶
func RangeProofAliceFromBytes(bzs [][]byte) (*RangeProofAlice, error)
func (*RangeProofAlice) Bytes ¶
func (pf *RangeProofAlice) Bytes() [RangeProofAliceBytesParts][]byte
func (*RangeProofAlice) ValidateBasic ¶
func (pf *RangeProofAlice) ValidateBasic() bool
Click to show internal directories.
Click to hide internal directories.