pedersen

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrimeBits = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PedersenParameters

type PedersenParameters struct {
	S, T, Ntilde *big.Int
}

N = p * q, where p and q are safe primes s = rnd1^2 mod N t = rnd2^2 mod N

func NewPedersenParameters

func NewPedersenParameters(concurrency ...int) (*PedersenParameters, error)

func (*PedersenParameters) Commit

func (pedersen *PedersenParameters) Commit(m, r *big.Int) (*big.Int, error)

commit c = s^m * t^r mod N

func (*PedersenParameters) Open

func (pedersen *PedersenParameters) Open(c, m, r *big.Int) (bool, error)

open c = s^m * t^r mod N

Jump to

Keyboard shortcuts

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