Page MenuHomePhabricator

[web][native] Encrypt QR auth messages with AES
ClosedPublic

Authored by bartek on Mar 14 2024, 10:42 AM.
Tags
None
Referenced Files
F6211405: D11332.id38245.diff
Wed, Apr 23, 11:42 PM
F6199933: D11332.id.diff
Wed, Apr 23, 6:51 PM
F6174316: D11332.diff
Wed, Apr 23, 3:20 AM
Unknown Object (File)
Mon, Apr 21, 7:12 AM
Unknown Object (File)
Sun, Apr 13, 12:44 AM
Unknown Object (File)
Sat, Apr 12, 7:04 PM
Unknown Object (File)
Mar 23 2025, 10:45 AM
Unknown Object (File)
Feb 27 2025, 4:53 PM
Subscribers

Details

Summary

Refactored functions for composing and parsing Tunnelbroker QR auth messages to use AES-256 encryption, instead of plaintext JSON stringify/parse.

This required separating them for web/native, due to platform-specific implementations of AES encryption. Also needed to implement some minor helpers for web that were already present on native.

Depends on D11331

Test Plan

Still able to perform QR code auth on both web and native. Added unit tests for helpers on web.

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Mar 18 2024, 12:33 AM

Exciting!!

lib/components/qr-auth-handler.react.js
23–33

Would be good to make all of these props read-only

kamil added inline comments.
native/qr-code/qr-code-utils.js
49

shouldn't we reject here?

This revision is now accepted and ready to land.Mar 19 2024, 5:57 AM
native/qr-code/qr-code-utils.js
49

I think not. We intentionally return null to ignore such messages. This simplifies backward compatibility when adding more message types in the future