nuttx-apps/testing/drivers/crypto
Peter Barada 27c466a429 crypto: Fix CRC-32 test case 8
Normal Crypto API usage is to call ioctl(CGCGSESSION) to initialize
the session, then one (or more) calls to ioctl(CIOCCRYPT) with flag
bit COP_FLAG_UPDATE set to append to the hash/xform calculation, then
a call to ioctl(CIOCCRYPT) with flag bit COP_FLAG_UPDATE cleared to
extract the result, and finally ioctl(CIOCFSESSION) to finish the
session. This follows the classic init / update* / finish data
processing model.

However crc32.c test case 8 precedes ioctl(CIOCCRYPT) with
COP_FLAG_UPDATE set with ioctl(CIOCGSESSION) and follows it with
ioctl(CIOCCRYPT) with COP_FLAG_UPDATE cleared to extract the CRC, and
then ioctl(CIOCFSESSION) to finish the session, all _within_ the loop
to CRC eight segments.  This works with the software implementation
since the intermediate CRC-32 is carried forward out of one session to
seed the next session. Fix by moving the init and finish portions out
of the loop in test case 8.

Signed-off-by: Peter Barada <peter.barada@gmail.com>
2026-07-10 13:02:44 +08:00
..
3descbc.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
aescbc.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
aescmac.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
aesctr.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
aesxts.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
CMakeLists.txt testing/crypto: Add pbkdf2 test app 2026-03-27 21:46:08 +08:00
crc32.c crypto: Fix CRC-32 test case 8 2026-07-10 13:02:44 +08:00
dhm.c testing: add unistd.h and pthread.h headers 2026-01-26 19:32:27 +08:00
ecdsa.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
hash.c testing/drivers/hash: Add unaligned buffer size test 2026-06-10 16:42:13 +08:00
hmac.c testing/drivers/crypto/hmac.c: Add long keys 2026-01-26 10:58:22 +08:00
Kconfig testing/drivers/hash: Add unaligned buffer size test 2026-06-10 16:42:13 +08:00
Make.defs testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00
Makefile testing/crypto: Add pbkdf2 test app 2026-03-27 21:46:08 +08:00
pbkdf2.c testing/crypto: Add pbkdf2 test app 2026-03-27 21:46:08 +08:00
rsa.c testing: Move crypto/setest to drivers and open_memstream to libc 2025-01-26 07:32:53 +01:00