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
F3515653: D13466.id44559.diff
Sun, Dec 22, 9:29 AM
Unknown Object (File)
Wed, Dec 18, 9:20 AM
Unknown Object (File)
Wed, Dec 18, 9:20 AM
Unknown Object (File)
Wed, Dec 18, 9:20 AM
Unknown Object (File)
Nov 8 2024, 3:02 AM
Unknown Object (File)
Nov 8 2024, 3:00 AM
Unknown Object (File)
Nov 1 2024, 4:22 PM
Unknown Object (File)
Oct 12 2024, 1:23 AM
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.