Skip to content

Conversation

@asn-d6
Copy link
Contributor

@asn-d6 asn-d6 commented Mar 16, 2023

Zero doesn't have a multiplicative inverse and having bls_modular_inverse() return zero upon receiving zero was a convention.

We then noticed that implementing that convention in blst was not straightforward, so we decided to revisit it.

Given that there is no point in the spec where bls_modular_inverse() is called with zero as its input, and given that from a protocol point of view that convention doesn't make much sense, we decided to instead reject zero as inputs to bls_modular_inverse(). This PR makes it so.

@asn-d6
Copy link
Contributor Author

asn-d6 commented Mar 16, 2023

I will add a unittest for this tomorrow as well.

@asn-d6 asn-d6 force-pushed the inv_no_inputs branch 3 times, most recently from 77443a2 to f8bd0cf Compare March 17, 2023 10:16
@haxxpop
Copy link
Member

haxxpop commented Mar 17, 2023

LGTM!

@asn-d6 asn-d6 requested review from dankrad and hwwhww March 17, 2023 12:54
Copy link
Contributor

@hwwhww hwwhww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hwwhww hwwhww merged commit 334601c into ethereum:dev Mar 20, 2023
@hwwhww hwwhww added the deneb label Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants