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. jonasnick closed this on Nov 1, 2019

  3. jonasnick closed this on Nov 1, 2019

  4. 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)

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

    No worries :)

  6. 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.

  7. achow101 referenced this in commit e2625f8a98 on Oct 31, 2024

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-05-19 06:52 UTC