I know that apple provides per-file key encryption .i.e. a separate encryption key for each file exists on the apple device. The Hardware Key and the Passcode are required to generate these random keys.
But once the device is unlocked then all the files can be accessed irrespective of the file protection class which signifies that if I want to read the files from a locked device then I should be breaking the passcode rather than finding the individual keys for all files.
I want to understand what is the actual reason for creating separate encryption key for each file? As there are 4 file protection classes available in ios, is it not feasible to use a single key for all the files belonging to same protection level? With this methodology only 4 encryption keys are required.