mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-28 06:04:19 +01:00
Fix AES: invalidate dst, not src
This commit is contained in:
parent
0fac62b39b
commit
75017b64a4
2
crypto.c
2
crypto.c
@ -117,7 +117,7 @@ void aes_decrypt(u8 *src, u8 *dst, u32 blocks, u8 keep_iv)
|
|||||||
write32(AES_DEST, dma_addr(dst));
|
write32(AES_DEST, dma_addr(dst));
|
||||||
|
|
||||||
dc_flushrange(src, blocks * 16);
|
dc_flushrange(src, blocks * 16);
|
||||||
dc_invalidaterange(src, blocks * 16);
|
dc_invalidaterange(dst, blocks * 16);
|
||||||
|
|
||||||
ahb_flush_to(AHB_AES);
|
ahb_flush_to(AHB_AES);
|
||||||
aes_command(AES_CMD_DECRYPT, keep_iv, this_blocks);
|
aes_command(AES_CMD_DECRYPT, keep_iv, this_blocks);
|
||||||
|
Loading…
Reference in New Issue
Block a user