bls icon indicating copy to clipboard operation
bls copied to clipboard

Support Signature.isInfinity method

Open mpetrunic opened this issue 4 years ago • 2 comments
trafficstars

I vaguely remember we had that. It's somewhat easy to implement by checking serialized bytes. But it's more user friendly if it's in bls.

mpetrunic avatar Dec 10 '20 10:12 mpetrunic

I've had some confusion with that, in herumi's implementation it's called .isZero() while in BLST is_inf(). Would you want to use the name infinity?

dapplion avatar Dec 10 '20 15:12 dapplion

Yeah, I think Infinity is suitable. I wonder if it's the same thing. I also think we shouldn't deserialize signature to check that. We could just have static method to check if signature bytes matches: https://github.com/ethereum/eth2.0-specs/pull/2141/files#diff-0e2661bd146a3f91f47225e75d80a3234e5ef4a0b451c57d6c34a822b2ee2f86R55

mpetrunic avatar Dec 11 '20 08:12 mpetrunic