mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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> |
||
|---|---|---|
| .. | ||
| 3descbc.c | ||
| aescbc.c | ||
| aescmac.c | ||
| aesctr.c | ||
| aesxts.c | ||
| CMakeLists.txt | ||
| crc32.c | ||
| dhm.c | ||
| ecdsa.c | ||
| hash.c | ||
| hmac.c | ||
| Kconfig | ||
| Make.defs | ||
| Makefile | ||
| pbkdf2.c | ||
| rsa.c | ||