Bug in sha512 digest with -march=native -mtune=native -m64
Remko van der Vossen
wich at yuugen.jp
Mon Jun 17 23:10:47 CEST 2013
Hello,
It seems that when gnupg is compiled with -march=native -mtune=native
-m64 the message digests calculated by gnupg are incorrect, for
instance:
> echo test | gpg --print-md sha512
88DBFA0D 846B20F0 07F93185 27B7A753
378C4F6D 575E36EE 220ECADE 124157CC
1FAE5F71 C87CEEAB AB71D609 C7E29BDE
7A03A386 6DC6340A F98F0BDD EF24165A
> echo test | sha512sum
0e3e75234abc68f4378a86b3f4b32a19
8ba301845b0cd6e50106e874345700cc
6663a86c1ea125dc5e92be17c98f9a0f
85ca9d5f595db2012f7cc3571945c123 -
When gnupg is compiled with -march=k8 -fPIC -DPIC instead everything is
fine.
Note that I did not test other hashing algorithms than sha512.
The system is based around an AMD FX6300 running a 3.9.6 SMP kernel,
with glibc 2.17.
Kind regards,
Remko van der Vossen
More information about the Gnupg-devel
mailing list