mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 13:28:01 -05:00
BLS: Deprecate usage of AggregateVerify (#8699)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -61,9 +61,11 @@ func (s *Signature) Verify(pubKey common.PublicKey, msg []byte) bool {
|
||||
return s.s.Verify(false, pubKey.(*PublicKey).p, false, msg, dst)
|
||||
}
|
||||
|
||||
// AggregateVerify verifies each public key against its respective message.
|
||||
// This is vulnerable to rogue public-key attack. Each user must
|
||||
// provide a proof-of-knowledge of the public key.
|
||||
// AggregateVerify verifies each public key against its respective message. This is vulnerable to
|
||||
// rogue public-key attack. Each user must provide a proof-of-knowledge of the public key.
|
||||
//
|
||||
// Note: The msgs must be distinct. For maximum performance, this method does not ensure distinct
|
||||
// messages.
|
||||
//
|
||||
// In IETF draft BLS specification:
|
||||
// AggregateVerify((PK_1, message_1), ..., (PK_n, message_n),
|
||||
@@ -73,7 +75,9 @@ func (s *Signature) Verify(pubKey common.PublicKey, msg []byte) bool {
|
||||
// outputs INVALID otherwise.
|
||||
//
|
||||
// In ETH2.0 specification:
|
||||
// def AggregateVerify(pairs: Sequence[PK: BLSPubkey, message: Bytes], signature: BLSSignature) -> boo
|
||||
// def AggregateVerify(pairs: Sequence[PK: BLSPubkey, message: Bytes], signature: BLSSignature) -> bool
|
||||
//
|
||||
// Deprecated: Use FastAggregateVerify or use this method in spectests only.
|
||||
func (s *Signature) AggregateVerify(pubKeys []common.PublicKey, msgs [][32]byte) bool {
|
||||
if featureconfig.Get().SkipBLSVerify {
|
||||
return true
|
||||
|
||||
@@ -24,6 +24,7 @@ type PublicKey interface {
|
||||
// Signature represents a BLS signature.
|
||||
type Signature interface {
|
||||
Verify(pubKey PublicKey, msg []byte) bool
|
||||
// Deprecated: Use FastAggregateVerify or use this method in spectests only.
|
||||
AggregateVerify(pubKeys []PublicKey, msgs [][32]byte) bool
|
||||
FastAggregateVerify(pubKeys []PublicKey, msg [32]byte) bool
|
||||
Marshal() []byte
|
||||
|
||||
@@ -53,9 +53,11 @@ func (s *Signature) Verify(pubKey common.PublicKey, msg []byte) bool {
|
||||
return s.s.VerifyByte(pubKey.(*PublicKey).p, msg)
|
||||
}
|
||||
|
||||
// AggregateVerify verifies each public key against its respective message.
|
||||
// This is vulnerable to rogue public-key attack. Each user must
|
||||
// provide a proof-of-knowledge of the public key.
|
||||
// AggregateVerify verifies each public key against its respective message. This is vulnerable to
|
||||
// rogue public-key attack. Each user must provide a proof-of-knowledge of the public key.
|
||||
//
|
||||
// Note: The msgs must be distinct. For maximum performance, this method does not ensure distinct
|
||||
// messages.
|
||||
//
|
||||
// In IETF draft BLS specification:
|
||||
// AggregateVerify((PK_1, message_1), ..., (PK_n, message_n),
|
||||
@@ -65,7 +67,8 @@ func (s *Signature) Verify(pubKey common.PublicKey, msg []byte) bool {
|
||||
// outputs INVALID otherwise.
|
||||
//
|
||||
// In ETH2.0 specification:
|
||||
// def AggregateVerify(pairs: Sequence[PK: BLSPubkey, message: Bytes], signature: BLSSignature) -> boo
|
||||
// def AggregateVerify(pairs: Sequence[PK: BLSPubkey, message: Bytes], signature: BLSSignature) -> bool
|
||||
// Deprecated: Use FastAggregateVerify or use this method in spectests only.
|
||||
func (s *Signature) AggregateVerify(pubKeys []common.PublicKey, msgs [][32]byte) bool {
|
||||
if featureconfig.Get().SkipBLSVerify {
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user