Page MenuHomePhabricator

Enable AES encryption with custom IV on native
AbandonedPublic

Authored by marcin on Sep 25 2024, 11:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 3:02 AM
Unknown Object (File)
Fri, Nov 8, 3:00 AM
Unknown Object (File)
Fri, Nov 1, 4:22 PM
Unknown Object (File)
Oct 12 2024, 1:23 AM
Unknown Object (File)
Oct 10 2024, 12:52 PM
Unknown Object (File)
Oct 7 2024, 9:21 PM
Unknown Object (File)
Oct 7 2024, 10:22 AM
Unknown Object (File)
Oct 6 2024, 9:32 PM
Subscribers

Details

Reviewers
kamil
tomek
bartek
Summary

Subsequent calls to AES encrypt with the same key and the same data will yield different result. This is because we generate different IV for each call. Generally speaking this is OK, but for large notifs we want the same result to minimize the number of uploads to blob service. We can achieve this by generating IV once per notif and using it while encrypting for different devices.

Test Plan

TODO

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

I am actually starting to question this. While putting those diffs I came up with better idea how to achieve the same effect using just JS. I will try to get on phab tomorrow morning. The idea is to pass to createAPNsVisualNotif and createAndroidVisualNotif a map from stringified unencrypted notification + messageInfo to a promise resolving to its encrypted version and a hash.

Please avoid the initialism "IV" in factor of "InitVector", "InitializationVector", etc.

Sorry for the confusion. This differential was supposed to bo abandoned.