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

2021-06-08 Thread NIIBE Yutaka
Hello, 袁建鹏 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-err

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

2021-06-05 Thread 袁建鹏 via Gnupg-users
Hi, I link libgcrypt to calculate the sha256 checksum of router firmware. the code snippets of calcuate sha256 checksum looks like this: uint8_t digest[32]; void *handle; char buf[40960]; sha256_init(&handle) do { ret = read(fd, buf, sizeof(buf)); if (ret < 0)