github.com/prysmaticlabs/prysm@v1.4.4/shared/bls/blst/stub.go (about) 1 // +build blst_disabled libfuzzer 2 3 package blst 4 5 import ( 6 "github.com/prysmaticlabs/prysm/shared/bls/common" 7 ) 8 9 // This stub file exists until build issues can be resolved for libfuzz. 10 const err = "blst is only supported on linux,darwin,windows" 11 12 // SecretKey -- stub 13 type SecretKey struct{} 14 15 // PublicKey -- stub 16 func (s SecretKey) PublicKey() common.PublicKey { 17 panic(err) 18 } 19 20 // Sign -- stub 21 func (s SecretKey) Sign(_ []byte) common.Signature { 22 panic(err) 23 } 24 25 // Marshal -- stub 26 func (s SecretKey) Marshal() []byte { 27 panic(err) 28 } 29 30 // IsZero -- stub 31 func (s SecretKey) IsZero() bool { 32 panic(err) 33 } 34 35 // PublicKey -- stub 36 type PublicKey struct{} 37 38 // Marshal -- stub 39 func (p PublicKey) Marshal() []byte { 40 panic(err) 41 } 42 43 // Copy -- stub 44 func (p PublicKey) Copy() common.PublicKey { 45 panic(err) 46 } 47 48 // Aggregate -- stub 49 func (p PublicKey) Aggregate(_ common.PublicKey) common.PublicKey { 50 panic(err) 51 } 52 53 // IsInfinite -- stub 54 func (p PublicKey) IsInfinite() bool { 55 panic(err) 56 } 57 58 // Signature -- stub 59 type Signature struct{} 60 61 // Verify -- stub 62 func (s Signature) Verify(_ common.PublicKey, _ []byte) bool { 63 panic(err) 64 } 65 66 // AggregateVerify -- stub 67 func (s Signature) AggregateVerify(_ []common.PublicKey, _ [][32]byte) bool { 68 panic(err) 69 } 70 71 // FastAggregateVerify -- stub 72 func (s Signature) FastAggregateVerify(_ []common.PublicKey, _ [32]byte) bool { 73 panic(err) 74 } 75 76 // Eth2FastAggregateVerify -- stub 77 func (s Signature) Eth2FastAggregateVerify(_ []common.PublicKey, _ [32]byte) bool { 78 panic(err) 79 } 80 81 // Marshal -- stub 82 func (s Signature) Marshal() []byte { 83 panic(err) 84 } 85 86 // Copy -- stub 87 func (s Signature) Copy() common.Signature { 88 panic(err) 89 } 90 91 // SecretKeyFromBytes -- stub 92 func SecretKeyFromBytes(_ []byte) (SecretKey, error) { 93 panic(err) 94 } 95 96 // PublicKeyFromBytes -- stub 97 func PublicKeyFromBytes(_ []byte) (PublicKey, error) { 98 panic(err) 99 } 100 101 // SignatureFromBytes -- stub 102 func SignatureFromBytes(_ []byte) (Signature, error) { 103 panic(err) 104 } 105 106 // AggregatePublicKeys -- stub 107 func AggregatePublicKeys(_ [][]byte) (PublicKey, error) { 108 panic(err) 109 } 110 111 // AggregateSignatures -- stub 112 func AggregateSignatures(_ []common.Signature) common.Signature { 113 panic(err) 114 } 115 116 // VerifyMultipleSignatures -- stub 117 func VerifyMultipleSignatures(_ [][]byte, _ [][32]byte, _ []common.PublicKey) (bool, error) { 118 panic(err) 119 } 120 121 // NewAggregateSignature -- stub 122 func NewAggregateSignature() common.Signature { 123 panic(err) 124 } 125 126 // RandKey -- stub 127 func RandKey() (common.SecretKey, error) { 128 panic(err) 129 } 130 131 // VerifyCompressed -- stub 132 func VerifyCompressed(_, _, _ []byte) bool { 133 panic(err) 134 }