schnorr

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: LGPL-2.1 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ADDRESS_MASK = "000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"

Variables

This section is empty.

Functions

func AggregateSignatures

func AggregateSignatures(signatures [][]byte) (aggSig []byte)

func ComputeNonce

func ComputeNonce(privKey *btcec.PrivateKey, message [32]byte) (nonce *big.Int, noncePubKey *btcec.PublicKey)

func ComputeSignature

func ComputeSignature(privKey *btcec.PrivateKey, nonce *big.Int, challenge []byte) []byte

func ComputeSignatureMulti

func ComputeSignatureMulti(privKeys []*btcec.PrivateKey, message [32]byte, challenge []byte) (signatures [][]byte)

func NumberFromByte

func NumberFromByte(buf []byte) uint64

Types

type EthAddress

type EthAddress []byte

func ComputeSigningParams

func ComputeSigningParams(pubKeys []*btcec.PublicKey, noncePubKeys []*btcec.PublicKey, message [32]byte) (aggPubKey *btcec.PublicKey, challenge []byte, commitment EthAddress)

func SignSingle

func SignSingle(privKeyBytes []byte, message [32]byte) (signature []byte, commitment EthAddress, nonce *big.Int, challenge []byte)

type JacobianPoint

type JacobianPoint struct {
	X, Y, Z *btcec.FieldVal
}

func AddAffinePoint

func AddAffinePoint(self *JacobianPoint, p *Point) *JacobianPoint

addAffinePoint performs point addition in Jacobian coordinates on the secp256k1 curve

func (*JacobianPoint) AddAffinePoint

func (jp *JacobianPoint) AddAffinePoint(affinePoint *btcec.PublicKey)

type Point

type Point struct {
	X, Y *big.Int // Coordinates in affine form
}

Point represents a point in affine coordinates on the secp256k1 curve

Jump to

Keyboard shortcuts

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