-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
SITSW-8683
-
11.00.00
-
11.02.00
-
The SA2UL_SHA example fails for the input length 8388606 as shown
[CRYPTO] SHA example started ... [crypto_sha:109] gCryptoShaTestInputBuf: 0x90000000 [crypto_sha:110] gCryptoShaTestOutputBuf: 0x90800000 [crypto_sha:111] ctxParams.inputLen: 8388606 [crypto_sha:112] gSa2ulCtxObj.totalLengthInBytes: 8388606 [SA2UL_pushBuffer:1837] Packet length: 4194303 [SA2UL_pushBuffer:1879] Fragmebt bit: 1 [SA2UL_pushBuffer:1837] Packet length: 4194303 [SA2UL_pushBuffer:1873] Fragmebt bit: 0 [crypto_sha:128] Computed SHA512 hash: 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, [CRYPTO] SHA-512 example failed!!
This input length divides the buffer into two packets of maximum length and so is processed entirely by the following for loop
In this for loop, the driver is not reinitializating the `donedataLen` to its default value due to which the driver never pops the buffer leading to the incorrect final hash calculation.