I'm symmetrically encrypting a file (using a random salt and a user supplied password with PKCS5S2, i.e., nothing special) and I need to be able to access it randomly. Therefore I'm using a stream cipher. This works well, but it allows the attacker to verify a wrong password when reading only a tiny part of the file (garbled data are easy to recognize).
IIRC there's an encryption schema making it impossible to read any part of the data in isolation, you must read it all (I forgot how it's called). This seems to conflict with my random access requirement, however I always need to read the whole file first and then I need the random access.
Is there an encryption schema allowing this, i.e.,
- to obtain any information, all data must be decrypted first
- afterwards, any portion of the data can be decrypted in isolation