@open-e2ee/signal-protocol-sdk 14.3.0 → 14.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/README.md +1 -1
  3. package/SECURITY.md +2 -2
  4. package/dist/client/client.d.ts +31 -5
  5. package/dist/client/client.d.ts.map +1 -1
  6. package/dist/client/client.js +86 -31
  7. package/dist/client/client.js.map +1 -1
  8. package/dist/client/config.d.ts +17 -0
  9. package/dist/client/config.d.ts.map +1 -1
  10. package/dist/client/config.js +17 -0
  11. package/dist/client/config.js.map +1 -1
  12. package/dist/client/delivery-status.d.ts.map +1 -1
  13. package/dist/client/delivery-status.js +8 -7
  14. package/dist/client/delivery-status.js.map +1 -1
  15. package/dist/client/group-outbox.d.ts +17 -1
  16. package/dist/client/group-outbox.d.ts.map +1 -1
  17. package/dist/client/group-outbox.js +37 -2
  18. package/dist/client/group-outbox.js.map +1 -1
  19. package/dist/client/group-sealed-sender.d.ts +20 -0
  20. package/dist/client/group-sealed-sender.d.ts.map +1 -1
  21. package/dist/client/group-sealed-sender.js +49 -8
  22. package/dist/client/group-sealed-sender.js.map +1 -1
  23. package/dist/client/hosted-anonymous-delivery.d.ts +10 -4
  24. package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -1
  25. package/dist/client/hosted-anonymous-delivery.js +17 -8
  26. package/dist/client/hosted-anonymous-delivery.js.map +1 -1
  27. package/dist/client/hosted-device-link-transport.d.ts +6 -2
  28. package/dist/client/hosted-device-link-transport.d.ts.map +1 -1
  29. package/dist/client/hosted-device-link-transport.js +10 -5
  30. package/dist/client/hosted-device-link-transport.js.map +1 -1
  31. package/dist/client/hosted-group-authority.d.ts +4 -2
  32. package/dist/client/hosted-group-authority.d.ts.map +1 -1
  33. package/dist/client/hosted-group-authority.js +10 -7
  34. package/dist/client/hosted-group-authority.js.map +1 -1
  35. package/dist/client/hosted-groups.d.ts +8 -3
  36. package/dist/client/hosted-groups.d.ts.map +1 -1
  37. package/dist/client/hosted-groups.js +15 -9
  38. package/dist/client/hosted-groups.js.map +1 -1
  39. package/dist/client/hosted-mailbox-subscription.d.ts +6 -2
  40. package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -1
  41. package/dist/client/hosted-mailbox-subscription.js +20 -8
  42. package/dist/client/hosted-mailbox-subscription.js.map +1 -1
  43. package/dist/client/hosted-sandbox-identity.d.ts +23 -19
  44. package/dist/client/hosted-sandbox-identity.d.ts.map +1 -1
  45. package/dist/client/hosted-sandbox-identity.js +23 -19
  46. package/dist/client/hosted-sandbox-identity.js.map +1 -1
  47. package/dist/client/hosted-store-records.d.ts +22 -17
  48. package/dist/client/hosted-store-records.d.ts.map +1 -1
  49. package/dist/client/hosted-store-records.js +15 -10
  50. package/dist/client/hosted-store-records.js.map +1 -1
  51. package/dist/client/hosted-transport.d.ts +10 -6
  52. package/dist/client/hosted-transport.d.ts.map +1 -1
  53. package/dist/client/hosted-transport.js +132 -87
  54. package/dist/client/hosted-transport.js.map +1 -1
  55. package/dist/client/hosted.d.ts +15 -4
  56. package/dist/client/hosted.d.ts.map +1 -1
  57. package/dist/client/hosted.js +6 -6
  58. package/dist/client/hosted.js.map +1 -1
  59. package/dist/client/receive-work-seed.d.ts +4 -4
  60. package/dist/client/receive-work-seed.d.ts.map +1 -1
  61. package/dist/client/receive-work-seed.js +1 -1
  62. package/dist/client/receive-work-seed.js.map +1 -1
  63. package/dist/client/sealed-sender.d.ts +27 -1
  64. package/dist/client/sealed-sender.d.ts.map +1 -1
  65. package/dist/client/sealed-sender.js +47 -0
  66. package/dist/client/sealed-sender.js.map +1 -1
  67. package/dist/client/send-deadline.d.ts +5 -2
  68. package/dist/client/send-deadline.d.ts.map +1 -1
  69. package/dist/client/send-deadline.js +5 -2
  70. package/dist/client/send-deadline.js.map +1 -1
  71. package/dist/client/signal-relay-acceptance.d.ts +3 -2
  72. package/dist/client/signal-relay-acceptance.d.ts.map +1 -1
  73. package/dist/client/signal-relay-acceptance.js.map +1 -1
  74. package/dist/client/signal-relay-protocol.d.ts +92 -18
  75. package/dist/client/signal-relay-protocol.d.ts.map +1 -1
  76. package/dist/client/signal-relay-protocol.js +197 -15
  77. package/dist/client/signal-relay-protocol.js.map +1 -1
  78. package/dist/client/signal-relay-subscription.js +1 -1
  79. package/dist/client/signal-relay-subscription.js.map +1 -1
  80. package/dist/client/signal-service-cipher.d.ts +34 -3
  81. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  82. package/dist/client/signal-service-cipher.js +173 -21
  83. package/dist/client/signal-service-cipher.js.map +1 -1
  84. package/dist/internal/manager/manager.d.ts +5 -0
  85. package/dist/internal/manager/manager.d.ts.map +1 -1
  86. package/dist/internal/manager/manager.js +10 -3
  87. package/dist/internal/manager/manager.js.map +1 -1
  88. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +6 -0
  89. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
  90. package/dist/internal/protocol/zk/groups/group-send-endorsement.js +7 -1
  91. package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
  92. package/dist/internal/session/cipher.d.ts +2 -0
  93. package/dist/internal/session/cipher.d.ts.map +1 -1
  94. package/dist/internal/session/cipher.js +13 -9
  95. package/dist/internal/session/cipher.js.map +1 -1
  96. package/dist/internal/session/session-trust.d.ts +85 -0
  97. package/dist/internal/session/session-trust.d.ts.map +1 -0
  98. package/dist/internal/session/session-trust.js +124 -0
  99. package/dist/internal/session/session-trust.js.map +1 -0
  100. package/dist/internal/session/types.d.ts +7 -0
  101. package/dist/internal/session/types.d.ts.map +1 -1
  102. package/dist/local/store/receive-work.d.ts +5 -5
  103. package/dist/local/store/receive-work.d.ts.map +1 -1
  104. package/dist/local/store/receive-work.js +10 -12
  105. package/dist/local/store/receive-work.js.map +1 -1
  106. package/dist/local/store/reliability.d.ts +21 -4
  107. package/dist/local/store/reliability.d.ts.map +1 -1
  108. package/dist/local/store/reliability.js.map +1 -1
  109. package/dist/types/api.d.ts +16 -9
  110. package/dist/types/api.d.ts.map +1 -1
  111. package/dist/utils/retry.d.ts +1 -0
  112. package/dist/utils/retry.d.ts.map +1 -1
  113. package/dist/utils/retry.js +7 -0
  114. package/dist/utils/retry.js.map +1 -1
  115. package/docs/ASSURANCE.md +5 -5
  116. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,175 @@
1
1
  # Changelog
2
2
 
3
+ ## 14.5.0
4
+
5
+ ### Fixed
6
+
7
+ - **A device trusts its own other devices only with the account identity.**
8
+ Each linked device holds the account identity. Before, a device trusted on
9
+ first use any identity that the Relay served for another device of its own
10
+ account. It pinned that identity, and it sent sync copies and group master
11
+ keys to that device. Now the SDK compares the identity of an own device with
12
+ the local identity of the same type, in constant time. A device with another
13
+ identity gets no session, no sync copy, and no group master key, and the
14
+ store pins nothing for it. The send to the recipient still succeeds, and the
15
+ logger reports an `UntrustedIdentityError` for the device. A PreKeyMessage
16
+ that names an own device with another identity fails with
17
+ `UntrustedIdentityError` before it uses a prekey. Contacts keep trust on
18
+ first use.
19
+ - The SDK no longer calls `isTrustedIdentity` of a custom store for a device of
20
+ the local user.
21
+ - On a Relay that compares device sets, a listed own device with another
22
+ identity stops each own-device sync while the Relay lists it. The sync
23
+ phase of a send stays pending, the logger reports it, and the relay accepts
24
+ no sync copy. The send to the recipient is not affected, and a retry with
25
+ the same `clientMessageId` completes the phase when the Relay no longer
26
+ lists the device. Group key sync, read sync, view-once open sync, media
27
+ attachment delete sync, configuration sync, username state sync, recipient
28
+ username sync, verification state sync, task notification acknowledgment
29
+ sync, and blocked recipients sync fail with `UntrustedIdentityError`, and
30
+ the relay accepts no copy. On a Relay that does not compare device sets,
31
+ these paths skip the device and post to the other own devices.
32
+ - **A stale own pin no longer blocks the real own devices.** A store can hold
33
+ a pin of another identity under the own account: an earlier release pinned
34
+ the identity that a Relay served for an own device, or
35
+ `rotateAccountIdentity` replaced the account identity after the pin. The
36
+ store compares each session commit with that pin, so before, every session
37
+ with a real own device failed. Now, before it stores a session with an own
38
+ device that holds the local identity, the SDK replaces that pin with the
39
+ local identity through `acceptContactIdentityRotationAndDeleteSessions`.
40
+ That call also deletes the sessions with the own devices, which used the
41
+ replaced identity, and the next send starts them again.
42
+ - **`isRetryableError` returns false for `DEVICE_LINK_REQUIRED`.** The Relay
43
+ sends it when an account with a device registers a new identity. The Relay
44
+ sends the same refusal to each repeat, so `withRetry` now gives the error to
45
+ the caller after one attempt. The check reads the error code, not the
46
+ message. The SDK does not retry its own registration. This change affects
47
+ only an application that calls `withRetry` or `isRetryableError` around
48
+ registration.
49
+ - **A replay no longer posts a sealed message with an expired sender
50
+ certificate.** The receiver checks the certificate against the time at
51
+ which the Relay stores the post. Before, a replay posted the stored sealed
52
+ body again, so a body whose certificate had expired arrived, and the
53
+ receiver refused it with no signal to the sender. Now, before each replay
54
+ post, the SDK seals the stored ciphertext again with a current certificate
55
+ when the recorded expiration is at or before the estimated Relay time plus
56
+ 5 minutes, or when the record has no expiration. This applies to direct
57
+ sealed posts, sealed resends, and shared group bodies. The new seal keeps
58
+ the message ID, the operation epoch, and the ciphertext, so the receiver
59
+ sees the same message. A `RETRY_CONFLICT` to the new seal follows the
60
+ existing rule: the Relay holds the same ciphertext under the message ID.
61
+ When the Relay answers `PERIOD_CLOSED` and the certificate expires before a
62
+ repeat can arrive, the one repeat is a new seal.
63
+ - **The SDK uses a sender certificate that expires in less than 24 hours.**
64
+ Concurrent sends share one certificate fetch. The SDK refreshes a
65
+ certificate 1 hour before its expiration, less a random time below 10
66
+ minutes, so many clients do not refresh at the same time. It uses a shorter
67
+ certificate until 5 minutes before its expiration. When a fetched
68
+ certificate expires within those 5 minutes, the SDK waits for it to expire
69
+ and fetches once more. The SDK validates each certificate against the
70
+ estimated Relay time, not the local clock.
71
+ - **A group send renews its endorsements once after the Relay refuses the
72
+ group credential.** The Relay stores nothing on that refusal. The SDK
73
+ clears the cached endorsements of the group, refreshes them once under the
74
+ endorsement lock, and posts the shared body once more. A second refusal
75
+ falls back to identified device posts in `preferred` mode and fails the
76
+ send in `required` mode, as before.
77
+ - **A group send near the end of its endorsements no longer fails.** The
78
+ Relay can end new group send endorsements at a UTC day boundary less than
79
+ 2 hours away. The SDK refuses endorsements with less than 2 hours left, so
80
+ before, each group send in that window failed with a verification error and
81
+ posted nothing. Now the SDK logs a warning, keeps the endorsements that it
82
+ holds, and seals with them until they expire. A group with no valid
83
+ endorsement uses identified device posts in `preferred` mode and fails the
84
+ send in `required` mode.
85
+ - **The Relay protocol offer steps down one version at a time.** Before, a
86
+ refused offer went to version 2 at once. Now each `PROTOCOL_UNSUPPORTED`
87
+ refusal moves the offer one version down, and it never goes below version
88
+ 2. The first version that the SDK offers does not change.
89
+
90
+ #### Store compatibility
91
+
92
+ - Stored sealed device messages and shared group bodies record the signed
93
+ expiration of their sender certificate in the optional field
94
+ `sealedSenderCertificateExpiresAt`. A record that an earlier SDK wrote has
95
+ no value, and the SDK reads it as before. An earlier SDK reads a record with
96
+ the field.
97
+ - A return to SDK 14.4.0 is supported. SDK 14.4.0 posts a stored sealed body
98
+ again without a new seal, so a replay of a body whose sender certificate
99
+ expired can arrive and be refused by the receiver. The 14.4.0 rollback rule
100
+ still applies: do not ship SDK 14.1.0 or earlier to a device after it runs
101
+ SDK 14.4.0 or this release.
102
+
103
+ ## 14.4.0
104
+
105
+ ### Changed
106
+
107
+ - **The SDK speaks protocol version 3 of the OpenE2EE Signal Protocol Relay.**
108
+ Version 3 keeps the behavior of version 2 and uses the Signal Relay names.
109
+ It sends the header `x-signal-relay-protocol: 3`, and the mailbox socket
110
+ offers `signal-relay.v3` with `signal-relay.auth.<token>`. Each device proof
111
+ signs a version 3 label, for example
112
+ `signal-relay-device-authentication-v2\0`. The Relay issues a device token
113
+ with the issuer `signal-relay`, the audience `signal-relay-device`, and the
114
+ claim `signal_relay_scope_id`. A version 3 response names the scope
115
+ `signalRelayScopeId` and the receipts capability `signalRelayReceipts`. The
116
+ SDK reads the earlier names too, and it refuses a response that gives two
117
+ different values.
118
+ - **The SDK falls back to version 2.** When the Relay refuses version 3 with
119
+ `PROTOCOL_UNSUPPORTED`, the client sends the refused request again with
120
+ version 2, and it offers version 2 until it stops. The Relay refuses the
121
+ version before it reads the request, so the refused request had no effect.
122
+ A socket that the Relay closes with 4400 reconnects with version 2 after its
123
+ usual backoff. A client with an explicit protocol version never falls back.
124
+ A Relay that predates version 3 does not refuse version 3 with
125
+ `PROTOCOL_UNSUPPORTED`, so the client does not fall back to version 2.
126
+ Use this release with a Relay that serves version 3.
127
+ - **`HostedSignalProtocolRelayDeviceAuthentication` signs the label of a
128
+ protocol version.** `signChallenge` and `signCertificateRequest` take an
129
+ optional last argument, `protocolVersion`. A call without it signs the
130
+ version 1 label, which the Relay verifies on versions 1 and 2 and on a
131
+ request without a version. An adapter that sends the proof with
132
+ `x-signal-relay-protocol: 3` must pass `3`. An adapter that sends no version
133
+ needs no change.
134
+ - **This release writes the Signal Relay values to the local store.** A new
135
+ receive record holds the origin `'signal-relay'` and the receipt decision
136
+ `signalProtocolRelayOwnsReceipt`. A new Relay delivery status holds the
137
+ source `'signal-relay'`. A hosted record goes to its `signalRelay.<record>.v2:`
138
+ key only. When only the earlier `.v1:` key holds a record, a read copies the
139
+ record to the current key and keeps the earlier key. The SDK still reports
140
+ `'relay'` to the application for `DeliverySource`, `PendingReceive.origin`,
141
+ and `ReceiveExpiredEvent.origin`, as in SDK 14.3.0.
142
+
143
+ #### Store compatibility
144
+
145
+ - A store that SDK 14.0.0 through 14.3.0 wrote opens with this release. This
146
+ release reads the origin `'relay'`, the receipt decision
147
+ `relayOwnsReceipt`, the source `'relay'`, and each `.v1:` key. SDK 15.0.0
148
+ still reads them. A record that an earlier release wrote keeps the origin
149
+ `'relay'` when this release changes it.
150
+ - A return to SDK 14.2.0 or 14.3.0 is supported. Those releases read each
151
+ value that this release writes, and they read the current key of a hosted
152
+ record first.
153
+ - A return to SDK 14.1.0 or earlier is not supported for a store that this
154
+ release wrote. Those releases refuse the origin `'signal-relay'`. They read
155
+ only the `.v1:` key of a hosted record, so they do not find a record that
156
+ this release created, and they read an earlier value of a record that this
157
+ release changed.
158
+ - Do not ship SDK 14.1.0 or earlier to a device after it runs this release.
159
+ To roll back, ship SDK 14.2.0 or 14.3.0. A device that goes back to SDK
160
+ 14.1.0 or earlier can have these failures:
161
+ - Messages that the device received but did not complete can stay
162
+ unprocessed. The receive queue fails each time it reads a stored receive
163
+ with the origin `'signal-relay'`.
164
+ - A device that registered with this release cannot resume its Relay
165
+ connection. The earlier release does not find the device authentication
166
+ key, and the resume fails with `RETAINED_DEVICE_AUTHENTICATION_UNAVAILABLE`.
167
+ - A device-owned identity that this release created is lost. The earlier
168
+ release does not find the key, so it creates a new key. The Relay binds
169
+ an account to that key, so the device gets a new account.
170
+ - A hosted record that this release changed goes back to its earlier
171
+ value. An example is the stored Relay session.
172
+
3
173
  ## 14.3.0
4
174
 
5
175
  ### Changed
package/README.md CHANGED
@@ -35,7 +35,7 @@ The relay never needs message plaintext or device private keys.
35
35
 
36
36
  The OpenE2EE Signal Protocol SDK implements a versioned profile of the published Signal Protocol specifications. It is not affiliated with Signal Messenger and is **not wire-compatible with Signal Messenger or libsignal**. Messages, identities, and safety numbers do not interoperate. See the [notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
37
37
 
38
- Version `14.3.x`. Public APIs and persisted formats follow semantic versioning.
38
+ Version `14.5.x`. Public APIs and persisted formats follow semantic versioning.
39
39
 
40
40
  ## Install
41
41
 
package/SECURITY.md CHANGED
@@ -7,8 +7,8 @@ backports.
7
7
 
8
8
  | Version | Supported |
9
9
  | -------- | ------------------ |
10
- | 14.3.x | :white_check_mark: |
11
- | < 14.3.0 | :x: |
10
+ | 14.5.x | :white_check_mark: |
11
+ | < 14.5.0 | :x: |
12
12
 
13
13
  ## Reporting a Vulnerability
14
14
 
@@ -161,11 +161,14 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
161
161
  subscribeSignalProtocolRelayConnectionState(listener: (state: SignalProtocolRelayConnectionState) => void): Unsubscribe;
162
162
  private signalProtocolRelayUnsubscribe?;
163
163
  /**
164
- * Cached sender certificate for sealed sender.
165
- * Lazily fetched and refreshed one hour before its signed expiration.
164
+ * Cached sender certificate for sealed sender, fetched lazily.
165
+ * `cachedCertificateExpiry` is the estimated Relay time until which the
166
+ * client uses it, not its signed expiration.
166
167
  */
167
168
  private cachedSenderCertificate;
168
169
  private cachedCertificateExpiry;
170
+ /** The certificate fetch that concurrent sends share while it runs. */
171
+ private senderCertificateFetch;
169
172
  /**
170
173
  * Centralized state management for retry/rotation tracking
171
174
  * @see SignalProtocolClientState for state details
@@ -252,13 +255,36 @@ export declare class DefaultSignalProtocolClient implements SignalProtocolClient
252
255
  * Fetch (or return cached) sender certificate for sealed sender.
253
256
  *
254
257
  * Uses the configured certificateProvider or relay.fetchSenderCertificate().
255
- * Validates the fetched certificate and caches it until one hour before its
256
- * signed expiration.
258
+ * Concurrent calls share one fetch. The client validates the certificate
259
+ * and reads its expiration against the estimated Relay time, because the
260
+ * Relay signs the expiration and the receiver checks it against the time
261
+ * at which the Relay stores the post.
262
+ *
263
+ * The client uses a certificate until its expiration minus
264
+ * `SEALED_SENDER_CERTIFICATE_MARGIN_MS` minus a random time below
265
+ * `SEALED_SENDER_CERTIFICATE_JITTER_MS`. It uses a shorter certificate
266
+ * until its expiration minus `SEALED_SENDER_RESEAL_SKEW_MS`. When a fetched
267
+ * certificate expires within that skew, the client waits until it expires
268
+ * and fetches once more.
257
269
  *
258
270
  * @returns Base64-encoded serialized SenderCertificate
259
- * @throws if no certificate provider is available
271
+ * @throws if no certificate provider is available, or if the certificate
272
+ * that the client fetches after the wait also expires within the skew
260
273
  */
261
274
  fetchSenderCertificate(): Promise<string>;
275
+ /**
276
+ * Fetch and validate a certificate, and cache it. Wait once for a
277
+ * certificate that expires within the reseal skew to expire, and fetch a
278
+ * new one after it.
279
+ */
280
+ private fetchUsableSenderCertificate;
281
+ /** Request one sender certificate from the configured provider or the relay. */
282
+ private requestSenderCertificate;
283
+ /**
284
+ * Validate a fetched certificate at `signalRelayNow` against the trust roots and
285
+ * the identity of this device, and return its signed expiration.
286
+ */
287
+ private validatedSenderCertificateExpiry;
262
288
  /**
263
289
  * Get GroupManager, throwing if not configured.
264
290
  */
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../client/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAQH,OAAO,KAAK,EAGV,kCAAkC,EAClC,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAItC,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EAIrB,MAAM,UAAU,CAAC;AAuBlB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAiB,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC1F,OAAO,EAA+B,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AACrE,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,8BAA8B,EAEnC,KAAK,mBAAmB,EAExB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAE/B,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAuC7B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAA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SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpF;IAED;;OAEG;IACG,sBAAsB,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,UAAU,EACnB,cAAc,EAAE,UAAU,GACzB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,QAAQ,GAAG,kBAAkB,CAAA;KAAE,CAAC,CAgBtE;IAMD;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"}
@@ -53,6 +53,7 @@ import { ContentHint } from '../types/messages.js';
53
53
  import { base64ToBytes, bytesToBase64, constantTimeEqual, generateUuidV4 } from '../internal/crypto/index.js';
54
54
  import { deriveGroupSecretParams, getGroupPublicParams } from '../internal/protocol/zk/groups/index.js';
55
55
  import { SERVICE_ID_ACI } from '../internal/protocol/zk/groups/uid-struct.js';
56
+ import { deserializeEndorsementsResponse, MIN_ENDORSEMENT_RESPONSE_LIFETIME_SECONDS, } from '../internal/protocol/zk/groups/group-send-endorsement.js';
56
57
  import { deserializeSenderCertificate, validateSenderCertificate, } from '../internal/protocol/sealed-sender/index.js';
57
58
  import { assertHookName, assertRenamedHooks, callHook, currentHookName, deferHooks, } from './event-hooks.js';
58
59
  import { readRenamedImplementation, readRenamedOption } from '../types/renamed-member.js';
@@ -60,7 +61,8 @@ import { signalRelayProtocolErrorOf } from './device-set-reconciliation.js';
60
61
  import { DeliveryStatusTracker } from './delivery-status.js';
61
62
  import { signalRelayReceiptIntakeOf } from './signal-relay-receipt-intake.js';
62
63
  import { ProtocolAddress } from '../types/address.js';
63
- import { getActiveIdentityTypes, resolveSignalProtocolStrategy, SEALED_SENDER_CERTIFICATE_MARGIN_MS, } from './config.js';
64
+ import { getActiveIdentityTypes, resolveSignalProtocolStrategy, SEALED_SENDER_CERTIFICATE_JITTER_MS, SEALED_SENDER_CERTIFICATE_MARGIN_MS, SEALED_SENDER_RESEAL_SKEW_MS, } from './config.js';
65
+ import { estimateServerTimestamp } from '../server-clock.js';
64
66
  import { resolveSignalProtocolLogger } from '../logger.js';
65
67
  import { SenderKeyManager, } from '../internal/protocol/sender-keys/index.js';
66
68
  import { createDefaultSignalProtocolContentAdapter, } from './content-adapter.js';
@@ -323,11 +325,14 @@ export class DefaultSignalProtocolClient {
323
325
  }
324
326
  signalProtocolRelayUnsubscribe;
325
327
  /**
326
- * Cached sender certificate for sealed sender.
327
- * Lazily fetched and refreshed one hour before its signed expiration.
328
+ * Cached sender certificate for sealed sender, fetched lazily.
329
+ * `cachedCertificateExpiry` is the estimated Relay time until which the
330
+ * client uses it, not its signed expiration.
328
331
  */
329
332
  cachedSenderCertificate = null;
330
333
  cachedCertificateExpiry = 0;
334
+ /** The certificate fetch that concurrent sends share while it runs. */
335
+ senderCertificateFetch;
331
336
  /**
332
337
  * Centralized state management for retry/rotation tracking
333
338
  * @see SignalProtocolClientState for state details
@@ -753,6 +758,19 @@ export class DefaultSignalProtocolClient {
753
758
  });
754
759
  orderedUserIds.push(userId);
755
760
  }
761
+ // The Relay ends the endorsements at the first UTC day boundary at or
762
+ // after the end of the project's period. Near that boundary they have
763
+ // less time than a client accepts. The client then keeps the
764
+ // endorsements that it holds, and uses them until they expire.
765
+ const expiration = deserializeEndorsementsResponse(endorsements).expiration;
766
+ const remaining = expiration - Math.floor(Date.now() / 1000);
767
+ if (remaining < MIN_ENDORSEMENT_RESPONSE_LIFETIME_SECONDS) {
768
+ this.logger.warn('The Relay issued group send endorsements that expire too soon to accept', {
769
+ category: 'E2EE',
770
+ data: { groupId, expiration, remainingSeconds: remaining },
771
+ });
772
+ return false;
773
+ }
756
774
  // 8. Process and cache endorsements
757
775
  await endorsementManager.processAndCacheEndorsements(groupId, endorsements, memberServiceIds, orderedUserIds, selfUserId, secretParams);
758
776
  return true;
@@ -844,36 +862,82 @@ export class DefaultSignalProtocolClient {
844
862
  * Fetch (or return cached) sender certificate for sealed sender.
845
863
  *
846
864
  * Uses the configured certificateProvider or relay.fetchSenderCertificate().
847
- * Validates the fetched certificate and caches it until one hour before its
848
- * signed expiration.
865
+ * Concurrent calls share one fetch. The client validates the certificate
866
+ * and reads its expiration against the estimated Relay time, because the
867
+ * Relay signs the expiration and the receiver checks it against the time
868
+ * at which the Relay stores the post.
869
+ *
870
+ * The client uses a certificate until its expiration minus
871
+ * `SEALED_SENDER_CERTIFICATE_MARGIN_MS` minus a random time below
872
+ * `SEALED_SENDER_CERTIFICATE_JITTER_MS`. It uses a shorter certificate
873
+ * until its expiration minus `SEALED_SENDER_RESEAL_SKEW_MS`. When a fetched
874
+ * certificate expires within that skew, the client waits until it expires
875
+ * and fetches once more.
849
876
  *
850
877
  * @returns Base64-encoded serialized SenderCertificate
851
- * @throws if no certificate provider is available
878
+ * @throws if no certificate provider is available, or if the certificate
879
+ * that the client fetches after the wait also expires within the skew
852
880
  */
853
881
  async fetchSenderCertificate() {
854
- const now = Date.now();
855
- if (this.cachedSenderCertificate && now < this.cachedCertificateExpiry) {
882
+ if (this.cachedSenderCertificate && estimateServerTimestamp() < this.cachedCertificateExpiry) {
856
883
  return this.cachedSenderCertificate;
857
884
  }
885
+ this.senderCertificateFetch ??= this.fetchUsableSenderCertificate().finally(() => {
886
+ this.senderCertificateFetch = undefined;
887
+ });
888
+ return this.senderCertificateFetch;
889
+ }
890
+ /**
891
+ * Fetch and validate a certificate, and cache it. Wait once for a
892
+ * certificate that expires within the reseal skew to expire, and fetch a
893
+ * new one after it.
894
+ */
895
+ async fetchUsableSenderCertificate() {
896
+ this.cachedSenderCertificate = null;
897
+ this.cachedCertificateExpiry = 0;
898
+ for (let attempt = 0;; attempt += 1) {
899
+ const certBase64 = await this.requestSenderCertificate();
900
+ const signalRelayNow = estimateServerTimestamp();
901
+ const expires = await this.validatedSenderCertificateExpiry(certBase64, signalRelayNow);
902
+ const shortUseUntil = expires - SEALED_SENDER_RESEAL_SKEW_MS;
903
+ if (shortUseUntil > signalRelayNow) {
904
+ const refreshAt = expires -
905
+ SEALED_SENDER_CERTIFICATE_MARGIN_MS -
906
+ Math.floor(Math.random() * SEALED_SENDER_CERTIFICATE_JITTER_MS);
907
+ this.cachedSenderCertificate = certBase64;
908
+ this.cachedCertificateExpiry = refreshAt > signalRelayNow ? refreshAt : shortUseUntil;
909
+ return certBase64;
910
+ }
911
+ if (attempt > 0) {
912
+ throw new EncryptionError('The sender certificate expires before a post can reach the Relay', EncryptionErrorCode.INITIALIZATION_FAILED);
913
+ }
914
+ // The Relay can cap a certificate at a period end and issue the next
915
+ // one only after it. The wait is at most the skew.
916
+ await new Promise((resolve) => setTimeout(resolve, expires + 1 - signalRelayNow));
917
+ }
918
+ }
919
+ /** Request one sender certificate from the configured provider or the relay. */
920
+ async requestSenderCertificate() {
858
921
  const sealedSender = this.config.sealedSender;
859
922
  if (!sealedSender || sealedSender.trustRoots.length === 0) {
860
923
  throw new EncryptionError('Sender certificate trust is not configured', EncryptionErrorCode.INITIALIZATION_FAILED);
861
924
  }
862
- // Fetch from configured provider or relay
863
- let certBase64;
864
- if (sealedSender.certificateProvider) {
865
- certBase64 = await sealedSender.certificateProvider();
925
+ if (sealedSender.certificateProvider)
926
+ return sealedSender.certificateProvider();
927
+ if (this.signalProtocolRelay?.fetchSenderCertificate) {
928
+ return this.signalProtocolRelay.fetchSenderCertificate(this.deviceId);
866
929
  }
867
- else if (this.signalProtocolRelay?.fetchSenderCertificate) {
868
- certBase64 = await this.signalProtocolRelay.fetchSenderCertificate(this.deviceId);
869
- }
870
- else {
871
- throw new EncryptionError('No sender certificate provider configured. Set sealedSender.certificateProvider or use a relay that supports fetchSenderCertificate.', EncryptionErrorCode.INITIALIZATION_FAILED);
872
- }
873
- let certificate;
930
+ throw new EncryptionError('No sender certificate provider configured. Set sealedSender.certificateProvider or use a relay that supports fetchSenderCertificate.', EncryptionErrorCode.INITIALIZATION_FAILED);
931
+ }
932
+ /**
933
+ * Validate a fetched certificate at `signalRelayNow` against the trust roots and
934
+ * the identity of this device, and return its signed expiration.
935
+ */
936
+ async validatedSenderCertificateExpiry(certBase64, signalRelayNow) {
937
+ const sealedSender = this.config.sealedSender;
874
938
  try {
875
- certificate = deserializeSenderCertificate(base64ToBytes(certBase64));
876
- await validateSenderCertificate(certificate, sealedSender.trustRoots.map((root) => bytesToBase64(root)), now, {
939
+ const certificate = deserializeSenderCertificate(base64ToBytes(certBase64));
940
+ await validateSenderCertificate(certificate, sealedSender.trustRoots.map((root) => bytesToBase64(root)), signalRelayNow, {
877
941
  expectedRelayScopeId: bytesToBase64(sealedSenderSignalProtocolRelayScopeId(sealedSender)),
878
942
  revokedIssuerKeyIds: sealedSender.revokedIssuerKeyIds,
879
943
  });
@@ -884,20 +948,11 @@ export class DefaultSignalProtocolClient {
884
948
  !constantTimeEqual(base64ToBytes(certificate.senderIdentityKey), base64ToBytes(identity.dhKey.publicKey))) {
885
949
  throw new Error('certificate binding mismatch');
886
950
  }
951
+ return certificate.expires;
887
952
  }
888
953
  catch {
889
954
  throw new EncryptionError('Fetched sender certificate failed client binding validation', EncryptionErrorCode.INVALID_CIPHERTEXT);
890
955
  }
891
- const refreshAt = certificate.expires - SEALED_SENDER_CERTIFICATE_MARGIN_MS;
892
- if (refreshAt > now) {
893
- this.cachedSenderCertificate = certBase64;
894
- this.cachedCertificateExpiry = refreshAt;
895
- }
896
- else {
897
- this.cachedSenderCertificate = null;
898
- this.cachedCertificateExpiry = 0;
899
- }
900
- return certBase64;
901
956
  }
902
957
  /**
903
958
  * Get GroupManager, throwing if not configured.