ed25519hash

package
v0.19.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 7 Imported by: 2

Documentation

Overview

Package ed25519hash provides optimized routines for signing and verifying Sia hashes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPublicKey

func ExtractPublicKey(priv ed25519.PrivateKey) ed25519.PublicKey

ExtractPublicKey extracts the PublicKey portion of priv.

func Sign

func Sign(priv ed25519.PrivateKey, hash crypto.Hash) []byte

Sign signs a hash with priv.

func Verify

func Verify(pub ed25519.PublicKey, hash crypto.Hash, sig []byte) bool

Verify reports whether sig is a valid signature of hash by pub.

func VerifyBatch added in v0.19.1

func VerifyBatch(keys []ed25519.PublicKey, hashes [][32]byte, sigs [][]byte) bool

VerifyBatch verifies a set of signatures. This provides a speedup of roughly 2x compared to verifying the signatures individually. However, if verification fails, the caller cannot determine which signatures were invalid without resorting to individual verification.

func VerifySingleKeyBatch added in v0.19.1

func VerifySingleKeyBatch(pub ed25519.PublicKey, hashes [][32]byte, sigs [][]byte) bool

VerifySingleKeyBatch verifies a set of signatures that were all produced by the same key. This provides a speedup of roughly 4x compared to verifying the signatures individually. However, if verification fails, the caller cannot determine which signatures were invalid without resorting to individual verification.

Types

This section is empty.

Jump to

Keyboard shortcuts

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