Bug 1900892 - Part 1: Factor out computeBackupKeys to ArchiveUtils. r=djackson,backup-reviewers,kpatenio

Factoring this out, as computing these keys is something that we need to do both
when generating the ArchiveEncryptionState, as well as when performing a
decryption.

This also renames "authKey" and "encKey" in ArchiveEncryptionState to use
"backupAuthKey" and "backupEncKey", as these are more in-line with what the
encryption design document uses (and because there are "authKeys" and "encKeys"
that will be used by the encryption mechanism that are distinct from the
backupAuthKey and backupEncKey).

Differential Revision: https://phabricator.services.mozilla.com/D212858
This commit is contained in:
Mike Conley
2024-06-21 14:07:25 +00:00
parent c14f60b16c
commit c43f563dc7
4 changed files with 111 additions and 87 deletions

View File

@@ -1007,7 +1007,7 @@ export class BackupService extends EventTarget {
? {
publicKey: encState.publicKey,
salt: encState.salt,
authKey: encState.authKey,
backupAuthKey: encState.backupAuthKey,
wrappedSecrets: encState.wrappedSecrets,
}
: null;