pedersen

package
v0.0.0-...-8ef2c5f Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCommitment

func GenerateCommitment(params *Params, m *Message) (*Commitment, *Decommitment, error)

GenerateCommitment creates a commitment for some value m

func VerifyCommitment

func VerifyCommitment(params *Params, commitment *Commitment, m *Message, r *Decommitment) (bool, error)

VerifyCommitment checks if a commitment was for some message m under the decommitment r

Types

type Commitment

type Commitment = curve25519.PointXY

Commitment consists of elliptic curve point that serves as a commitment to a message

func GenerateCommitmentFixedR

func GenerateCommitmentFixedR(params *Params, m *Message, r *Decommitment) (*Commitment, error)

GenerateCommitmentFixedR creates a commitment for some value m with a fixed decommitment r

type Decommitment

type Decommitment = curve25519.Scalar

Decommitment is the random value r used in a Pedersen commitment

type Message

type Message = curve25519.Scalar

Message is the value the committer is committing to

type Params

type Params struct {
}

Params consists of two group elements g and h such that the commitment is of the form g^m * h^r

func GenerateParams

func GenerateParams() *Params

GenerateParams now does nothing In the past, it generated the two basis G and H

Jump to

Keyboard shortcuts

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