Update local backup v2 support.

This commit is contained in:
Cody Henthorne
2025-12-18 16:33:30 -05:00
committed by jeffrey-signal
parent 71b15d269e
commit d9ecab5240
55 changed files with 2291 additions and 274 deletions

View File

@@ -604,6 +604,7 @@ message RestoreDecisionState {
message IntendToRestoreData {
bool hasOldDevice = 1;
optional bool fromRemote = 2;
optional bool fromLocalV2 = 3;
}
State decisionState = 1;

View File

@@ -3,9 +3,18 @@ syntax = "proto3";
package signal.backup.local;
option java_package = "org.thoughtcrime.securesms.backup.v2.local.proto";
option swift_prefix = "LocalBackupProto_";
message Metadata {
message EncryptedBackupId {
bytes iv = 1; // 12 bytes, randomly generated
bytes encryptedId = 2; // AES-256-CTR, key = local backup metadata key, message = backup ID bytes
// local backup metadata key = hkdf(input: K_B, info: UTF8("20241011_SIGNAL_LOCAL_BACKUP_METADATA_KEY"), length: 32)
// No hash of the ID; if it's decrypted incorrectly, the main backup will fail to decrypt anyway.
}
uint32 version = 1;
EncryptedBackupId backupId = 2; // used to decrypt the backup file knowing only the Account Entropy Pool
}
message FilesFrame {