No-float policy for secp256k1 #683

issue laanwj opened this issue on November 1, 2019
  1. laanwj commented at 9:20 AM on November 1, 2019: member

    I think secp256k1 needs an explicit no-floating point policy, like the Linux kernel. This means no use of float, and no double (and no half, no long double either).

    • It has to be able to run in kernel context
    • Boot and security processors tend to have no FP support (e.g. core 0 on the Sifive U54)
    • FP hardware implementation is possibly inconsistent between platforms which is useless for cryptography

    I mean for the main code; in the bench framework is fine, though with the assumption that it might be emulated and very slow.

    (inspired by #658 (comment))

  2. real-or-random cross-referenced this on Nov 1, 2019 from issue Make no-float policy explicit by real-or-random
  3. jonasnick closed this on Nov 1, 2019

  4. jonasnick closed this on Nov 1, 2019

  5. elichai commented at 10:21 AM on November 1, 2019: contributor

    For the record it was a hypothetical. I wasn't serious in using floats... (which we obviously should almost never use ever)

  6. real-or-random commented at 10:24 AM on November 1, 2019: contributor

    No worries :)

  7. laanwj commented at 10:30 AM on November 1, 2019: member

    For the record it was a hypothetical. I wasn't serious in using floats... (which we obviously should almost never use ever)

    I know it was more or less a joke in your case!

    But it's just good to have these things explicit, so developers as well as users of the library have some certainly.


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 18:15 UTC

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