owncloud/core — pull request #12191 by schiesbn (2014-11-14 16:42:13+00:00)
Title: [encryption] reorganize folder structure

In order to fix #11297 I changed the folder structure for the encryption keys.

We create for every file a corresponding folder in files_encryption/keys. For example for "foo/test.txt" we will create a folder "files_encryption/keys/foo/test.txt/". This folder will contain all share keys, named "userId.shareKey" and the file key named "fileKey". This way we avoid any name collision with file names which are similar to user names, like described in issue #11297.

Additionally this makes many file operation easier. If a file gets renamed or moved we just have to rename/move the corresponding folder. This way we can save a lot of overhead to find the correct share-keys and file-keys which should also result in some performance improvements.

This PR touches all aspects of encryption, so we need to test encryption as complete as possible, including:

- sharing, reshares,...
- deleting single files or complete folders
- restore the deleted file/folder from the trashbin or just single files/sub-folders from the deleted folder
- enabling recovery keys
- change passwords
- recover files
- sharing
- deleted shared files and try to restore them
...

Currently the migration script is missing. But everything should work if you start with a fresh installation or a setup without any encrypted files and encryption keys.

Currently missing:

[ ] migration script