Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Cleanup unused PreviousKeySignature column

Leendert de Borsta96a4ec90d61
diff --git a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx
index aeff09c61..02478aa7a 100644
--- a/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx
+++ b/apps/browser-extension/src/entrypoints/popup/components/Sharing/SharedFolderInvitationModal.tsx
@@ -115,7 +115,7 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =
{!askFingerprint && (
<>
<p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.sharedWithYouHint}</p>
- <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</p>
+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.invitedBy(invitation.inviterUsername)}</p>
</>
)}
{askFingerprint && (
diff --git a/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx b/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx
index d28561524..c2adb86d9 100644
--- a/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx
+++ b/apps/mobile-app/components/sharing/SharedFolderInvitationModal.tsx
@@ -164,7 +164,7 @@ export const SharedFolderInvitationModal: React.FC<ISharedFolderInvitationModalP
{!askFingerprint && (
<>
<Text style={styles.bodyText}>{sharingText.sharedWithYouHint}</Text>
- <Text style={styles.mutedText}>{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</Text>
+ <Text style={styles.mutedText}>{sharingText.invitedBy(invitation.inviterUsername)}</Text>
</>
)}
{askFingerprint && (
diff --git a/apps/server/AliasVault.Api/Controllers/V2/KeyRotationController.cs b/apps/server/AliasVault.Api/Controllers/V2/KeyRotationController.cs
index 0747aa518..859a1cfdc 100644
--- a/apps/server/AliasVault.Api/Controllers/V2/KeyRotationController.cs
+++ b/apps/server/AliasVault.Api/Controllers/V2/KeyRotationController.cs
@@ -103,7 +103,7 @@ public class KeyRotationController(ILogger<KeyRotationController> logger, IAlias
return ApiError.Result(ApiErrorCode.VAULT_KEY_NOT_FOUND, 400);
}
- var shapeError = await ValidateShapeAsync(context, user, model);
+ var shapeError = ValidateShape(user, model);
if (shapeError != null)
{
return shapeError;
@@ -242,7 +242,6 @@ public class KeyRotationController(ILogger<KeyRotationController> logger, IAlias
PublicKey = model.AccountKeys.SigningPublicKey,
Fingerprint = Signing.Fingerprint(model.AccountKeys.SigningPublicKey),
EncryptedPrivateKey = model.AccountKeys.EncryptedSigningPrivateKey,
- PreviousKeySignature = model.AccountKeys.PreviousSigningKeySignature,
IsPrimary = true,
AccountKeyVersion = newAccountKeyVersion,
CreatedAt = now,
@@ -379,11 +378,10 @@ public class KeyRotationController(ILogger<KeyRotationController> logger, IAlias
/// <summary>
/// Checks everything about the request that needs no transaction: sizes, algorithms, ciphertext hashes and signatures.
- /// Every signature is checked against the new signing key, which the rotation stores in the same transaction, except the
- /// new signing key itself, which the current one must vouch for.
+ /// Every signature is checked against the new signing key, which the rotation stores in the same transaction.
/// </summary>
/// <returns>Null when the request is well-formed, else the error to answer with.</returns>
- private static async Task<IActionResult?> ValidateShapeAsync(AliasServerDbContext context, AliasVaultUser user, KeyRotationRequest model)
+ private static IActionResult? ValidateShape(AliasVaultUser user, KeyRotationRequest model)
{
var unlock = model.UnlockMethod;
var keys = model.AccountKeys;
@@ -430,15 +428,12 @@ public class KeyRotationController(ILogger<KeyRotationController> logger, IAlias
return ApiError.Result(ApiErrorCode.INVALID_REQUEST, 400);
}
- // Signatures: the new signing key vouches for the new account public key, every grant, the delivery key and every
- // key certification; the current signing key vouches for the new signing key.
- var currentSigningKey = await GrantHelper.GetPrimarySigningKeyAsync(context, user.Id);
- var signingKeyIsVouchedFor = Signing.Verify(currentSigningKey, Signing.SigningKeyRotationMessage(user.Id, keys.SigningPublicKey), keys.PreviousSigningKeySignature);
+ // Signatures: the new signing key vouches for the new account public key, every grant, the delivery key and every key certification.
var accountKeyIsSigned = Signing.VerifyAccountPublicKey(keys.SigningPublicKey, keys.AccountPublicKey, keys.AccountPublicKeySignature);
var grantsAreSigned = model.Grants.All(g => Signing.Verify(keys.SigningPublicKey, Signing.GrantMessage(g.ManifestId, g.KeyVersion, user.Id, keys.AccountPublicKey, g.Algorithm, g.EncryptedVek), g.Signature));
var deliveryKeyIsSigned = string.IsNullOrEmpty(deliveryKey) || Signing.Verify(keys.SigningPublicKey, Signing.DeliveryKeyMessage(model.Manifest.ManifestId, deliveryKey, model.Manifest.CurrentRevision), model.Manifest.DeliveryPublicKeySignature);
var certificationsAreSigned = model.Certifications.All(c => Signing.Verify(keys.SigningPublicKey, Signing.KeyCertificationMessage(user.Id, c.SubjectUserId, c.SubjectSigningPublicKey), c.Signature));
- if (!signingKeyIsVouchedFor || !accountKeyIsSigned || !grantsAreSigned || !deliveryKeyIsSigned || !certificationsAreSigned)
+ if (!accountKeyIsSigned || !grantsAreSigned || !deliveryKeyIsSigned || !certificationsAreSigned)
{
return ApiError.Result(ApiErrorCode.SIGNATURE_INVALID, 400);
}
diff --git a/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.Designer.cs b/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.Designer.cs
index 4746171f0..fab1553a5 100644
--- a/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.Designer.cs
+++ b/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.Designer.cs
@@ -1117,10 +1117,6 @@ namespace AliasServerDb.Migrations
b.Property<bool>("IsPrimary")
.HasColumnType("boolean");
- b.Property<string>("PreviousKeySignature")
- .HasMaxLength(255)
- .HasColumnType("character varying(255)");
-
b.Property<string>("PublicKey")
.IsRequired()
.HasMaxLength(100)
diff --git a/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.cs b/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.cs
index a51c155c3..048a87daa 100644
--- a/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.cs
+++ b/apps/server/Databases/AliasServerDb/Migrations/20261022102104_RenameGroupInvitationsToVaultManifestInvitations.cs
@@ -29,7 +29,6 @@ namespace AliasServerDb.Migrations
migrationBuilder.RenameColumn(name: "UnlockKeyId", table: "UserUnlockMethodsHistory", newName: "UnlockMethodId");
migrationBuilder.Sql("""UPDATE "ServerSettings" SET "Key" = 'UnlockMethodHistoryRetentionDays' WHERE "Key" = 'UnlockKeyHistoryRetentionDays';""");
- migrationBuilder.AddColumn<string>(name: "PreviousKeySignature", table: "UserSigningKeys", type: "character varying(255)", maxLength: 255, nullable: true);
migrationBuilder.AddColumn<string>(name: "Fingerprint", table: "UserSigningKeys", type: "character varying(20)", maxLength: 20, nullable: true);
// Backfill the fingerprint as Signing.Fingerprint computes it: SHA-256 over the length-prefixed label and key bytes,
@@ -160,7 +159,6 @@ namespace AliasServerDb.Migrations
migrationBuilder.DropTable(name: "UserKeyCertifications");
migrationBuilder.DropIndex(name: "IX_UserSigningKeys_Fingerprint", table: "UserSigningKeys");
migrationBuilder.DropColumn(name: "Fingerprint", table: "UserSigningKeys");
- migrationBuilder.DropColumn(name: "PreviousKeySignature", table: "UserSigningKeys");
migrationBuilder.Sql("""UPDATE "ServerSettings" SET "Key" = 'UnlockKeyHistoryRetentionDays' WHERE "Key" = 'UnlockMethodHistoryRetentionDays';""");
migrationBuilder.RenameColumn(name: "UnlockMethodId", table: "UserUnlockMethodsHistory", newName: "UnlockKeyId");
diff --git a/apps/server/Databases/AliasServerDb/Migrations/AliasServerDbContextModelSnapshot.cs b/apps/server/Databases/AliasServerDb/Migrations/AliasServerDbContextModelSnapshot.cs
index 7e968fea3..d51432b17 100644
--- a/apps/server/Databases/AliasServerDb/Migrations/AliasServerDbContextModelSnapshot.cs
+++ b/apps/server/Databases/AliasServerDb/Migrations/AliasServerDbContextModelSnapshot.cs
@@ -1114,10 +1114,6 @@ namespace AliasServerDb.Migrations
b.Property<bool>("IsPrimary")
.HasColumnType("boolean");
- b.Property<string>("PreviousKeySignature")
- .HasMaxLength(255)
- .HasColumnType("character varying(255)");
-
b.Property<string>("PublicKey")
.IsRequired()
.HasMaxLength(100)
diff --git a/apps/server/Databases/AliasServerDb/UserSigningKey.cs b/apps/server/Databases/AliasServerDb/UserSigningKey.cs
index b279d9273..57773608b 100644
--- a/apps/server/Databases/AliasServerDb/UserSigningKey.cs
+++ b/apps/server/Databases/AliasServerDb/UserSigningKey.cs
@@ -70,12 +70,6 @@ public class UserSigningKey
/// </summary>
public int AccountKeyVersion { get; set; }
- /// <summary>
- /// Gets or sets the previous signing key's signature over <see cref="PublicKey"/>; null for an account's first signing key.
- /// </summary>
- [StringLength(255)]
- public string? PreviousKeySignature { get; set; }
-
/// <summary>
/// Gets or sets the timestamp at which this keypair was created.
/// </summary>
diff --git a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/KeyRotation/KeyRotationAccountKeys.cs b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/KeyRotation/KeyRotationAccountKeys.cs
index 8d9dc9867..15ce6b46a 100644
--- a/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/KeyRotation/KeyRotationAccountKeys.cs
+++ b/apps/server/Shared/AliasVault.Shared/Models/WebApi/V2/KeyRotation/KeyRotationAccountKeys.cs
@@ -45,16 +45,11 @@ public class KeyRotationAccountKeys
/// </summary>
public required string EncryptedSigningPrivateKey { get; set; }
- /// <summary>
- /// Gets or sets the previous signing key's signature over the new signing public key.
- /// </summary>
- public required string PreviousSigningKeySignature { get; set; }
-
/// <summary>
/// Gets a value indicating whether every value is present and within the stored size limits.
/// </summary>
[JsonIgnore]
public bool FitsStorageLimits => EncryptedVek.Length <= AccountKeysUpload.MaxWrappedKeyLength && AccountPublicKey.Length <= AccountKeysUpload.MaxPublicKeyLength
&& EncryptedAccountPrivateKey.Length <= AccountKeysUpload.MaxEncryptedPrivateKeyLength && AccountPublicKeySignature.Length <= AccountKeysUpload.MaxSigningValueLength && SigningPublicKey.Length <= AccountKeysUpload.MaxSigningPublicKeyLength
- && EncryptedSigningPrivateKey.Length <= AccountKeysUpload.MaxSigningValueLength && PreviousSigningKeySignature.Length <= AccountKeysUpload.MaxSigningValueLength;
+ && EncryptedSigningPrivateKey.Length <= AccountKeysUpload.MaxSigningValueLength;
}
diff --git a/apps/server/Utilities/AliasVault.Cryptography/Signing.cs b/apps/server/Utilities/AliasVault.Cryptography/Signing.cs
index 6e9d0f87c..71a1cd1b6 100644
--- a/apps/server/Utilities/AliasVault.Cryptography/Signing.cs
+++ b/apps/server/Utilities/AliasVault.Cryptography/Signing.cs
@@ -47,11 +47,6 @@ public static class Signing
/// </summary>
public const string MobileLoginApprovalLabel = "aliasvault/v1/sig/mobile-login-approval";
- /// <summary>
- /// The label of a new signing public key, signed by the signing key it replaces.
- /// </summary>
- public const string SigningKeyRotationLabel = "aliasvault/v1/sig/signing-key-rotation";
-
/// <summary>
/// The label of a key certification: one user vouching that a signing public key belongs to another user.
/// </summary>
@@ -154,17 +149,6 @@ public static class Signing
return SignedMessage(MobileLoginApprovalLabel, Utf8(requestId), Utf8(algorithm), Utf8(encryptedAccountKey));
}
- /// <summary>
- /// Builds the signed message of a signing key rotation: the account's new signing public key, signed by the previous one.
- /// </summary>
- /// <param name="userId">The account rotating its signing key.</param>
- /// <param name="newSigningPublicKey">The new signing public key (base64).</param>
- /// <returns>The message bytes.</returns>
- public static byte[] SigningKeyRotationMessage(string userId, string newSigningPublicKey)
- {
- return SignedMessage(SigningKeyRotationLabel, Utf8(userId), Utf8(newSigningPublicKey));
- }
-
/// <summary>
/// Builds the signed message of a key certification: the certifier vouches that a signing public key belongs to the subject.
/// </summary>
diff --git a/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx b/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx
index fda0a8ccb..9d922800d 100644
--- a/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx
+++ b/apps/web/src/components/sharing/SharedFolderInvitationModal.tsx
@@ -106,7 +106,7 @@ const SharedFolderInvitationModal: React.FC<SharedFolderInvitationModalProps> =
{!askFingerprint && (
<>
<p className="text-sm text-gray-600 dark:text-gray-300">{sharingText.sharedWithYouHint}</p>
- <p className="text-sm text-gray-500 dark:text-gray-400">{isInviterVerified(invitation) ? sharingText.invitedByVerified(invitation.inviterUsername) : sharingText.invitedBy(invitation.inviterUsername)}</p>
+ <p className="text-sm text-gray-500 dark:text-gray-400">{sharingText.invitedBy(invitation.inviterUsername)}</p>
</>
)}
{askFingerprint && (
diff --git a/apps/web/tests/e2e/70-sharing.spec.ts b/apps/web/tests/e2e/70-sharing.spec.ts
index bc1e09391..cb32e9657 100644
--- a/apps/web/tests/e2e/70-sharing.spec.ts
+++ b/apps/web/tests/e2e/70-sharing.spec.ts
@@ -149,7 +149,7 @@ test.describe('70. Sharing', () => {
await expect(member.page.locator('[data-invitation]')).toBeVisible({ timeout: 2000 });
}).toPass({ timeout: 30000 });
await member.page.locator('[data-invitation]').click();
- await expect(member.page.getByText(`Invited by ${ownerUser.username} (verified)`)).toBeVisible();
+ await expect(member.page.getByText(`Invited by ${ownerUser.username}`)).toBeVisible();
await member.page.locator('#accept-invitation').click();
await expect(member.page).toHaveURL(/\/items\/folder\//);
await expect(member.page.locator('#inviter-fingerprint')).toHaveCount(0);
diff --git a/core/client/src/sharing/SharingView.ts b/core/client/src/sharing/SharingView.ts
index 1d080349f..2e8114b81 100644
--- a/core/client/src/sharing/SharingView.ts
+++ b/core/client/src/sharing/SharingView.ts
@@ -29,8 +29,6 @@ export const sharingText = {
inviterFingerprintTitle: (username: string): string => `Confirm the invitation from ${username}`,
/** Explains why the inviter's account fingerprint is asked for. */
inviterFingerprintExplanation: (username: string): string => `For your security, enter the account fingerprint of ${username}. It confirms that this invitation really comes from them. ${username} finds it in Settings on their device.`,
- /** Who sent an invitation, whose key this account verified before. */
- invitedByVerified: (username: string): string => `Invited by ${username} (verified)`,
/** Who sent an invitation. */
invitedBy: (username: string): string => `Invited by ${username}`,
invitePeople: 'Invite someone',
diff --git a/core/rust/src/crypto/key_chain.rs b/core/rust/src/crypto/key_chain.rs
index ff710bdb6..71e894441 100644
--- a/core/rust/src/crypto/key_chain.rs
+++ b/core/rust/src/crypto/key_chain.rs
@@ -239,10 +239,6 @@ pub struct RotatedAccountKeys {
#[zeroize(skip)]
pub account_keys: AccountKeyBlobs,
-
- /// The previous signing key's signature over the new signing public key (see [`signing::SIGNING_KEY_ROTATION_LABEL`]).
- #[zeroize(skip)]
- pub previous_signing_key_signature: String,
}
impl fmt::Debug for RotatedAccountKeys {
@@ -252,19 +248,16 @@ impl fmt::Debug for RotatedAccountKeys {
}
/// Rotate an account's keys: a new Account Key, VEK and signing keypair around an account keypair the host generated,
-/// wrapped under the KEK of `new_unlock_key_base64`. The previous signing key is used to confirm the new one.
-pub fn rotate_account_keys(current_signing_private_key_base64: &str, user_id: &str, new_unlock_key_base64: &str, key_pair: &RsaKeyPair) -> VaultResult<RotatedAccountKeys> {
+/// wrapped under the KEK of `new_unlock_key_base64`.
+pub fn rotate_account_keys(new_unlock_key_base64: &str, key_pair: &RsaKeyPair) -> VaultResult<RotatedAccountKeys> {
let hierarchy = create_account_key_hierarchy_with_key_pair(new_unlock_key_base64, key_pair)?;
let account_key = unwrap_account_key(&hierarchy.account_keys.encrypted_account_key, new_unlock_key_base64)?;
- let rotation_message = signing::signing_key_rotation_message(user_id, &hierarchy.account_keys.signing_public_key);
- let previous_signing_key_signature = signing::sign(current_signing_private_key_base64, &rotation_message)?;
Ok(RotatedAccountKeys {
account_key: account_key.to_string(),
vault_encryption_key: hierarchy.vault_encryption_key.clone(),
account_private_key: hierarchy.account_private_key.clone(),
signing_private_key: hierarchy.signing_private_key.clone(),
account_keys: hierarchy.account_keys.clone(),
- previous_signing_key_signature,
})
}
@@ -273,12 +266,12 @@ mod tests {
use super::*;
#[test]
- fn rotated_keys_open_with_the_new_unlock_key_and_vouch_for_each_other() {
+ fn rotated_keys_open_with_the_new_unlock_key() {
let old_hierarchy = create_account_key_hierarchy(&generate_key_base64()).unwrap();
let new_unlock_key = generate_key_base64();
let key_pair = generate_rsa_key_pair().unwrap();
- let rotated = rotate_account_keys(&old_hierarchy.signing_private_key, "user-1", &new_unlock_key, &key_pair).unwrap();
+ let rotated = rotate_account_keys(&new_unlock_key, &key_pair).unwrap();
let blobs = &rotated.account_keys;
// The new chain opens with the new unlock key and yields the new VEK and private keys.
@@ -289,10 +282,7 @@ mod tests {
assert_ne!(rotated.vault_encryption_key, old_hierarchy.vault_encryption_key);
assert_ne!(blobs.signing_public_key, old_hierarchy.account_keys.signing_public_key);
- // The old signing key vouches for the new one, bound to the account.
- let message = signing::signing_key_rotation_message("user-1", &blobs.signing_public_key);
- assert!(signing::verify(&old_hierarchy.account_keys.signing_public_key, &message, &rotated.previous_signing_key_signature));
- assert!(!signing::verify(&old_hierarchy.account_keys.signing_public_key, &signing::signing_key_rotation_message("user-2", &blobs.signing_public_key), &rotated.previous_signing_key_signature));
+ // The new signing key vouches for the new account public key.
assert!(signing::verify(&blobs.signing_public_key, &signing::account_public_key_message(&blobs.account_public_key), &blobs.account_public_key_signature));
}
diff --git a/core/rust/src/crypto/signing.rs b/core/rust/src/crypto/signing.rs
index 88c271979..8496f0cdc 100644
--- a/core/rust/src/crypto/signing.rs
+++ b/core/rust/src/crypto/signing.rs
@@ -32,9 +32,6 @@ pub const EMAIL_CLAIM_TRANSFER_LABEL: &str = "aliasvault/v1/sig/email-claim-tran
/// The label of a Login with Mobile approval: the Account Key encrypted for the requesting client, signed by the approving user.
pub const MOBILE_LOGIN_APPROVAL_LABEL: &str = "aliasvault/v1/sig/mobile-login-approval";
-/// The label of a new signing public key, signed by the signing key it replaces.
-pub const SIGNING_KEY_ROTATION_LABEL: &str = "aliasvault/v1/sig/signing-key-rotation";
-
/// The label of a key certification: one user vouching that a signing public key belongs to another user, after checking
/// its fingerprint against the account fingerprint that user gave them outside AliasVault.
pub const KEY_CERTIFICATION_LABEL: &str = "aliasvault/v1/sig/key-certification";
@@ -115,11 +112,6 @@ pub fn mobile_login_approval_message(request_id: &str, algorithm: &str, encrypte
signed_message(MOBILE_LOGIN_APPROVAL_LABEL, &[request_id.as_bytes(), algorithm.as_bytes(), encrypted_account_key.as_bytes()])
}
-/// The signed message of a signing key rotation: the account's new signing public key, vouched for by the previous one.
-pub fn signing_key_rotation_message(user_id: &str, new_signing_public_key: &str) -> Vec<u8> {
- signed_message(SIGNING_KEY_ROTATION_LABEL, &[user_id.as_bytes(), new_signing_public_key.as_bytes()])
-}
-
/// The signed message of a key certification: `certifier_user_id` vouches that `subject_signing_public_key` belongs to `subject_user_id`.
pub fn key_certification_message(certifier_user_id: &str, subject_user_id: &str, subject_signing_public_key: &str) -> Vec<u8> {
signed_message(KEY_CERTIFICATION_LABEL, &[certifier_user_id.as_bytes(), subject_user_id.as_bytes(), subject_signing_public_key.as_bytes()])
@@ -206,12 +198,6 @@ mod tests {
assert_eq!(crate::common::encoding::hex_encode_lower(&invitation_name_message(manifest_id, "user-1", "{\"kty\":\"RSA\"}", "bmFtZQ==")), INVITATION_NAME_MESSAGE_VECTOR);
}
- /// Known-answer vector for the signing key rotation message, which `Signing.cs` builds too. Never regenerate it.
- #[test]
- fn signing_key_rotation_message_known_answer() {
- assert_eq!(crate::common::encoding::hex_encode_lower(&signing_key_rotation_message("user-1", PUBLIC_KEY_VECTOR)), SIGNING_KEY_ROTATION_MESSAGE_VECTOR);
- }
-
/// Known-answer vector for the key certification message, which `Signing.cs` builds too. Never regenerate it.
#[test]
fn key_certification_message_known_answer() {
@@ -247,7 +233,6 @@ mod tests {
assert!(!fingerprint_matches("not base64!", FINGERPRINT_VECTOR));
}
- const SIGNING_KEY_ROTATION_MESSAGE_VECTOR: &str = "00000026616c6961737661756c742f76312f7369672f7369676e696e672d6b65792d726f746174696f6e00000006757365722d310000002c41364548762f504f454c3464634e3059353076416d57666b316a436270513166486479475a424a564d62673d";
const INVITATION_NAME_MESSAGE_VECTOR: &str = "00000021616c6961737661756c742f76312f7369672f696e7669746174696f6e2d6e616d650000002430613162326333642d303030302d303030302d303030302d30303030303030303030303100000006757365722d310000000d7b226b7479223a22525341227d00000008626d46745a513d3d";
diff --git a/core/rust/src/vault_sync/rotation.rs b/core/rust/src/vault_sync/rotation.rs
index e5780e60b..94c15e9eb 100644
--- a/core/rust/src/vault_sync/rotation.rs
+++ b/core/rust/src/vault_sync/rotation.rs
@@ -96,7 +96,6 @@ struct AccountKeysWrite {
account_public_key_signature: String,
signing_public_key: String,
encrypted_signing_private_key: String,
- previous_signing_key_signature: String,
}
#[derive(Serialize)]
@@ -199,7 +198,7 @@ async fn rotate(ctx: &mut Ctx) -> Outcome {
let certifications: Vec<CertificationEntry> = http::with_outdated_server_guard(http::get(&ctx.host, "Groups/certifications", false).await)?;
let key_pair = crypto::RsaKeyPair { public_key: params.new_account_public_key.clone(), private_key: params.new_account_private_key.expose_secret().to_string() };
- let rotated = crypto::rotate_account_keys(signing_key.expose_secret(), &params.user_id, params.new_unlock_key.expose_secret(), &key_pair)?;
+ let rotated = crypto::rotate_account_keys(params.new_unlock_key.expose_secret(), &key_pair)?;
let new_vek = SecretString::from(rotated.vault_encryption_key.as_str());
ctx.log("[KeyRotation] Generated the new Account Key, VEK, account keypair and signing keypair.").await;
@@ -337,7 +336,6 @@ async fn build_and_post(ctx: &mut Ctx, params: &KeyRotationParams, personal_mani
account_public_key_signature: rotated.account_keys.account_public_key_signature.clone(),
signing_public_key: rotated.account_keys.signing_public_key.clone(),
encrypted_signing_private_key: rotated.account_keys.encrypted_signing_private_key.clone(),
- previous_signing_key_signature: rotated.previous_signing_key_signature.clone(),
},
manifest: ManifestWrite {
manifest_id: personal_manifest_id.to_string(),
diff --git a/docs/docs/security-whitepaper.mdx b/docs/docs/security-whitepaper.mdx
index 572930992..783291ba5 100644
--- a/docs/docs/security-whitepaper.mdx
+++ b/docs/docs/security-whitepaper.mdx
@@ -183,11 +183,11 @@ Properties of this hierarchy:
### 4.2. Key rotation
When you change your master password, you can choose to also replace all encryption keys of your account. Without it, a password change keeps the keys ([4.1](#41-key-hierarchy)).
-- **Replaced**: the Account Key, the personal VEK, both account keypairs and the personal vault's Vault Delivery Keypair, all created on the client. The new signing key is signed with the old one.
+- **Replaced**: the Account Key, the personal VEK, both account keypairs and the personal vault's Vault Delivery Keypair, all created on the client.
- **Re-encrypted**: the personal vault and its blob keys with the new VEK, and every grant the user holds for the new account public key.
- **Signed again**: every key certification the user made, with the new signing key, after the client verified it under the old one ([10.3](#103-account-fingerprints-and-key-certifications)).
- **Unchanged**: blob bytes, shared vault VEKs and received emails, whose old delivery keypair stays in the vault.
-- **Deleted**: the previous personal VEK, the older revisions of the personal vault with the blobs only they refer to, the password history and the old account encryption keypair, as they can only be opened with the old keys. The old signing public keys stay on the server, each new one signed by the one before it.
+- **Deleted**: the previous personal VEK, the older revisions of the personal vault with the blobs only they refer to, the password history and the old account encryption keypair, as they can only be opened with the old keys. The old signing public keys stay on the server.
- **All or nothing**: the server applies the rotation in one transaction and refuses it when a blob key or grant is missing or the vault changed in the meantime.
- **Other devices**: their sessions are revoked, and a device still on the old keys is signed out on its next sync. Device unlock methods have to be set up again, and pending invitations to the user are closed.
- **Scope**: the old keys cannot decrypt anything written to the personal vault after the rotation. Received emails and shared vaults stay under their existing keys ([13.1](#limitation-shared-member-removal)).