sha256 of libgcrypt is 10 times slower then busybox sha25sum util on qualcomm IPQ4018 board

NIIBE Yutaka gniibe at
Wed Jun 9 06:20:56 CEST 2021


袁建鹏 wrote:
> Caculate the sha256 of a 6MB file need 3 secoands:
>  # TIME=%e time ./fwtool check ipq4018.bin
> 3.23
> the libgcrypt build configure in IPQ4018 (ARM cortext A7 soc):
> conf := --disable-doc --enable-neon-support \
>     --with-libgpg-error-prefix=$(APP_BUILD)/libgpg-error/ \
>     --enable-digests="md5 rmd160 sha1 sha256 sha512 blake2" \
>     --enable-ciphers="arcfour des aes cast5 chacha20" \
>     --enable-pubkey-ciphers="rsa dsa ecc" \
>     CFLAGS="-Wno-switch"

What compiler are you using?  If it emits code which uses integer unit
for FPU/vector operations, it's better to use --disable-neon-support
to build libgcrypt, instead.

> Is this a problem ? the busybox code seems no hardware support. why
> libgcrypt is slower so much than busybox.

It looks like busybox code only uses integer operations (no vector
operations) for ARM.

More information about the Gnupg-users mailing list