I wonder if it’s a good idea to add a function secp256k1_modinv32_modinfo
verify that checks consistency and call it on entry of every function that reads modinfo, similar to how we do this for other data structures. But if yes, that should happen in a separate PR.
Originally posted by @real-or-random in #979 (review)