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)
Sat, Nov 23, 6:26 AM
Unknown Object (File)
Fri, Nov 22, 3:15 PM
Unknown Object (File)
Fri, Nov 22, 11:09 AM
Unknown Object (File)
Sat, Nov 9, 4:05 AM
Unknown Object (File)
Sat, Nov 9, 2:45 AM
Unknown Object (File)
Fri, Nov 8, 5:12 PM
Unknown Object (File)
Oct 23 2024, 7:24 PM
Unknown Object (File)
Oct 23 2024, 7:24 PM
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
Branch
olm-web-4
Lint
No Lint Coverage
Unit
No Test Coverage

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

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

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

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

lib/types/identity-service-types.js
87–88

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.