commitment

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const U = common.U

Variables

View Source
var (
	ErrProofDeserialization = errors.New("deserialization error")
	ErrProofAlgebraic       = errors.New("algebraic relation failed")
)

Functions

func VerifyEqualityProof

func VerifyEqualityProof(
	pd *CiphertextCommitmentEqualityProofData,
) 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

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 PodElGamalCiphertext

type PodElGamalCiphertext struct {
	Commitment [U]byte
	Handle     [U]byte
}

type PodElGamalPubkey

type PodElGamalPubkey struct {
	Bytes [U]byte
}

type PodPedersenCommitment

type PodPedersenCommitment struct {
	Bytes [U]byte
}

type Point

type Point = common.Point

type Scalar

type Scalar = common.Scalar

Jump to

Keyboard shortcuts

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