Documentation ¶
Overview ¶
Package schnorr_bn256 Copyright 2023 Oleg Fomenko. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
File `schnorr.go` implements Schnorr signature generation on the bn256 elliptic curve that compatible with alt_bn128 (https://eips.ethereum.org/EIPS/eip-1108)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifySchnorr ¶
VerifySchnorr verifies Schnorr signature validity. Can be used both for mono- and multi- signing. For multi-signature `PublicKey` should be an aggregated public key. For mono-signature `PublicKey` should be an elliptic point `prv*G`.
Types ¶
type SchnorrSignature ¶
func MultiSigSchnorr ¶
func MultiSigSchnorr(prv *big.Int, r *big.Int, PubKeyCommon *bn256.G1, RCommon *bn256.G1, m *big.Int) (*SchnorrSignature, error)
MultiSigSchnorr creates the Schnorr signature for the given public key and message. For multi-signature `PubKeyCommon` should be an aggregated public key and `RCommon` should be aggregated R.