Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No-float policy for secp256k1 #683

Closed
laanwj opened this issue Nov 1, 2019 · 3 comments · Fixed by #684
Closed

No-float policy for secp256k1 #683

laanwj opened this issue Nov 1, 2019 · 3 comments · Fixed by #684

Comments

@laanwj
Copy link
Member

laanwj commented Nov 1, 2019

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

@elichai
Copy link
Contributor

elichai commented Nov 1, 2019

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

@real-or-random
Copy link
Contributor

No worries :)

@laanwj
Copy link
Member Author

laanwj commented Nov 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants