sign

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProtocolDefault       = 0
	ProtocolTaproot       = 1
	ProtocolEd25519SHA512 = 2
	ProtocolMixinPublic   = 3
)

Variables

This section is empty.

Functions

func StartSignCommon

func StartSignCommon(result *keygen.Config, signers []party.ID, messageHash []byte, protocol int) protocol.StartFunc

Types

type Signature

type Signature struct {
	// R is the commitment point.
	R curve.Point
	// contains filtered or unexported fields
}

Signature represents the result of a Schnorr signature.

This signature claims to satisfy:

z * G = R + H(R, Y, m) * Y

for a public key Y.

func (*Signature) Serialize

func (sig *Signature) Serialize() []byte

func (*Signature) Verify

func (sig *Signature) Verify(public curve.Point, m []byte) bool

Verify checks if a signature equation actually holds.

Note that m is the hash of a message, and not the message itself.

func (*Signature) VerifyEd25519

func (sig *Signature) VerifyEd25519(public curve.Point, m []byte) bool

Jump to

Keyboard shortcuts

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