Encrypted files are not self-contained
Not all information that are relevant for verifying the integrity of the encrypted file blocks are stored within the files. The file versions are stored in the database instead. Due to this you have to backup the database in addition to the encrypted files and the key material to be able to properly decrypt the files again. This design decision can also lead to a loss of integrity when a database restore is required as the file versions within the database may not match the files on disk anymore.
Do you have an idea for a solution ?
One option is to add the file version to the encrypted file header.
Adding @micbar, maybe this of interest
@karakayasemi you have/gained a lot of experiences, maybe you have an idea 😃
@mmattel as @C0rby said, we can add this information to header. But, again we need to think about a solution for the old files.
We can first try to read file version from the header first, if we do not find in there, we can check from database.
good idea, could be combined with #224. When rewritten, add to header, remove from db...
@mmattel as @C0rby said, we can add this information to header. But, again we need to think about a solution for the old files.
We can first try to read file version from the header first, if we do not find in there, we can check from database.
I think this is the way to go.
When rewritten, add to header, remove from db...
The backend still needs the version field in the DB IIRC.
good idea, could be combined with #224. When rewritten, add to header, remove from db...
We can not combine with #224. It needs complete rewrite of the file with binary encoding.
@karakayasemi any news on that?
I regulary ping that issue... 😅
Not all information that are relevant for verifying the integrity of the encrypted file blocks are stored within the files. The file versions are stored in the database instead. Due to this you have to backup the database in addition to the encrypted files and the key material to be able to properly decrypt the files again. This design decision can also lead to a loss of integrity when a database restore is required as the file versions within the database may not match the files on disk anymore.
I'm flattered by this verbatim quote of my paper. The whole text and additional improvements can be found in the whole document: https://eprint.iacr.org/2020/1439