Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support rotating accounts wiht multiple admins #8137

Merged
merged 27 commits into from
Feb 6, 2025
Merged

Support rotating accounts wiht multiple admins #8137

merged 27 commits into from
Feb 6, 2025

Conversation

vaf-hub
Copy link
Contributor

@vaf-hub vaf-hub commented Dec 16, 2024

No description provided.

@vaf-hub vaf-hub force-pushed the crypto/dev branch 2 times, most recently from f492bbd to c6e8e0b Compare December 16, 2024 16:00
@vitoreiji vitoreiji force-pushed the crypto/dev branch 2 times, most recently from 207d8eb to 5153a24 Compare January 7, 2025 10:08
hdcos and others added 23 commits February 6, 2025 09:25
When adding a new admin and an admin key rotation is pending we inform
the admin that he must wait the rotation to finish first.

tutadb#1905

Co-authored-by: vis <[email protected]>
This key serves to authenticate the new admin group key to other admins,
and should therefore be accessible by each admin. We have two options
for this: the old admin group key, or each admin's existing user group
key.

The previous implementation derived the authentication key from the
admin group key, which is not what was defined in the design of this
key rotation process.

tutadb#1906
When performing a user group key rotation after another admin already
performed the admin group key rotation, each admin must validate the
authenticity of the newly received admin group key and then encrypt it
with their new user group key.

tutadb#1909
…otation,

authenticate the key at every usage as admin

tutadb#1922
Co-authored-by: bedhub

tutadb#1925
Allows creating and verifying tags. This is useful to manually verify
authenticity of non-confidential data.

tutadb#1937
Co-authored-by: vaf-hub <[email protected]>
Co-authored-by: Sara <[email protected]>

tutadb#1937
This commits binds the user distribution key to the version of the new user group key being distributed therefore increasing security.

For this new distribution key will only be used for decryption and a later commit will use it for both encryption and descryption.

Co-authored-by: mab <[email protected]>
extract PublicKeyProvider to enforce constraints in a central place
use type system and checkKeyVersionConstraints function to enforce constraints everywhere
tutadb#1933
make convertToVersionedPublicKeys part of PublicKeyProvider and private

tutadb#1926
… version constraints on key versions, only accept rsa public keys in version 0

fix mimimi after changing Versioned to have versions as u64 instead of i64

tutadb#1926
tutadb#1933
This affects only Key Rotation related derivations, i.e., authentication
keys and the distribution encryption key. We do not change the user
group distribution key derivation, that is a separate change.

This moves all the binding data to the authentication key derivation
step. It doesn't really matter if it is there or in the tagged data, as
long at it is somewhere, but by using it in the key derivation salt we
increase the security of the resulting authentication key.

We also bind the entire MAC tag system together. The idea here is to
make it easy to find the corresponding tag creation and verification in
the code, and also ensure that the parameters passed in are the same.

This also makes it easy to see how key authentication works in general.

We respect the constraint that no classes or functions may be passed in
or out of the facade (due to IPC).

tutadb#1940

Co-authored-by: vis <[email protected]>
Co-authored-by: hec <[email protected]>
Co-authored-by: mab <[email protected]>
These groups have been deleted and are no longer supported.

It doesn't make sense talking about "global admins" anymore, so we just
refer to them as "admins".

tutadb#1919

Co-authored-by: Vitor Sakaguti <[email protected]>
We still use the keys, but we show a warning if we detect that TutaCrypt
keys should have been used instead.

In practice, this means that if we have TutaCrypt keys at all, the
sender should have used those. However, in order to prevent unnecessary
warnings when doing a key rotation, we consider it normal to receive RSA
encrypted mails in the same session where we did the key rotation.

There is a corner case when we show a warning even though the RSA
encryption was legitimate, and that is if we decrypt an old RSA mail
after rotating to TutaCrypt keys. We don't expect this to occur very
often.

Co-authored-by: hec <[email protected]>
Co-authored-by: mab <[email protected]>

tutadb#1932
@vitoreiji vitoreiji merged commit cdfa26b into master Feb 6, 2025
18 checks passed
@vitoreiji vitoreiji deleted the crypto/dev branch February 6, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants