I have large encrypted and authenticated files (a couple of MB each, which is more than 16 pages) that I want to decrypt using HW accelerator embed in the system via Linux CryptoAPI. I'm using libkcapi to handle the communication with the kernel.
To be able to decrypt such large files, I had to change the ALG_MAX_PAGES
define to 256. It worked perfectly, but it didn't feel the right thing to do, since there are warnings everywhere that there is a limit of 16 pages.
My questions on the matter are:
- Why is there such a limit?
- What's the correct way to handle large inputs?