Native num implementation. #30

issue sipa opened this issue on June 15, 2014
  1. sipa commented at 11:10 PM on June 15, 2014: contributor

    A native (and perhaps naive) num implementation would be nice, so libsecp256k1 can be built entirely dependencyless.

    The largest challenge is probably a fast modular inverse.

  2. sipa added the label enhancement on Jun 15, 2014
  3. peterdettman commented at 2:39 AM on June 25, 2014: contributor

    Somewhat related - is the GMP field considered a permanent fixture? I ask because in trying to optimize the point formulas I note that the effects on the GMP field are often opposite to the others. Generally the 32bit and 64bit fields reward reducing the amount of normalization, but GMP tends to reward normalising anything that will be input to more than one mul/sqr (maybe negate too).

    There are conceivable, but sometimes fiddly, workarounds, so I'm just wondering if it's important to worry about GMP performance, or perhaps it's value is mainly as a sanity check?

  4. sipa commented at 10:13 PM on June 25, 2014: contributor

    I'd like to keep the GMP field implementation for now, as on 32-bit it significantly outperforms 10x26 (tested on a 64-bit machine, but with a 32-bit binary), and we need GMP anyway for a fast bignum implementation.

    However, in terms of priority I think 64-bit performance is more important.

  5. da2ce7 commented at 10:16 AM on August 19, 2014: none

    GMP isn't licensed under the MIT/X11 software license. For security it is important to statically link, thus forcing the code under LGPL.

  6. gmaxwell commented at 2:40 PM on August 19, 2014: contributor

    @da2ce7 You're adopting a weird security model where you think static linking improves your security, but I don't care to argue it.

    LGPL permits static linking, even with completely proprietary software— you must just provide the objects so that the LGPLed portions can be replaced.

  7. sipa commented at 1:45 AM on December 9, 2014: contributor

    Closing this, as num is fully optional now.

  8. sipa closed this on Dec 9, 2014

  9. tecnovert referenced this in commit b2dca3ae19 on Apr 18, 2022
  10. tecnovert referenced this in commit 2318f18a90 on Apr 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me