@open-e2ee/signal-protocol-sdk 0.4.0 → 2.0.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.
- package/CHANGELOG.md +126 -5
- package/COMMERCIAL.md +1 -1
- package/README.md +10 -7
- package/SECURITY.md +2 -2
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/device/README.md +7 -5
- package/dist/client/client.d.ts +3 -2
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +58 -25
- package/dist/client/client.js.map +1 -1
- package/dist/client/config.d.ts +46 -7
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js +2 -2
- package/dist/client/config.js.map +1 -1
- package/dist/client/constants.d.ts +4 -2
- package/dist/client/constants.d.ts.map +1 -1
- package/dist/client/constants.js +4 -2
- package/dist/client/constants.js.map +1 -1
- package/dist/client/group-outbox.d.ts +38 -0
- package/dist/client/group-outbox.d.ts.map +1 -0
- package/dist/client/group-outbox.js +224 -0
- package/dist/client/group-outbox.js.map +1 -0
- package/dist/client/group-sealed-sender.d.ts +28 -0
- package/dist/client/group-sealed-sender.d.ts.map +1 -0
- package/dist/client/group-sealed-sender.js +74 -0
- package/dist/client/group-sealed-sender.js.map +1 -0
- package/dist/client/hosted-connection.d.ts +16 -0
- package/dist/client/hosted-connection.d.ts.map +1 -0
- package/dist/client/hosted-connection.js +255 -0
- package/dist/client/hosted-connection.js.map +1 -0
- package/dist/client/hosted-push.d.ts +57 -0
- package/dist/client/hosted-push.d.ts.map +1 -0
- package/dist/client/hosted-push.js +115 -0
- package/dist/client/hosted-push.js.map +1 -0
- package/dist/client/hosted-transport.d.ts +158 -0
- package/dist/client/hosted-transport.d.ts.map +1 -0
- package/dist/client/hosted-transport.js +926 -0
- package/dist/client/hosted-transport.js.map +1 -0
- package/dist/client/hosted.d.ts +223 -0
- package/dist/client/hosted.d.ts.map +1 -0
- package/dist/client/hosted.js +541 -0
- package/dist/client/hosted.js.map +1 -0
- package/dist/client/index.d.ts +5 -3
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +4 -5
- package/dist/client/messages.js.map +1 -1
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +37 -7
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/{sealed-sender-ops.d.ts → sealed-sender.d.ts} +39 -22
- package/dist/client/sealed-sender.d.ts.map +1 -0
- package/dist/client/sealed-sender.js +296 -0
- package/dist/client/sealed-sender.js.map +1 -0
- package/dist/client/signal-service-cipher.d.ts +23 -26
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +468 -706
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/types.d.ts +18 -3
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/types.js +6 -0
- package/dist/client/types.js.map +1 -1
- package/dist/device/index.d.ts +2 -2
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +1 -1
- package/dist/device/index.js.map +1 -1
- package/dist/device/transfer.d.ts +7 -43
- package/dist/device/transfer.d.ts.map +1 -1
- package/dist/device/transfer.js +31 -150
- package/dist/device/transfer.js.map +1 -1
- package/dist/device/types.d.ts +6 -47
- package/dist/device/types.d.ts.map +1 -1
- package/dist/device/types.js +1 -1
- package/dist/device/types.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +1 -1
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/groups/manager.d.ts +3 -3
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +5 -4
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/certificate.d.ts +10 -4
- package/dist/internal/protocol/sealed-sender/certificate.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/certificate.js +64 -7
- package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.d.ts +34 -47
- package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.js +95 -182
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +49 -64
- package/dist/internal/protocol/sealed-sender/encryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.js +120 -123
- package/dist/internal/protocol/sealed-sender/encryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/index.d.ts +5 -7
- package/dist/internal/protocol/sealed-sender/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/index.js +4 -12
- package/dist/internal/protocol/sealed-sender/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/{v2-helpers.d.ts → multi-recipient-crypto.d.ts} +1 -1
- package/dist/internal/protocol/sealed-sender/multi-recipient-crypto.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/{v2-helpers.js → multi-recipient-crypto.js} +1 -1
- package/dist/internal/protocol/sealed-sender/multi-recipient-crypto.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/{v2-binary.d.ts → multi-recipient-message.d.ts} +3 -2
- package/dist/internal/protocol/sealed-sender/multi-recipient-message.d.ts.map +1 -0
- package/dist/internal/protocol/sealed-sender/{v2-binary.js → multi-recipient-message.js} +16 -8
- package/dist/internal/protocol/sealed-sender/multi-recipient-message.js.map +1 -0
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +3 -0
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +25 -2
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +11 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.js +13 -1
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.d.ts +20 -135
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.js +15 -6
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +22 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +39 -4
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/braid-serialize.js +1 -1
- package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +4 -4
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
- package/dist/internal/protocol/zk/groups/index.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/index.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/index.js +1 -1
- package/dist/internal/protocol/zk/groups/index.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +37 -12
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-credential.js +104 -31
- package/dist/internal/protocol/zk/groups/profile-key-credential.js.map +1 -1
- package/dist/local/store/expo/adapter.d.ts +1 -0
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +3 -0
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/key-storage.d.ts +1 -0
- package/dist/local/store/expo/key-storage.d.ts.map +1 -1
- package/dist/local/store/expo/key-storage.js +4 -0
- package/dist/local/store/expo/key-storage.js.map +1 -1
- package/dist/local/store/memory/adapter.d.ts +1 -0
- package/dist/local/store/memory/adapter.d.ts.map +1 -1
- package/dist/local/store/memory/adapter.js +4 -0
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/node/adapter.d.ts +1 -0
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +3 -0
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/database.d.ts +1 -0
- package/dist/local/store/node/database.d.ts.map +1 -1
- package/dist/local/store/node/database.js +5 -0
- package/dist/local/store/node/database.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +1 -0
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +4 -0
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/reference-backend.js +1 -1
- package/dist/local/store/react-native/reference-backend.js.map +1 -1
- package/dist/local/store/reliability.d.ts +63 -0
- package/dist/local/store/reliability.d.ts.map +1 -0
- package/dist/local/store/reliability.js +219 -0
- package/dist/local/store/reliability.js.map +1 -0
- package/dist/local/store/web/adapter.d.ts +1 -0
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +5 -0
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +7 -4
- package/dist/media/index.js.map +1 -1
- package/dist/remote/object-store/convex-r2/server.d.ts +4 -2
- package/dist/remote/object-store/convex-r2/server.d.ts.map +1 -1
- package/dist/remote/object-store/convex-r2/server.js +8 -0
- package/dist/remote/object-store/convex-r2/server.js.map +1 -1
- package/dist/remote/object-store/convex-r2/storage.d.ts +5 -1
- package/dist/remote/object-store/convex-r2/storage.d.ts.map +1 -1
- package/dist/remote/object-store/convex-r2/storage.js +1 -0
- package/dist/remote/object-store/convex-r2/storage.js.map +1 -1
- package/dist/remote/object-store/types.d.ts +2 -0
- package/dist/remote/object-store/types.d.ts.map +1 -1
- package/dist/remote/object-store/validation.d.ts.map +1 -1
- package/dist/remote/object-store/validation.js +3 -0
- package/dist/remote/object-store/validation.js.map +1 -1
- package/dist/remote/relay/convex/backend.d.ts +7 -18
- package/dist/remote/relay/convex/backend.d.ts.map +1 -1
- package/dist/remote/relay/convex/backend.js +15 -24
- package/dist/remote/relay/convex/backend.js.map +1 -1
- package/dist/remote/relay/convex/component/_generated/component.d.ts +10 -18
- package/dist/remote/relay/convex/component/_generated/component.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/certificates.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/certificates.js +14 -5
- package/dist/remote/relay/convex/component/certificates.js.map +1 -1
- package/dist/remote/relay/convex/component/messages.d.ts +3 -17
- package/dist/remote/relay/convex/component/messages.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/messages.js +28 -56
- package/dist/remote/relay/convex/component/messages.js.map +1 -1
- package/dist/remote/relay/convex/component/schema.d.ts +6 -6
- package/dist/remote/relay/convex/component/schema.js +2 -2
- package/dist/remote/relay/convex/component/schema.js.map +1 -1
- package/dist/remote/relay/convex/component/zkAuth.d.ts +7 -1
- package/dist/remote/relay/convex/component/zkAuth.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/zkAuth.js +29 -14
- package/dist/remote/relay/convex/component/zkAuth.js.map +1 -1
- package/dist/remote/relay/convex/relay.d.ts +3 -6
- package/dist/remote/relay/convex/relay.d.ts.map +1 -1
- package/dist/remote/relay/convex/relay.js +23 -50
- package/dist/remote/relay/convex/relay.js.map +1 -1
- package/dist/remote/relay/index.d.ts +1 -1
- package/dist/remote/relay/index.d.ts.map +1 -1
- package/dist/remote/relay/index.js.map +1 -1
- package/dist/remote/relay/memory/adapter.d.ts +5 -11
- package/dist/remote/relay/memory/adapter.d.ts.map +1 -1
- package/dist/remote/relay/memory/adapter.js +41 -34
- package/dist/remote/relay/memory/adapter.js.map +1 -1
- package/dist/remote/relay/types.d.ts +19 -29
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +2 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +8 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +9 -2
- package/dist/types/errors.js.map +1 -1
- package/dist/types/protocol-config.d.ts +1 -1
- package/dist/username/link.d.ts.map +1 -1
- package/dist/username/link.js +1 -1
- package/dist/username/link.js.map +1 -1
- package/docs/ASSURANCE.md +5 -5
- package/docs/DEVIATIONS.md +32 -61
- package/docs/GETTING_STARTED.md +7 -0
- package/docs/SECURITY.md +6 -0
- package/package.json +2 -2
- package/remote/relay/convex/component/README.md +28 -24
- package/scripts/oe-groups.mjs +5 -1
- package/dist/client/sealed-sender-ops.d.ts.map +0 -1
- package/dist/client/sealed-sender-ops.js +0 -203
- package/dist/client/sealed-sender-ops.js.map +0 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts +0 -46
- package/dist/internal/protocol/sealed-sender/decryption-v2.d.ts.map +0 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +0 -198
- package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +0 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts +0 -56
- package/dist/internal/protocol/sealed-sender/encryption-v2.d.ts.map +0 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +0 -163
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +0 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.d.ts.map +0 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.js.map +0 -1
- package/dist/internal/protocol/sealed-sender/v2-helpers.d.ts.map +0 -1
- package/dist/internal/protocol/sealed-sender/v2-helpers.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,128 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
- Six Jazzer.js targets run for 150 seconds each on Ubuntu 24.04.
|
|
6
|
+
The previous runner selected coverage reporting instead of fuzzing.
|
|
7
|
+
|
|
8
|
+
- **Hosted control messages accept an omitted send identifier.**
|
|
9
|
+
One generated UUID survives token retries.
|
|
10
|
+
|
|
11
|
+
- **Explicit account recovery bypasses stored sessions.**
|
|
12
|
+
The SDK requests a recovery assertion.
|
|
13
|
+
|
|
14
|
+
- **Update the Noble dependencies.** Ciphers, curves, and hashes use 2.4.0.
|
|
15
|
+
Post-quantum uses 0.7.1.
|
|
16
|
+
|
|
17
|
+
- **Breaking: Hosted Relay setup now uses one environment-scoped public
|
|
18
|
+
connection URL.** The SDK resolves the exact protocol endpoint and
|
|
19
|
+
publishable key from that URL, rejects project or environment mismatches
|
|
20
|
+
before it creates identity state, and supports the non-streaming Fetch
|
|
21
|
+
responses used by React Native and Expo. Applications no longer select a
|
|
22
|
+
Relay hostname or pair it with a second public value.
|
|
23
|
+
|
|
24
|
+
- **Hosted encrypted attachment uploads preserve broker-signed headers.** The
|
|
25
|
+
default Fetch adapter no longer adds a second case-variant `Content-Type`
|
|
26
|
+
header that can invalidate a presigned upload request.
|
|
27
|
+
|
|
28
|
+
- **Breaking: the hosted client now owns its authenticated Relay transport.**
|
|
29
|
+
Applications supply one environment-scoped Relay URL, local storage, and an
|
|
30
|
+
identity-assertion callback. The SDK registers or resumes the device, renews
|
|
31
|
+
short-lived tokens with device-key proof, maintains prekeys, and performs
|
|
32
|
+
direct delivery, mailbox, push, and encrypted-object operations without
|
|
33
|
+
application-supplied hosted adapters. Encrypted-object upload requests now
|
|
34
|
+
require the SHA-256 digest of the exact bytes.
|
|
35
|
+
|
|
36
|
+
- **Breaking: Managed Relay adapters no longer accept certificate roots.** The
|
|
37
|
+
SDK compiles separate customer Development, customer Production, and internal
|
|
38
|
+
Staging fixture roots. It selects one profile from the exact
|
|
39
|
+
environment-scoped connection origin. Bootstrap data and application adapters
|
|
40
|
+
cannot replace hosted trust. Self-hosted Relay trust remains explicit and
|
|
41
|
+
separate.
|
|
42
|
+
|
|
43
|
+
- **Hosted Relay push registration now declares the device platform and one
|
|
44
|
+
authorized notification profile.** Android and Web registrations accept
|
|
45
|
+
background wakes or generic visible alerts. iOS also accepts the
|
|
46
|
+
Notification Service Extension profile. The SDK rejects invalid
|
|
47
|
+
provider-platform pairs before transport. Apple notification filtering stays
|
|
48
|
+
unavailable until signed physical-device verification passes. Push remains a
|
|
49
|
+
best-effort wake; authenticated Relay mailbox pull remains delivery.
|
|
50
|
+
|
|
51
|
+
- **Breaking: Relay envelopes use one required delivery class.**
|
|
52
|
+
`user-visible` persists and can request a generic alert, `background-sync`
|
|
53
|
+
persists without a visible alert, and `ephemeral` is online-only and never
|
|
54
|
+
enters an offline mailbox. The SDK infers the class for standard chat work.
|
|
55
|
+
The independent `urgent` and `ephemeral` booleans no longer exist. Relay
|
|
56
|
+
adapters that cannot prove live transient acceptance reject ephemeral work
|
|
57
|
+
instead of reporting false delivery or retaining typing state.
|
|
58
|
+
|
|
59
|
+
Convex validates stored component documents before it deploys the new
|
|
60
|
+
schema. Every 1.x `messages` row lacks the required class, so a 2.0 deploy
|
|
61
|
+
requires an empty component mailbox. Stop sends and let retention drain the
|
|
62
|
+
table, or clear it before deployment. This is a deliberate clean prelaunch
|
|
63
|
+
replacement; 2.0 does not parse or backfill the obsolete envelope shape.
|
|
64
|
+
See "Upgrading" in the Convex component README.
|
|
65
|
+
|
|
66
|
+
## 1.0.0
|
|
67
|
+
|
|
68
|
+
- **Hosted Relay supports data-only push wake hints across Expo, APNs, FCM,
|
|
69
|
+
and Web Push.** The SDK registers one destination for the authenticated
|
|
70
|
+
device and derives no account, device, scope, or generation identifiers from
|
|
71
|
+
application input. A wake starts an authenticated durable-mailbox pull.
|
|
72
|
+
The SDK acknowledges only envelopes that it processes successfully, and the
|
|
73
|
+
same pull remains available when push delivery is unavailable.
|
|
74
|
+
|
|
75
|
+
- **Hosted Relay now supports provider migration, recovery progress, and
|
|
76
|
+
managed device linking.** Migration assertions use the existing purpose-aware
|
|
77
|
+
identity callback with typed source and target roles. Recovery reports typed
|
|
78
|
+
phases while Relay remains the account authority. Managed linking requires a
|
|
79
|
+
provisioned account identity. It also requires distinct active and new
|
|
80
|
+
device-auth keys. It sends no ratchet, sender-key, skipped-key, or outbox
|
|
81
|
+
state.
|
|
82
|
+
|
|
83
|
+
- **Breaking: sends use a durable exact-ciphertext outbox and always return a
|
|
84
|
+
logical-send identifier.** `SendResult.clientMessageId` is required. The SDK
|
|
85
|
+
generates it when `SendOptions.clientMessageId` is absent, exposes it on send
|
|
86
|
+
errors through `isOutgoingMessageError`, and replays the persisted encrypted
|
|
87
|
+
transmission after an unknown Relay result. Receivers retain processed Relay
|
|
88
|
+
envelope identifiers for 30 days and acknowledge duplicates without running
|
|
89
|
+
protocol decryption again. Automatic sender-key rotation also persists its
|
|
90
|
+
pairwise distribution messages before group transport. Custom
|
|
91
|
+
`ISignalProtocolLocalStore` implementations must now implement
|
|
92
|
+
`deleteMetadata` for bounded outbox and deduplication retention.
|
|
93
|
+
|
|
94
|
+
- **Breaking: linked-device backup format 2 transfers account identity only.**
|
|
95
|
+
A linked device generates fresh prekeys and establishes independent sessions.
|
|
96
|
+
The SDK rejects old or extended backup shapes that carry prekeys, ratchet
|
|
97
|
+
sessions, sender-key state, message state, or outbox state.
|
|
98
|
+
|
|
99
|
+
- **Profile-key credential issuance is blinded.** The authenticated issuer
|
|
100
|
+
receives an ACI-bound blinded request, not the raw profile key. The client
|
|
101
|
+
unblinds and verifies the response before it creates a group presentation.
|
|
102
|
+
|
|
103
|
+
- **Breaking: sealed-sender delivery now uses one multi-recipient wire format
|
|
104
|
+
for direct and group sends.** The direct path supports one recipient through
|
|
105
|
+
the same format, and the SDK rejects the retired V1 wire format. Hosted Relay
|
|
106
|
+
adapters no longer implement the V1 send method. `preferred` delivery falls
|
|
107
|
+
back to identified delivery only after an anonymous authorization rejection;
|
|
108
|
+
other anonymous-delivery failures do not change the privacy route.
|
|
109
|
+
|
|
3
110
|
## 0.4.0
|
|
4
111
|
|
|
112
|
+
- **Breaking: sender certificates now bind to Relay scope and issuer
|
|
113
|
+
validity.** The signed sender certificate requires an opaque 16-byte scope.
|
|
114
|
+
The signed server certificate requires its validity interval. Recipients
|
|
115
|
+
reject the old certificate shape. The new hosted bootstrap accepts a
|
|
116
|
+
publishable key and identity assertion callback. It then uses the account,
|
|
117
|
+
device, and scope bindings that Relay returns. Identified delivery does not
|
|
118
|
+
require a sender certificate.
|
|
119
|
+
|
|
120
|
+
- **Hosted Relay bootstrap now registers a complete EC and ML-KEM prekey
|
|
121
|
+
inventory.** The SDK creates and stores signed, last-resort, and one-time
|
|
122
|
+
prekeys before bootstrap. It sends only public material. Exact retries reuse
|
|
123
|
+
the original operation and public registration snapshot, so a restarted
|
|
124
|
+
client cannot publish an old one-time prekey as a new registration.
|
|
125
|
+
|
|
5
126
|
- **The README now provides a runnable encrypted round trip and a current demo.**
|
|
6
127
|
The quickstart exercises two SDK clients through the in-memory relay. The new
|
|
7
128
|
recording shows the same two-device and relay flow as the live desktop and
|
|
@@ -142,7 +263,7 @@
|
|
|
142
263
|
whether the operation produced the epoch secret. Braid mode spreads one
|
|
143
264
|
ML-KEM key agreement across many messages, and until now the chunk counts
|
|
144
265
|
lived entirely inside the state machine, so a host had no way to show or log
|
|
145
|
-
how far a ratchet had
|
|
266
|
+
how far a ratchet had traveled. A direct-mode session never raises the
|
|
146
267
|
callback. The hook is guarded exactly as `onProtocolSelected` is: a consumer
|
|
147
268
|
that throws is logged and the protocol path continues.
|
|
148
269
|
|
|
@@ -209,7 +330,7 @@
|
|
|
209
330
|
install one. An epoch advance for receiving alone installs a zeroed send
|
|
210
331
|
chain key. Pruning writes one over each retired send chain. Deriving from
|
|
211
332
|
either would key a message from a known constant. No production path reached
|
|
212
|
-
that state, so the check is
|
|
333
|
+
that state, so the check is defense in depth.
|
|
213
334
|
|
|
214
335
|
- **The unused SPQR binary header codec is gone.** `serializeSPQRHeaderBinary`
|
|
215
336
|
and `deserializeSPQRHeaderBinary` emitted an unversioned framing. No
|
|
@@ -980,7 +1101,7 @@
|
|
|
980
1101
|
matching the `Type` enum of the reference implementation's
|
|
981
1102
|
`UnidentifiedSenderMessage.Message` (`PREKEY_MESSAGE`, `MESSAGE`,
|
|
982
1103
|
`SENDERKEY_MESSAGE`, `PLAINTEXT_CONTENT`), and `SealOptions.groupId` —
|
|
983
|
-
encrypted, never populated by the send path — is removed in
|
|
1104
|
+
encrypted, never populated by the send path — is removed in favor of
|
|
984
1105
|
`contentType`. This is a wire-format change to sealed sender for both V1 and
|
|
985
1106
|
V2.
|
|
986
1107
|
|
|
@@ -1061,7 +1182,7 @@
|
|
|
1061
1182
|
|
|
1062
1183
|
- **Sealed sender envelope parsing is now canonical and validated.** Both the
|
|
1063
1184
|
V1 and V2 inner-envelope parsers accepted a payload with trailing bytes, an
|
|
1064
|
-
|
|
1185
|
+
unrecognized content-type byte, a truncated varint, or a missing content
|
|
1065
1186
|
hint. Parsing runs after authentication, so none of these was reachable by an
|
|
1066
1187
|
attacker, but two distinct byte strings could parse to identical content and
|
|
1067
1188
|
an unknown content type fell through to a routing default. The parsers now
|
|
@@ -1235,7 +1356,7 @@
|
|
|
1235
1356
|
|
|
1236
1357
|
- **Sealed sender can now be enabled.** `oe-groups trust-root` exports the
|
|
1237
1358
|
Ed25519 sender-certificate root alongside the group trust root, printing both
|
|
1238
|
-
|
|
1359
|
+
labeled (`group trust root:` / `sealed sender trust root:`). Previously only
|
|
1239
1360
|
the group root was printed, so there was no supported way to obtain the value
|
|
1240
1361
|
clients pin in `sealedSender.trustRoots`; inbound sealed-sender validation
|
|
1241
1362
|
stayed disabled and every send fell back to identified delivery, disclosing
|
package/COMMERCIAL.md
CHANGED
|
@@ -43,7 +43,7 @@ Growth and Enterprise start with an email.
|
|
|
43
43
|
|
|
44
44
|
## How buying works
|
|
45
45
|
|
|
46
|
-
1. Read the
|
|
46
|
+
1. Read the [Commercial Terms](https://open-e2ee.dev/legal/terms).
|
|
47
47
|
2. Startup tier: purchase directly in the [console](https://console.open-e2ee.dev)
|
|
48
48
|
and download your signed license record immediately.
|
|
49
49
|
3. Growth, Enterprise, or anything unusual (OEM, source escrow, security
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<img src="https://raw.githubusercontent.com/open-e2ee/design/v0.
|
|
1
|
+
<img src="https://raw.githubusercontent.com/open-e2ee/design/v0.21.2/brand/generated/open-e2ee-mark-adaptive.svg" alt="OpenE2EE" width="72" height="72">
|
|
2
2
|
|
|
3
3
|
# OpenE2EE Signal Protocol SDK
|
|
4
4
|
|
|
@@ -13,24 +13,27 @@
|
|
|
13
13
|
[Website](https://open-e2ee.dev) ·
|
|
14
14
|
[Documentation](https://docs.open-e2ee.dev) ·
|
|
15
15
|
[Live demo](https://open-e2ee.dev/#demo) ·
|
|
16
|
+
[OpenE2EE Relay](https://open-e2ee.dev/relay) ·
|
|
16
17
|
[API reference](https://docs.open-e2ee.dev/reference/api) ·
|
|
17
18
|
[Security](./SECURITY.md)
|
|
18
19
|
|
|
19
20
|
- **One TypeScript package.** Run the same protocol code in Expo, React Native, modern browsers, and Node.
|
|
20
21
|
- **Post-quantum by default.** The default policy requires PQXDH session establishment and the ML-KEM Braid post-quantum ratchet. Required post-quantum operations fail closed.
|
|
21
22
|
- **Messaging primitives included.** Build multi-device messaging, groups, sealed sender, encrypted attachments, and safety-number verification.
|
|
22
|
-
- **
|
|
23
|
+
- **Explicit infrastructure boundaries.** Your application owns device-local storage. Supply your own relay adapter or use [OpenE2EE Relay](https://open-e2ee.dev/relay) for managed encrypted delivery. The relay never needs message plaintext or device private keys.
|
|
23
24
|
- **AGPLv3, or a commercial license.** Proprietary applications that cannot meet AGPLv3 obligations can use a [commercial license](./COMMERCIAL.md).
|
|
24
25
|
|
|
25
26
|
The protocol code ships without a native crypto module or platform crypto binary. The Expo SQLCipher store requires a development build and native project configuration.
|
|
26
27
|
|
|
27
|
-
Version `0.
|
|
28
|
+
Version `2.0.x`. Public APIs and persisted formats follow semantic versioning.
|
|
28
29
|
|
|
29
30
|
OpenE2EE 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. Read the [full notice](./NOTICE) and [documented deviations](./docs/DEVIATIONS.md).
|
|
30
31
|
|
|
31
32
|
## See an encrypted round trip
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
Press play for the complete four-message run: device setup, session establishment, encrypted relay delivery, and on-device decryption.
|
|
35
|
+
|
|
36
|
+
https://github.com/user-attachments/assets/d8002bc3-c037-41b6-8f48-4008f2d49e6c
|
|
34
37
|
|
|
35
38
|
The [live demo](https://open-e2ee.dev/#demo) runs two SDK clients against an in-memory relay. On desktop, type a message and inspect the envelope, ratchets, relay mailbox, and decrypted result. On mobile, the same protocol run replays at reading pace. The protocol and cryptography are real. The example simulates infrastructure in memory. Displayed timings exclude network time.
|
|
36
39
|
|
|
@@ -87,11 +90,11 @@ alice: hello
|
|
|
87
90
|
|
|
88
91
|
The client factory creates or loads each device identity. When given a relay, it also publishes the public prekey bundle. `send()` fetches Bob's bundle and starts the required post-quantum session. It then gives ciphertext plus routing metadata to the relay. Bob's subscription retrieves and decrypts the envelope on his device.
|
|
89
92
|
|
|
90
|
-
The in-memory store loses identities, sessions, and ratchet state on restart. The in-memory relay has no authentication, authorization, or durable storage. Do not ship either adapter. Continue with the [
|
|
93
|
+
The in-memory store loses identities, sessions, and ratchet state on restart. The in-memory relay has no authentication, authorization, or durable storage. Do not ship either adapter. Continue with the [documentation quickstart](https://docs.open-e2ee.dev/start/quickstart), which explains key custody, relay metadata, prekey replenishment, additional devices, and recovery policy.
|
|
91
94
|
|
|
92
95
|
## Move to production storage
|
|
93
96
|
|
|
94
|
-
Choose the device-local store for your runtime
|
|
97
|
+
Choose the device-local store for your runtime. Then supply a relay that authenticates each device and implements your product's access policy, or use [OpenE2EE Relay](https://open-e2ee.dev/relay) as the managed delivery path. The SDK does not require the managed service. [Review Relay plans and exact meter definitions.](https://open-e2ee.dev/relay/pricing)
|
|
95
98
|
|
|
96
99
|
| Runtime | Storage path | Deployment boundary |
|
|
97
100
|
|---|---|---|
|
|
@@ -112,7 +115,7 @@ Report a suspected vulnerability privately through the process in [SECURITY](./S
|
|
|
112
115
|
|
|
113
116
|
## Why developers choose this SDK
|
|
114
117
|
|
|
115
|
-
The SDK gives TypeScript applications one maintained package for required post-quantum session establishment and ratcheting, multi-device messaging, groups, sealed sender, attachments, and safety numbers. It keeps protocol state on the device
|
|
118
|
+
The SDK gives TypeScript applications one maintained package for required post-quantum session establishment and ratcheting, multi-device messaging, groups, sealed sender, attachments, and safety numbers. It keeps protocol state on the device. Applications can operate a relay adapter or use OpenE2EE Relay for managed delivery.
|
|
116
119
|
|
|
117
120
|
[Compare maintained alternatives and their limits.](https://open-e2ee.dev/product/#how-it-compares)
|
|
118
121
|
|
package/SECURITY.md
CHANGED
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
3
|
This file records third-party source distributed with or adapted by the
|
|
4
|
-
OpenE2EE SDK. Dependency distributions may contain additional notices.
|
|
4
|
+
OpenE2EE Signal Protocol SDK. Dependency distributions may contain additional notices.
|
|
5
5
|
|
|
6
6
|
## @noble/post-quantum
|
|
7
7
|
|
package/device/README.md
CHANGED
|
@@ -14,8 +14,9 @@ The two onboarding operations are deliberately separate:
|
|
|
14
14
|
|
|
15
15
|
- **Provisioning** adds a linked device. It transfers account identity material
|
|
16
16
|
and optional account metadata, but not existing sessions or message history.
|
|
17
|
-
- **Transfer**
|
|
18
|
-
|
|
17
|
+
- **Transfer** sends the same identity-only provisioning bundle over an
|
|
18
|
+
application-owned encrypted device-to-device channel. The receiving device
|
|
19
|
+
generates fresh prekeys and sessions after import.
|
|
19
20
|
|
|
20
21
|
The primary device uses ID `1`. The backend allocates linked device IDs from
|
|
21
22
|
`2` through `5`. A client must not choose its own linked-device ID.
|
|
@@ -147,7 +148,7 @@ const receiving = await prepareNewDeviceTransfer();
|
|
|
147
148
|
await appQr.show(receiving.qrCode);
|
|
148
149
|
|
|
149
150
|
const sending = await prepareOldDeviceTransferWithBackup(backupStorage);
|
|
150
|
-
const backup = await sending.getBackup(
|
|
151
|
+
const backup = await sending.getBackup();
|
|
151
152
|
```
|
|
152
153
|
|
|
153
154
|
The application owns transport selection, peer confirmation, progress UI,
|
|
@@ -159,8 +160,9 @@ durably restores the backup.
|
|
|
159
160
|
|
|
160
161
|
- Provisioning sessions expire after five minutes.
|
|
161
162
|
- Ephemeral ECDH keys derive the provisioning/transfer encryption keys.
|
|
162
|
-
- The SDK encrypts identity
|
|
163
|
-
|
|
163
|
+
- The SDK encrypts identity material before it reaches a relay or transport.
|
|
164
|
+
- Linked-device bundles never contain signed prekeys, one-time prekeys,
|
|
165
|
+
ratchet sessions, sender-key state, message state, or retry outbox state.
|
|
164
166
|
- The QR channel authenticates the session only to the extent that the
|
|
165
167
|
application protects what the user scans or shares.
|
|
166
168
|
- The SDK encrypts device names for backend storage.
|
package/dist/client/client.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ export declare class SignalProtocolClient implements ISignalProtocolClient {
|
|
|
116
116
|
private retryUnsubscribe?;
|
|
117
117
|
/**
|
|
118
118
|
* Cached sender certificate for sealed sender.
|
|
119
|
-
* Lazily fetched and refreshed
|
|
119
|
+
* Lazily fetched and refreshed one hour before its signed expiration.
|
|
120
120
|
*/
|
|
121
121
|
private cachedSenderCertificate;
|
|
122
122
|
private cachedCertificateExpiry;
|
|
@@ -149,7 +149,8 @@ export declare class SignalProtocolClient implements ISignalProtocolClient {
|
|
|
149
149
|
* Fetch (or return cached) sender certificate for sealed sender.
|
|
150
150
|
*
|
|
151
151
|
* Uses the configured certificateProvider or relay.fetchSenderCertificate().
|
|
152
|
-
*
|
|
152
|
+
* Validates the fetched certificate and caches it until one hour before its
|
|
153
|
+
* signed expiration.
|
|
153
154
|
*
|
|
154
155
|
* @returns Base64-encoded serialized SenderCertificate
|
|
155
156
|
* @throws if no certificate provider is available
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../client/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,KAAK,EACV,qBAAqB,EAItB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAkB,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAA+B,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,0BAA0B,EAE/B,KAAK,8BAA8B,EAGnC,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAE/B,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,OAAO,KAAK,EACV,yBAAyB,EAEzB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAe,YAAY,EAAE,MAAM,SAAS,CAAC;AAMpD,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AAIvC,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,UAAU,CAAC;AAClB,OAAO,EAA0C,KAAK,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAIjG,OAAO,K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,CAAC,IAAI,CAAC,CAEf;IAED;;OAEG;IACG,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,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,CAEtE;IAMD;;OAEG;IACH,OAAO,CAAC,cAAc;CAQvB"}
|
package/dist/client/client.js
CHANGED
|
@@ -48,7 +48,7 @@ import { SignalProtocolManager } from '../internal/manager/index.js';
|
|
|
48
48
|
import { SesameManager } from '../internal/sesame/index.js';
|
|
49
49
|
import { createCompositeIdentityV1 } from '../keys/identity.js';
|
|
50
50
|
import { EncryptionError, EncryptionErrorCode } from '../types/index.js';
|
|
51
|
-
import { base64ToBytes } from '../internal/crypto/index.js';
|
|
51
|
+
import { base64ToBytes, bytesToBase64, constantTimeEqual } from '../internal/crypto/index.js';
|
|
52
52
|
import { ProtocolAddress } from '../types/address.js';
|
|
53
53
|
import { getActiveIdentityTypes, resolveSignalProtocolStrategy, } from './config.js';
|
|
54
54
|
import { resolveSignalProtocolLogger } from '../logger.js';
|
|
@@ -74,6 +74,7 @@ import { StorageBackedSignalProtocolClientMedia } from './media.js';
|
|
|
74
74
|
// Group state (Signal Private Group System)
|
|
75
75
|
import { GroupManager, decodeGroupTrustRoot } from '../internal/groups/index.js';
|
|
76
76
|
import { SignalProtocolGroupStateStore } from '../internal/groups/sdk-store.js';
|
|
77
|
+
import { deriveAccessKey } from '../internal/protocol/sealed-sender/delivery-token.js';
|
|
77
78
|
export { IMPLICIT_ENVELOPE_TYPES } from './constants.js';
|
|
78
79
|
/**
|
|
79
80
|
* Module-level lock for storage initialization.
|
|
@@ -157,7 +158,7 @@ export class SignalProtocolClient {
|
|
|
157
158
|
retryUnsubscribe;
|
|
158
159
|
/**
|
|
159
160
|
* Cached sender certificate for sealed sender.
|
|
160
|
-
* Lazily fetched and refreshed
|
|
161
|
+
* Lazily fetched and refreshed one hour before its signed expiration.
|
|
161
162
|
*/
|
|
162
163
|
cachedSenderCertificate = null;
|
|
163
164
|
cachedCertificateExpiry = 0;
|
|
@@ -223,20 +224,20 @@ export class SignalProtocolClient {
|
|
|
223
224
|
const capability = this.relay?.groupServer;
|
|
224
225
|
const server = config.groups.server ?? capability?.server;
|
|
225
226
|
const issueCredential = config.groups.issueCredential ??
|
|
226
|
-
(capability
|
|
227
|
-
? () => capability.issueAuthCredential(this._userId)
|
|
228
|
-
: undefined);
|
|
227
|
+
(capability ? () => capability.issueAuthCredential(this._userId) : undefined);
|
|
229
228
|
const issueProfileKeyCredential = config.groups.issueProfileKeyCredential ??
|
|
230
229
|
(capability
|
|
231
|
-
? () =>
|
|
230
|
+
? async (request) => {
|
|
231
|
+
const accessKey = await deriveAccessKey(config.groups.profileKey);
|
|
232
|
+
await capability.setUnidentifiedAccessKey(this._userId, accessKey);
|
|
233
|
+
return capability.issueProfileKeyCredential(this._userId, request);
|
|
234
|
+
}
|
|
232
235
|
: undefined);
|
|
233
236
|
if (!server || !issueCredential || !issueProfileKeyCredential) {
|
|
234
237
|
const missing = [
|
|
235
238
|
!server ? 'server' : undefined,
|
|
236
239
|
!issueCredential ? 'issueCredential' : undefined,
|
|
237
|
-
!issueProfileKeyCredential
|
|
238
|
-
? 'issueProfileKeyCredential'
|
|
239
|
-
: undefined,
|
|
240
|
+
!issueProfileKeyCredential ? 'issueProfileKeyCredential' : undefined,
|
|
240
241
|
].filter((value) => value !== undefined);
|
|
241
242
|
throw new Error(`Groups require the relay.groupServer capability or explicit overrides; missing: ${missing.join(', ')}`);
|
|
242
243
|
}
|
|
@@ -244,9 +245,7 @@ export class SignalProtocolClient {
|
|
|
244
245
|
throw new Error('Groups require the client identity ACI; set identity.aci');
|
|
245
246
|
}
|
|
246
247
|
const trustRoot = decodeGroupTrustRoot(config.groups.trustRoot);
|
|
247
|
-
this.groupStore =
|
|
248
|
-
config.groups.store ??
|
|
249
|
-
new SignalProtocolGroupStateStore(this._storage);
|
|
248
|
+
this.groupStore = config.groups.store ?? new SignalProtocolGroupStateStore(this._storage);
|
|
250
249
|
const endorsementManager = config.groups.endorsementManager;
|
|
251
250
|
endorsementManager?.assertEndorsementRootPublicKey(trustRoot.endorsementRootPublicKey);
|
|
252
251
|
this.groupManager = new GroupManager({
|
|
@@ -332,6 +331,12 @@ export class SignalProtocolClient {
|
|
|
332
331
|
}
|
|
333
332
|
});
|
|
334
333
|
}
|
|
334
|
+
if (config?.sealedSender) {
|
|
335
|
+
this.cipher.setSealedSenderDeliveryMode(config.sealedSender.deliveryMode ?? 'preferred');
|
|
336
|
+
if (config.sealedSender.onIdentifiedFallback) {
|
|
337
|
+
this.cipher.setSealedSenderIdentifiedFallback(config.sealedSender.onIdentifiedFallback);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
335
340
|
// Set up sealed sender provider if configured
|
|
336
341
|
if (this.isSealedSenderEnabled) {
|
|
337
342
|
this.cipher.setSealedSenderProvider(async () => {
|
|
@@ -466,27 +471,32 @@ export class SignalProtocolClient {
|
|
|
466
471
|
*/
|
|
467
472
|
get isSealedSenderEnabled() {
|
|
468
473
|
const ss = this.config.sealedSender;
|
|
469
|
-
return !!(ss && ss.
|
|
474
|
+
return !!(ss && ss.deliveryMode !== 'disabled' && ss.trustRoots.length > 0);
|
|
470
475
|
}
|
|
471
476
|
/**
|
|
472
477
|
* Fetch (or return cached) sender certificate for sealed sender.
|
|
473
478
|
*
|
|
474
479
|
* Uses the configured certificateProvider or relay.fetchSenderCertificate().
|
|
475
|
-
*
|
|
480
|
+
* Validates the fetched certificate and caches it until one hour before its
|
|
481
|
+
* signed expiration.
|
|
476
482
|
*
|
|
477
483
|
* @returns Base64-encoded serialized SenderCertificate
|
|
478
484
|
* @throws if no certificate provider is available
|
|
479
485
|
*/
|
|
480
486
|
async fetchSenderCertificate() {
|
|
481
487
|
const { SEALED_SENDER_CERTIFICATE_MARGIN_MS } = await import('./config.js');
|
|
482
|
-
|
|
483
|
-
if (this.cachedSenderCertificate &&
|
|
488
|
+
const now = Date.now();
|
|
489
|
+
if (this.cachedSenderCertificate && now < this.cachedCertificateExpiry) {
|
|
484
490
|
return this.cachedSenderCertificate;
|
|
485
491
|
}
|
|
492
|
+
const sealedSender = this.config.sealedSender;
|
|
493
|
+
if (!sealedSender || sealedSender.trustRoots.length === 0) {
|
|
494
|
+
throw new EncryptionError('Sender certificate trust is not configured', EncryptionErrorCode.INITIALIZATION_FAILED);
|
|
495
|
+
}
|
|
486
496
|
// Fetch from configured provider or relay
|
|
487
497
|
let certBase64;
|
|
488
|
-
if (
|
|
489
|
-
certBase64 = await
|
|
498
|
+
if (sealedSender.certificateProvider) {
|
|
499
|
+
certBase64 = await sealedSender.certificateProvider();
|
|
490
500
|
}
|
|
491
501
|
else if (this.relay?.fetchSenderCertificate) {
|
|
492
502
|
certBase64 = await this.relay.fetchSenderCertificate(this.deviceId);
|
|
@@ -494,11 +504,34 @@ export class SignalProtocolClient {
|
|
|
494
504
|
else {
|
|
495
505
|
throw new EncryptionError('No sender certificate provider configured. Set sealedSender.certificateProvider or use a relay that supports fetchSenderCertificate.', EncryptionErrorCode.INITIALIZATION_FAILED);
|
|
496
506
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
507
|
+
const { deserializeSenderCertificate, validateSenderCertificate } = await import('../internal/protocol/sealed-sender/index.js');
|
|
508
|
+
let certificate;
|
|
509
|
+
try {
|
|
510
|
+
certificate = deserializeSenderCertificate(base64ToBytes(certBase64));
|
|
511
|
+
await validateSenderCertificate(certificate, sealedSender.trustRoots.map((root) => bytesToBase64(root)), now, {
|
|
512
|
+
expectedRelayScopeId: bytesToBase64(sealedSender.relayScopeId),
|
|
513
|
+
revokedIssuerKeyIds: sealedSender.revokedIssuerKeyIds,
|
|
514
|
+
});
|
|
515
|
+
const identity = await this._storage.getIdentityKey();
|
|
516
|
+
if (!identity ||
|
|
517
|
+
certificate.senderUuid !== this.userId ||
|
|
518
|
+
certificate.senderDeviceId !== this.deviceId ||
|
|
519
|
+
!constantTimeEqual(base64ToBytes(certificate.senderIdentityKey), base64ToBytes(identity.dhKey.publicKey))) {
|
|
520
|
+
throw new Error('certificate binding mismatch');
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
catch {
|
|
524
|
+
throw new EncryptionError('Fetched sender certificate failed client binding validation', EncryptionErrorCode.INVALID_CIPHERTEXT);
|
|
525
|
+
}
|
|
526
|
+
const refreshAt = certificate.expires - SEALED_SENDER_CERTIFICATE_MARGIN_MS;
|
|
527
|
+
if (refreshAt > now) {
|
|
528
|
+
this.cachedSenderCertificate = certBase64;
|
|
529
|
+
this.cachedCertificateExpiry = refreshAt;
|
|
530
|
+
}
|
|
531
|
+
else {
|
|
532
|
+
this.cachedSenderCertificate = null;
|
|
533
|
+
this.cachedCertificateExpiry = 0;
|
|
534
|
+
}
|
|
502
535
|
return certBase64;
|
|
503
536
|
}
|
|
504
537
|
/**
|
|
@@ -1043,13 +1076,13 @@ export class SignalProtocolClient {
|
|
|
1043
1076
|
async processIncomingEnvelope(envelope, options) {
|
|
1044
1077
|
// Handle sealed sender envelopes: unseal to reveal sender before decrypting
|
|
1045
1078
|
if (envelope.messageType === 'unidentified_sender' && this.config.sealedSender) {
|
|
1046
|
-
const { unsealMessage, envelopeTypeForContent } = await import('./sealed-sender
|
|
1079
|
+
const { unsealMessage, envelopeTypeForContent } = await import('./sealed-sender.js');
|
|
1047
1080
|
const identityKeyPair = await this._storage.getIdentityKey();
|
|
1048
1081
|
if (!identityKeyPair) {
|
|
1049
1082
|
throw new EncryptionError('No identity key pair for sealed sender decryption', EncryptionErrorCode.DECRYPTION_FAILED);
|
|
1050
1083
|
}
|
|
1051
1084
|
const recipientPrivateKeyBytes = base64ToBytes(identityKeyPair.dhKey.privateKey);
|
|
1052
|
-
const unsealed = await unsealMessage(envelope.ciphertext, recipientPrivateKeyBytes, this.userId, this.deviceId, this.config.sealedSender, this.logger);
|
|
1085
|
+
const unsealed = await unsealMessage(envelope.ciphertext, recipientPrivateKeyBytes, this.userId, this.deviceId, this.config.sealedSender, envelope.serverTimestamp, this.logger);
|
|
1053
1086
|
// Process the inner envelope with revealed sender identity. The inner
|
|
1054
1087
|
// type travels inside the seal. Nothing outside it distinguishes a
|
|
1055
1088
|
// group message from a pairwise one. The same mapping serves the other
|