nistp224 80-bit accuracy hack

Felix von Leitner <[email protected]> Wed, 17 Aug 2005 16:28:47 +0200
Newsgroups gmane.org.djb.miscellaneous
Message-ID <[email protected]>
I was just playing with nistp224.  nistp224 relies on the fact that
floating point numbers have 80-bit accuracy on x87 math hardware as long
as they stay in registers.

I wonder: if the operating system makes a context switch, the CPU state
is saved.  Aren't at that point the floating point registers saved to
memory as part of the context, losing the extra accuracy in the process?

Besides, has anyone spent time converting nistp224 to assembly code that
will also work with current gcc versions?

I am in need of a elliptic curve public key crypto code, and chose
nistp224 because the interface is simple and well-documented.
Unfortunately, it does not work with gcc 3 and does not even compile
with gcc 4, so clearly some work is needed here.

Felix