{"record":{"id":"7bbfed3f404ecf44","repo":"canopy-network/canopy","slug":"invalid-bls-public-key-point-at-infinity","errorCode":null,"errorMessage":"invalid bls public key: point at infinity","messagePattern":"invalid bls public key: point at infinity","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/crypto/bls.go","lineNumber":182,"sourceCode":"func BytesToBLS12381Public(bz []byte) (PublicKeyI, error) {\n\tpoint, err := BytesToBLS12381Point(bz)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn &BLS12381PublicKey{\n\t\tPoint:  point,\n\t\tscheme: newBLSScheme(),\n\t}, nil\n}\n\n// BytesToBLS12381Point() creates a new G1 point on BLS12-381 curve which is the public key of the pair\nfunc BytesToBLS12381Point(bz []byte) (kyber.Point, error) {\n\tpoint := newBLSSuite().G1().Point()\n\tif err := point.UnmarshalBinary(bz); err != nil {\n\t\treturn nil, err\n\t}\n\tif point.Equal(newBLSSuite().G1().Point().Null()) {\n\t\treturn nil, errors.New(\"invalid bls public key: point at infinity\")\n\t}\n\treturn point, nil\n}\n\n// Address() returns the short version of the public key\nfunc (b *BLS12381PublicKey) Address() AddressI {\n\t// hash the public key\n\tpubHash := Hash(b.Bytes())\n\t// take the first 20 bytes of the public key\n\taddress := Address(pubHash[:AddressSize])\n\t// return the result\n\treturn &address\n}\n\n// Bytes() returns the protobuf bytes representation of the public key\nfunc (b *BLS12381PublicKey) Bytes() []byte {\n\tbz, _ := b.MarshalBinary()\n\treturn bz","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/canopy-network/canopy/blob/ee8197d91dd410f6592cb650a94c925ee6dc8bad/lib/crypto/bls.go#L164-L200","documentation":"Raised in BytesToBLS12381Point when the deserialized G1 point equals the identity (point at infinity). The identity element is not a usable BLS public key because it makes every aggregate signature verify trivially, so bytes encoding infinity are rejected.","triggerScenarios":"Thrown at lib/crypto/bls.go:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reject the offending key at its source: the validator or signer serialized a degenerate key; regenerate it from a proper private key.","Validate key material before storing it so infinity-encoded keys never reach consensus logic.","If parsing external data (e.g. validator sets), skip or blacklist entries yielding infinity points and log them."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ee8197d91dd410f6592cb650a94c925ee6dc8bad","analyzedAt":"2026-09-06T09:30:15.973Z","contentChangedAt":"2026-09-06T09:30:15.973Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}