schnorr

package
v0.0.0-...-7ece11e Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SchnSignature

type SchnSignature struct {
	// contains filtered or unexported fields
}

SchnSignature represents Schnorr Signature

func (SchnSignature) Bytes

func (sig SchnSignature) Bytes() []byte

func (*SchnSignature) SetBytes

func (sig *SchnSignature) SetBytes(bytes []byte) error

type SchnorrPrivateKey

type SchnorrPrivateKey struct {
	// contains filtered or unexported fields
}

SchnorrPrivateKey represents Schnorr Privatekey

func (SchnorrPrivateKey) GetPublicKey

func (schnPrivKey SchnorrPrivateKey) GetPublicKey() *SchnorrPublicKey

func (*SchnorrPrivateKey) Set

func (privateKey *SchnorrPrivateKey) Set(sk *operation.Scalar, r *operation.Scalar)

Set sets Schnorr private key

func (SchnorrPrivateKey) Sign

func (privateKey SchnorrPrivateKey) Sign(data []byte) (*SchnSignature, error)

Sign is function which using for signing on hash array by private key

type SchnorrPublicKey

type SchnorrPublicKey struct {
	// contains filtered or unexported fields
}

SchnorrPublicKey represents Schnorr Publickey PK = G^SK + H^R

func (SchnorrPublicKey) GetPublicKey

func (schnorrPubKey SchnorrPublicKey) GetPublicKey() *operation.Point

func (*SchnorrPublicKey) Set

func (publicKey *SchnorrPublicKey) Set(pk *operation.Point)

Set sets Schnorr public key

func (SchnorrPublicKey) Verify

func (publicKey SchnorrPublicKey) Verify(signature *SchnSignature, data []byte) bool

Verify is function which using for verify that the given signature was signed by by privatekey of the public key

Jump to

Keyboard shortcuts

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