Tag Info

New answers tagged

4

You basically want a full disk encryption mode for a block cipher; XTS mode seems to be the current standard. In your case each "disk block" is actually a file offset. Note that using a stream cipher or counter mode is NOT secure if the data is ever modified in the file, as it would violate the cardinal sin of using the same key and initialization vector to ...


3

The catch how ever is that if a small part of the file is given along with the location of that bytes from the beginning of the file we should be able to decrypt just that piece. Normal CTR mode encryption allows one to decrypt any block of the file independent of the rest, so no need to invent your own mode. With AES the block size is always 128 bits, ...


0

For the problem as stated, a stream cipher may not work. Stream ciphers need to either have a unique IV (increasing file size) or a single-use key. Otherwise they leak the XOR of any two files encrypted with the same key and IV. So, unless there's a side-channel that can be used for unique IVs (like file names that are known unique), AES in CTR or OFB mode ...



Top 50 recent answers are included