shift7-ch / katta-server

Zero-config storage management and zero-knowledge key management for teams and organizations.
GNU Affero General Public License v3.0
0 stars 0 forks source link

Compliance with metadata specification UVF - Universal Vault Format (Key Rotation) #19

Open chenkins opened 1 year ago

chenkins commented 1 year ago

Story

Acceptance Criteria

Open Questions

Context

Implementation

chenkins commented 1 year ago

@overheadhunter could you detail on what we need for v1 with respect to https://iterate-ch.atlassian.net/wiki/spaces/ITERATE/pages/26574860/2023-09-13+Meeting+notes ?

chenkins commented 1 year ago

Ich werden den Key Rotation Mechanismus mal ausdefinieren und dabei Migrationspfade im Blick behalten. xattr können wir problemlos zum bestehenden Format hinzufügen. Max Dateinamens/Pfad-Länge sollten wir hard cappen und auf Shortening verzichten. Damit haben wir ein robustes Fundament

chenkins commented 1 year ago

@overheadhunter what about https://github.com/encryption-alliance/unified-vault-format/pull/19/files - does this imply modifications for v1?

overheadhunter commented 1 year ago

Yes I plan to support key rotation from day 1, as adding it later is a risky migration that may be exploited by downgrade attacks.

chenkins commented 9 months ago

@overheadhunter do we need more than https://github.com/shift7-ch/cipherduck-hub/pull/1/files#r1448542864 for v1?

overheadhunter commented 9 months ago

@overheadhunter do we need more than https://github.com/shift7-ch/cipherduck-hub/pull/1/files#r1448542864 for v1?

This one is unrelated to key rotation. So, this one is not sufficient. I'll try to draft the minimal diff required to add key rotation as specified in https://github.com/encryption-alliance/unified-vault-format/pull/19 to our existing vault format.

chenkins commented 9 months ago

Discussion with @overheadhunter

Migration MUST requirements

Migrations SHOULD requirements

Cipherduck Strategy We do a merge

Implementation

Migration risks w.r.t. uvf-to-be

Key rotation

Next steps

chenkins commented 9 months ago

As far as I can see, cryptolib is used with

final FileHeader header = cryptomator.getFileHeaderCryptor().create();
cryptomator.getFileHeaderCryptor().encryptHeader(header);

Example

@overheadhunter 1) Would it make sense to extend FileHeaderCryptor.create() to accept the Vault Key ID? 2) File Body Encryption does not change w.r.t to vault format 8, right?

We then need to pass through the Vault Key ID from vault loading to header creation. (To be discussed with @ylangisc / @dkocher ).

chenkins commented 9 months ago

Discussion with @overheadhunter

Terminlogy

chenkins commented 8 months ago

WiP specification/dependencies:

chenkins commented 8 months ago

WiP diff hub: https://github.com/shift7-ch/cipherduck-hub/compare/605215b1cab5ee4188223bed05336ab4af29a8f6...feature/cipherduck WiP diff client: https://g.iterate.ch/projects/ITERATE/repos/mountainduck/compare/diff?sourceBranch=refs%2Fheads%2Ffeature%2Fcipherduck&targetRepoId=11&targetBranch=2af15e5a2bd7db93a2a37f92a88bab07cadabd65

chenkins commented 8 months ago

Need to discuss with @overheadhunter

chenkins commented 8 months ago

pro memoria:

0. setupCode () decrypts user key (EC) --> pbes2

1. device key (EC) decrypts user key (EC) --> ecdhEs
2. user key (EC) decrypts vault masterkey (AES) --> ecdhEs
3. vault masterkey (AES) decrypts vault key --> a256kw
overheadhunter commented 8 months ago

recovery key handling with key rotation?

I think this is impossible in its current implementation. Instead we could add (as already requested a couple of times) recovery contacts. While regular vault members get the key immediately during key rotation, recovery contacts don't need to be members and only get part of the key, requiring 4 eyes (or more) to recover a vault