2021-04-11 11:11:15 +00:00
|
|
|
// +build blst_disabled libfuzzer
|
2020-09-16 13:28:28 +00:00
|
|
|
|
|
|
|
package blst
|
|
|
|
|
2020-10-30 19:06:33 +00:00
|
|
|
import (
|
|
|
|
"github.com/prysmaticlabs/prysm/shared/bls/common"
|
|
|
|
)
|
2020-09-16 13:28:28 +00:00
|
|
|
|
2020-11-13 07:17:39 +00:00
|
|
|
// This stub file exists until build issues can be resolved for libfuzz.
|
2021-04-11 11:11:15 +00:00
|
|
|
const err = "blst is only supported on linux,darwin,windows"
|
2020-10-08 18:37:12 +00:00
|
|
|
|
2020-09-16 13:28:28 +00:00
|
|
|
// SecretKey -- stub
|
|
|
|
type SecretKey struct{}
|
|
|
|
|
|
|
|
// PublicKey -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s SecretKey) PublicKey() common.PublicKey {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Sign -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s SecretKey) Sign(_ []byte) common.Signature {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Marshal -- stub
|
|
|
|
func (s SecretKey) Marshal() []byte {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
2020-10-30 19:06:33 +00:00
|
|
|
// IsZero -- stub
|
|
|
|
func (s SecretKey) IsZero() bool {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2020-09-16 13:28:28 +00:00
|
|
|
// PublicKey -- stub
|
|
|
|
type PublicKey struct{}
|
|
|
|
|
|
|
|
// Marshal -- stub
|
|
|
|
func (p PublicKey) Marshal() []byte {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Copy -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (p PublicKey) Copy() common.PublicKey {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Aggregate -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (p PublicKey) Aggregate(_ common.PublicKey) common.PublicKey {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsInfinite -- stub
|
2021-02-03 16:59:17 +00:00
|
|
|
func (p PublicKey) IsInfinite() bool {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Signature -- stub
|
|
|
|
type Signature struct{}
|
|
|
|
|
|
|
|
// Verify -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s Signature) Verify(_ common.PublicKey, _ []byte) bool {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// AggregateVerify -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s Signature) AggregateVerify(_ []common.PublicKey, _ [][32]byte) bool {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// FastAggregateVerify -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s Signature) FastAggregateVerify(_ []common.PublicKey, _ [32]byte) bool {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
2021-07-02 19:27:08 +00:00
|
|
|
// Eth2FastAggregateVerify -- stub
|
|
|
|
func (s Signature) Eth2FastAggregateVerify(_ []common.PublicKey, _ [32]byte) bool {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
2020-09-16 13:28:28 +00:00
|
|
|
// Marshal -- stub
|
|
|
|
func (s Signature) Marshal() []byte {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Copy -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func (s Signature) Copy() common.Signature {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SecretKeyFromBytes -- stub
|
2020-10-08 18:37:12 +00:00
|
|
|
func SecretKeyFromBytes(_ []byte) (SecretKey, error) {
|
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// PublicKeyFromBytes -- stub
|
2020-10-08 18:37:12 +00:00
|
|
|
func PublicKeyFromBytes(_ []byte) (PublicKey, error) {
|
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// SignatureFromBytes -- stub
|
2020-10-08 18:37:12 +00:00
|
|
|
func SignatureFromBytes(_ []byte) (Signature, error) {
|
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// AggregatePublicKeys -- stub
|
2020-10-08 18:37:12 +00:00
|
|
|
func AggregatePublicKeys(_ [][]byte) (PublicKey, error) {
|
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// AggregateSignatures -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func AggregateSignatures(_ []common.Signature) common.Signature {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// VerifyMultipleSignatures -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func VerifyMultipleSignatures(_ [][]byte, _ [][32]byte, _ []common.PublicKey) (bool, error) {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// NewAggregateSignature -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func NewAggregateSignature() common.Signature {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// RandKey -- stub
|
2020-10-30 19:06:33 +00:00
|
|
|
func RandKey() (common.SecretKey, error) {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// VerifyCompressed -- stub
|
2020-10-12 15:43:19 +00:00
|
|
|
func VerifyCompressed(_, _, _ []byte) bool {
|
2020-10-08 18:37:12 +00:00
|
|
|
panic(err)
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|