Page MenuHomePhabricator

[crypto] unify key types and introduce type for Inbound Keys
ClosedPublic

Authored by kamil on Feb 19 2024, 7:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jun 27, 3:07 PM
Unknown Object (File)
Thu, Jun 27, 12:05 PM
Unknown Object (File)
Tue, Jun 18, 5:13 AM
Unknown Object (File)
Wed, Jun 12, 1:28 AM
Unknown Object (File)
Sat, Jun 1, 5:38 PM
Unknown Object (File)
May 20 2024, 11:11 AM
Unknown Object (File)
May 20 2024, 11:11 AM
Unknown Object (File)
May 20 2024, 11:11 AM
Subscribers

Details

Summary
  1. Move some types from CommCoreModuleSchema.js -> crypto-types.js
  2. Add validator for SignedPrekeys
  3. UserDevicesOlmInboundKeys type and validator
  4. Group types in identity-service-types.js
Test Plan

FLow

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Feb 19 2024, 9:35 AM
tomek added inline comments.
lib/types/crypto-types.js
25–28 ↗(On Diff #37323)

It might appear more convenient to have two fields, one for content and one for notif, each being an object with prekey and prekeySignature

lib/types/identity-service-types.js
87–88 ↗(On Diff #37323)

Can these two be null at the same time? If not, then can we reflect that in the type?

This revision is now accepted and ready to land.Feb 21 2024, 1:48 AM
lib/types/crypto-types.js
25–28 ↗(On Diff #37323)

I am just moving this type - it will require changing C++ code which returns prekeys

lib/types/identity-service-types.js
87–88 ↗(On Diff #37323)

This is based on InboundKeyInfoResponse - but there is some ongoing work to improve it (https://phab.comm.dev/D11108#inline-67556)

This revision was landed with ongoing or failed builds.Feb 23 2024, 1:32 AM
This revision was automatically updated to reflect the committed changes.