Page MenuHomePhabricator

[client-backup] implement functions to decrypt backup
ClosedPublic

Authored by kamil on Aug 29 2023, 2:41 AM.
Tags
None
Referenced Files
F3180648: D9000.diff
Fri, Nov 8, 5:06 AM
Unknown Object (File)
Mon, Oct 28, 7:27 PM
Unknown Object (File)
Tue, Oct 22, 1:08 PM
Unknown Object (File)
Tue, Oct 22, 1:08 PM
Unknown Object (File)
Tue, Oct 22, 9:18 AM
Unknown Object (File)
Tue, Oct 22, 5:05 AM
Unknown Object (File)
Sep 21 2024, 11:04 PM
Unknown Object (File)
Sep 15 2024, 1:14 PM
Subscribers

Details

Summary

Decrypting backup with AES-256 in GCM mode.

Depends on D8999

Test Plan

Encrypt/decrypt different types of both UserData and UserData.

Diff Detail

Repository
rCOMM Comm
Branch
client-backup
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Aug 29 2023, 3:23 AM
kamil added inline comments.
native/backup/encryption.js
59

if we were able to decrypt, it means it exactly the same object as we encrypted so we can assume the type without additional validation

marcin added inline comments.
native/backup/conversion-utils.js
19

This function (and its counterpart) should be in a generic place. Directory native/utils/ looks like the right place.

This revision is now accepted and ready to land.Aug 29 2023, 6:37 AM
native/backup/conversion-utils.js
19

I have mixed feelings about this idea... name is generic but it's placed on purpose in this directory.

A case when we will need to take bytes (which are bytes of UTF-8 string) and convert it to string, and then parse it because this string is JSON is something really backup related, not generic.