Documentation ¶
Overview ¶
Package ed25519hash provides optimized routines for signing and verifying Sia hashes.
Index ¶
- func ExtractPublicKey(priv ed25519.PrivateKey) ed25519.PublicKey
- func Sign(priv ed25519.PrivateKey, hash crypto.Hash) []byte
- func Verify(pub ed25519.PublicKey, hash crypto.Hash, sig []byte) bool
- func VerifyBatch(keys []ed25519.PublicKey, hashes [][32]byte, sigs [][]byte) bool
- func VerifySingleKeyBatch(pub ed25519.PublicKey, hashes [][32]byte, sigs [][]byte) bool
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 VerifyBatch ¶ added in v0.19.1
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
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.