This resolves #893, resolves #692 (and also resolves bitcoin/bitcoin#22854).
- Extract table generation to separate function in separate file (to be used by generation script and exhaustive tests)
- Tidy up
- Remove code that deals with non-static tables
- Make functions that need ecmult_gen not depend on signing context
- Rename stuff to make it fit the new structure and consistent with how we hande verification tables (#956)
- Fix exhaustive tests
- Make table generation function take generator as input
- Overwrite the static tables with a table with custom generator in exhaustive tests
- Overhaul script that generates table files
- Make table generation function take PREC_BITS as input (I have some code already, just not yet in this branch)
- Change generation script to generate three tables (for all three values of ECMULT_GEN_PREC_BITS)
- Ship pre-built tables
- Add pregenerated table file to repo
- Remove generation of table file from build process (like in #956)
- Remove left-over stuff (e.g., detecting a compiler running on the build machine) from build system
- Final cleanups (copyright headers, commit, messages, etc.)
- (separate PR:) Make sure link-time optimization remove corresponding static tables (and code) when no signing/verifcation function is called
- (separate PR:) Compile precomputation as a separate object file and link it (https://github.com/bitcoin-core/secp256k1/pull/988#issuecomment-977813538)
- (separate PR:) Document the backwards-compatible API changes made in this PR and in #956.
- Maybe deprecate the static context