Documentation
¶
Index ¶
- Constants
- Variables
- func EqualityProofFiatShamirChallenges(transcript *merlin.Transcript, ep *EqualityProof) (c Scalar, w Scalar, err error)
- func NewEqualityInstructionTranscript(ctx *CiphertextCommitmentEqualityProofContext) *merlin.Transcript
- func VerifyEqualityProof(pd *CiphertextCommitmentEqualityProofData) error
- func VerifyEqualityProofWithTranscript(pd *CiphertextCommitmentEqualityProofData, t *merlin.Transcript) error
- func VerifyWithdrawEqualityProof(pd *WithdrawCiphertextCommitmentEqualityProofData) error
- func VerifyWithdrawEqualityProofWithTranscript(pd *WithdrawCiphertextCommitmentEqualityProofData, t *merlin.Transcript) error
- type CiphertextCommitmentEqualityProofContext
- type CiphertextCommitmentEqualityProofData
- type CompressedRistretto
- type DecryptHandle
- type ElGamalCiphertext
- type ElGamalPubkey
- type EqualityProof
- type PedersenCommitment
- type PodCiphertextCommitmentEqualityProof
- type PodElGamalCiphertext
- type PodElGamalPubkey
- type PodPedersenCommitment
- type PodU64
- type Point
- type Scalar
- type WithdrawCiphertextCommitmentEqualityProofContext
- type WithdrawCiphertextCommitmentEqualityProofData
Constants ¶
View Source
const U = common.U
Variables ¶
View Source
var ( ErrProofDeserialization = errors.New("deserialization error") ErrProofAlgebraic = errors.New("algebraic relation failed") )
Functions ¶
func EqualityProofFiatShamirChallenges ¶ added in v1.0.0
func EqualityProofFiatShamirChallenges(transcript *merlin.Transcript, ep *EqualityProof) (c Scalar, w Scalar, err error)
EqualityProofFiatShamirChallenges returns Merlin Fiat–Shamir scalars (c, w) after appending the ciphertext-commitment-equality proof domain separator and proof messages to transcript.
func NewEqualityInstructionTranscript ¶ added in v1.0.0
func NewEqualityInstructionTranscript(ctx *CiphertextCommitmentEqualityProofContext) *merlin.Transcript
NewEqualityInstructionTranscript returns the Merlin transcript after the ciphertext-commitment-equality instruction prefix (pubkey, ciphertext, commitment).
func VerifyEqualityProof ¶
func VerifyEqualityProof( pd *CiphertextCommitmentEqualityProofData, ) error
func VerifyEqualityProofWithTranscript ¶ added in v1.0.0
func VerifyEqualityProofWithTranscript( pd *CiphertextCommitmentEqualityProofData, t *merlin.Transcript, ) error
func VerifyWithdrawEqualityProof ¶ added in v1.0.0
func VerifyWithdrawEqualityProof(pd *WithdrawCiphertextCommitmentEqualityProofData) error
func VerifyWithdrawEqualityProofWithTranscript ¶ added in v1.0.0
func VerifyWithdrawEqualityProofWithTranscript( pd *WithdrawCiphertextCommitmentEqualityProofData, t *merlin.Transcript, ) error
Types ¶
type CiphertextCommitmentEqualityProofContext ¶
type CiphertextCommitmentEqualityProofContext struct {
Pubkey PodElGamalPubkey
Ciphertext PodElGamalCiphertext
Commitment PodPedersenCommitment
}
type CiphertextCommitmentEqualityProofData ¶
type CiphertextCommitmentEqualityProofData struct {
Context CiphertextCommitmentEqualityProofContext
Proof PodCiphertextCommitmentEqualityProof
}
type CompressedRistretto ¶
type CompressedRistretto = common.CompressedRistretto
type DecryptHandle ¶
type DecryptHandle struct {
common.DecryptHandle
}
type ElGamalCiphertext ¶
type ElGamalCiphertext struct {
Commitment PedersenCommitment
Handle DecryptHandle
}
func (*ElGamalCiphertext) FromPod ¶
func (ct *ElGamalCiphertext) FromPod(v PodElGamalCiphertext) error
type ElGamalPubkey ¶
type ElGamalPubkey struct {
common.ElGamalPubkey
}
func (*ElGamalPubkey) FromPod ¶
func (pk *ElGamalPubkey) FromPod(v PodElGamalPubkey) error
type EqualityProof ¶
type EqualityProof struct {
Y0 CompressedRistretto
Y1 CompressedRistretto
Y2 CompressedRistretto
Zs Scalar
Zx Scalar
Zr Scalar
}
func EqualityProofFromBytes ¶
func EqualityProofFromBytes(buf *[U * 6]byte) (*EqualityProof, error)
func (EqualityProof) Verify ¶
func (ep EqualityProof) Verify( pubkey *ElGamalPubkey, ciphertext *ElGamalCiphertext, commitment *PedersenCommitment, transcript *merlin.Transcript, ) error
type PedersenCommitment ¶
type PedersenCommitment struct {
common.PedersenCommitment
}
func PedersenCommitmentFromPod ¶
func PedersenCommitmentFromPod(v PodPedersenCommitment) (*PedersenCommitment, error)
type PodCiphertextCommitmentEqualityProof ¶
type PodCiphertextCommitmentEqualityProof struct {
Y0 [U]byte
Y1 [U]byte
Y2 [U]byte
Zs [U]byte
Zx [U]byte
Zr [U]byte
}
func (*PodCiphertextCommitmentEqualityProof) AsBytes ¶
func (p *PodCiphertextCommitmentEqualityProof) AsBytes() [U * 6]byte
type PodElGamalPubkey ¶
type PodPedersenCommitment ¶
type WithdrawCiphertextCommitmentEqualityProofContext ¶ added in v1.0.0
type WithdrawCiphertextCommitmentEqualityProofContext struct {
Pubkey PodElGamalPubkey
Ciphertext PodElGamalCiphertext
Commitment PodPedersenCommitment
Nonce PodU64
}
type WithdrawCiphertextCommitmentEqualityProofData ¶ added in v1.0.0
type WithdrawCiphertextCommitmentEqualityProofData struct {
Context WithdrawCiphertextCommitmentEqualityProofContext
Proof PodCiphertextCommitmentEqualityProof
}
Click to show internal directories.
Click to hide internal directories.