Closed Nanyan closed 4 years ago
This is because the point is not on the curve (x^3 + b = y^2
). It would still be good to handle that error properly.
Stumbled on the same panic by accident, here's another test case: https://github.com/protolambda/bls/commit/c0bdc9baa52fc56a10ef258fe6e17cf0bfc035c1
Hi there. It's a great job to implementing BLS in pure go. I've made some test on it, and encountered a panic when calling
DecompressG1
with an invalid data, which is83051c87397e54313c98ad614e3f2085e43cd2c8cb5262c8d6cc27c871b91efabbbfd13033938e8bb95fdb3da5973dfd
in the form of hex string.I debug into it, and found the cause(corresponding to commit fb0e03c):