Problems building nistp224

Bruce Guenter <[email protected]> Wed, 24 Mar 2004 13:46:52 -0600
Newsgroups gmane.org.djb.miscellaneous
Message-ID <[email protected]>
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Greetings.

I am having problems building the nistp224 library, out of the box.  I
ran:

> tar -xzf nistp224-0.75.tar.gz
> cd math/nistp224-0.75
> package/compile

There was a warning when compiling the nistp224.c source (copied from
opt-ppro.c):

> ./compile nistp224.c
> nistp224.c: In function `nistp224_valid':
> nistp224.c:123: warning: use of memory input without lvalue in asm operan=
d 0 is deprecated
> nistp224.c: In function `nistp224_56':
> nistp224.c:123: warning: use of memory input without lvalue in asm operan=
d 0 is deprecated

I don't believe this is related, as it still allows the usage.

The compilation fails at:

> cmp rts rts.exp >> sysdeps
> make: *** [sysdeps] Error 1

The resulting src/rts file shows obvious problems.  It appears that the
nistp224 operation is simply not working:

> --- nistp224 generates public keys correctly
> cmp: EOF on -
> cmp: EOF on -
> cmp: EOF on -
> cmp: EOF on -
> --- nistp224 generates shared secrets correctly
> cmp: EOF on -
> [...snip...]
> -c[1]+littleendian(0,0,0,0,0,0,0,0,0,0,0,0,0,0)+2^112*littleendian(0,0,0,=
0,0,0,0,0,0,0,0,0,0,0)
> -c[2]+littleendian(0,0,0,0,0,0,0,0,0,0,0,0,0,0)+2^112*littleendian(0,0,0,=
0,0,0,0,0,0,0,0,0,0,0)
> 0
> 0
> 0
> 0

I have tried using "pentium", "ppro", and "idea64" in src/conf-opt, but
only "idea64" works (and it's several times slower than the timings
listed on the web pages).

I am using Gentoo Linux, gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5,
propolice-3.3-7), on an AMD Athlon.  It works when using the latest GCC
=66rom RedHat Linux 7.3, gcc version 2.96 20000731 (Red Hat Linux 7.3
2.96-113), as well as with RedHat Linux 6.2, gcc version egcs-2.91.66
19990314/Linux (egcs-1.1.2 release).  I had previously tried it with a
gcc 3.2.* compiler (from Gentoo, not sure which version) and it also
only worked with idea64.

What is going wrong here?  Is this a problem with recent GCCs?

Thanks.
--=20
Bruce Guenter <[email protected]> http://em.ca/~bruceg/ http://untroubled.org/
OpenPGP key: 699980E8 / D0B7 C8DD 365D A395 29DA  2E2A E96F B2DC 6999 80E8

--WIyZ46R2i8wDzkSu
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAYeWs6W+y3GmZgOgRAhCUAKCOeZQ8HC5feSYlAaouN25vgUh9IgCeNty1
ourwM4VLQfo/XVSb7wQa03c=
=lJVR
-----END PGP SIGNATURE-----

--WIyZ46R2i8wDzkSu--