package schnorr
import "go.dedis.ch/kyber/v3/sign/schnorr"
Package schnorr implements the vanilla Schnorr signature scheme. See https://en.wikipedia.org/wiki/Schnorr_signature.
The only difference regarding the vanilla reference is the computation of the response. This implementation adds the random component with the challenge times private key while the Wikipedia article substracts them.
The resulting signature is compatible with EdDSA verification algorithm when using the edwards25519 group, and by extension the CoSi verification algorithm.
Index ¶
- func Sign(s Suite, private kyber.Scalar, msg []byte) ([]byte, error)
- func Verify(g kyber.Group, public kyber.Point, msg, sig []byte) error
- func VerifyWithChecks(g kyber.Group, pub, msg, sig []byte) error
- type Suite
Functions ¶
func Sign ¶
Sign creates a Sign signature from a msg and a private key. This signature can be verified with VerifySchnorr. It's also a valid EdDSA signature when using the edwards25519 Group.
func Verify ¶
Verify verifies a given Schnorr signature. It returns nil iff the given signature is valid.
func VerifyWithChecks ¶
VerifyWithChecks uses a public key buffer, a message and a signature. It will return nil if sig is a valid signature for msg created by key public, or an error otherwise. Compared to `Verify`, it performs additional checks around the canonicality and ensures the public key does not have a small order when using `edwards25519` group.
Types ¶
type Suite ¶
type Suite interface { kyber.Group kyber.Random }
Suite represents the set of functionalities needed by the package schnorr.
Source Files ¶
schnorr.go
- Version
- v3.1.0 (latest)
- Published
- Nov 30, 2022
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 1 month ago –
Tools for package owners.