Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base in Modexp is incorrectly set #1298

Closed
AlexandreBelling opened this issue Sep 24, 2024 · 0 comments · Fixed by #1299
Closed

Base in Modexp is incorrectly set #1298

AlexandreBelling opened this issue Sep 24, 2024 · 0 comments · Fixed by #1299
Assignees
Labels
bug Something isn't working P1 Very High (ex: Security issues, unplanned backward incompatibility preventing network participation)

Comments

@AlexandreBelling
Copy link

AlexandreBelling commented Sep 24, 2024

While testing the integration with the prover I came upon the following inconsistencies regarding modexp:

block range 9529337-9529344

modexp operation, base=0x20 exp=0x1000000                                                          mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x1b0fc0964aebcfca92a80380c8bb0846a903a57bce28c1434e74d359611647b7 cpt=0x37fd2a79d4dfbb38a3bc91754fde9bea27048c0130ddc117b81d62dbbd03aa5
modexp operation, base=0x20 exp=0x1000000                                                          mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x1b0fc0964aebcfca92a80380c8bb0846a903a57bce28c1434e74d359611647b7 cpt=0x37fd2a79d4dfbb38a3bc91754fde9bea27048c0130ddc117b81d62dbbd03aa5
modexp operation, base=0x20 exp=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x1e876427f261ee21bfd5eeec260c1b9250cdf5955d9d765b61e304b0e1b5df86 cpt=0x2ee12bff4a2813286a8dc388cd754d9a3ef2490635eba50cb9c2e5e750800001
modexp operation, base=0x20 exp=0xffffff                                                           mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x26501ebfe559ea5826f023d3e76e4b66f170cd940408eb5590a4075c80b498d6 cpt=0x28f0a0c62aec4f00cfd5991ab7ed11dc8eff4e43274ce5db1d22b5e6405e81d6
modexp operation, base=0x20 exp=0x1000000                                                          mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x1b0fc0964aebcfca92a80380c8bb0846a903a57bce28c1434e74d359611647b7 cpt=0x37fd2a79d4dfbb38a3bc91754fde9bea27048c0130ddc117b81d62dbbd03aa5
modexp operation, base=0x20 exp=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593efffffff mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x1c8493792eb0ac6348fed793d162c4e89ac9da03eb09774c2433e5b950707c38 cpt=0x2ee12bff4a2813286a8dc388cd754d9a3ef2490635eba50cb9c2e5e750800001
modexp operation, base=0x20 exp=0xffffff                                                           mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x26501ebfe559ea5826f023d3e76e4b66f170cd940408eb5590a4075c80b498d6 cpt=0x28f0a0c62aec4f00cfd5991ab7ed11dc8eff4e43274ce5db1d22b5e6405e81d6
modexp operation, base=0x20 exp=0xffffff                                                           mod=0x30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001 res=0x218d2bc8161ed2ff496409561f9de610e74f13d2ceb611db5ecbbfdde2fbb369 cpt=0x28f0a0c62aec4f00cfd5991ab7ed11dc8eff4e43274ce5db1d22b5e6405e81d6

What lead me to think that the base is the issue is because 0x20 = 32 is likely to be the byte-length of the base and not the base itself and all the other fields seem completely legit and also because this is the only field that is always the same.

@AlexandreBelling AlexandreBelling added bug Something isn't working P1 Very High (ex: Security issues, unplanned backward incompatibility preventing network participation) labels Sep 24, 2024
@OlivierBBB OlivierBBB linked a pull request Sep 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Very High (ex: Security issues, unplanned backward incompatibility preventing network participation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants