@open-e2ee/signal-protocol-sdk 0.1.0-alpha.9 → 0.2.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/ADAPTERS.md +12 -12
- package/ARCHITECTURE.md +12 -4
- package/CHANGELOG.md +457 -0
- package/README.md +25 -15
- package/SECURITY.md +1 -1
- package/client/README.md +2 -2
- package/device/README.md +3 -1
- package/dist/client/client.d.ts +6 -6
- package/dist/client/client.js +6 -6
- package/dist/client/compose.d.ts +2 -2
- package/dist/client/config.d.ts +17 -1
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/index.d.ts +2 -2
- package/dist/device/expo-metadata.d.ts +26 -0
- package/dist/device/expo-metadata.d.ts.map +1 -0
- package/dist/device/expo-metadata.js +33 -0
- package/dist/device/expo-metadata.js.map +1 -0
- package/dist/device/index.d.ts +1 -1
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/index.js +5 -1
- package/dist/device/index.js.map +1 -1
- package/dist/device/provisioning.d.ts +4 -12
- package/dist/device/provisioning.d.ts.map +1 -1
- package/dist/device/provisioning.js +4 -21
- package/dist/device/provisioning.js.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/internal/crypto/symmetric/aes.d.ts.map +1 -1
- package/dist/internal/crypto/symmetric/aes.js +27 -30
- package/dist/internal/crypto/symmetric/aes.js.map +1 -1
- package/dist/internal/crypto/utils.d.ts.map +1 -1
- package/dist/internal/crypto/utils.js +26 -1
- package/dist/internal/crypto/utils.js.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +12 -4
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.d.ts +261 -6
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +468 -6
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.d.ts +4 -3
- package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.js +97 -76
- package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
- package/dist/internal/encoding/proto/signal-message.d.ts +7 -2
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/signal-message.js +194 -110
- package/dist/internal/encoding/proto/signal-message.js.map +1 -1
- package/dist/internal/manager/manager.d.ts +2 -2
- package/dist/internal/manager/manager.js +1 -1
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +50 -4
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +273 -151
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/spqr/braid.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/braid.js.map +1 -1
- package/dist/internal/protocol/spqr/index.d.ts +1 -1
- package/dist/internal/protocol/spqr/index.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/index.js +0 -2
- package/dist/internal/protocol/spqr/index.js.map +1 -1
- package/dist/internal/protocol/spqr/message.d.ts +0 -18
- package/dist/internal/protocol/spqr/message.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/message.js +1 -37
- package/dist/internal/protocol/spqr/message.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +30 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +45 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.js.map +1 -0
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +11 -8
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +11 -8
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +342 -152
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +9 -6
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
- package/dist/internal/protocol/spqr/spqr.d.ts +5 -3
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.js +62 -7
- package/dist/internal/protocol/spqr/spqr.js.map +1 -1
- package/dist/internal/session/cipher.d.ts +4 -0
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +8 -3
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/internal/session/types.d.ts +8 -0
- package/dist/internal/session/types.d.ts.map +1 -1
- package/dist/layers.d.ts +2 -2
- package/dist/layers.d.ts.map +1 -1
- package/dist/layers.js +2 -2
- package/dist/layers.js.map +1 -1
- package/dist/local/store/index.d.ts +3 -3
- package/dist/local/store/index.d.ts.map +1 -1
- package/dist/local/store/index.js +4 -4
- package/dist/local/store/index.js.map +1 -1
- package/dist/local/store/{mock → memory}/adapter.d.ts +10 -10
- package/dist/local/store/memory/adapter.d.ts.map +1 -0
- package/dist/local/store/{mock → memory}/adapter.js +5 -5
- package/dist/local/store/memory/adapter.js.map +1 -0
- package/dist/local/store/{mock → memory}/failures.d.ts +6 -6
- package/dist/local/store/memory/failures.d.ts.map +1 -0
- package/dist/local/store/{mock → memory}/failures.js +6 -6
- package/dist/local/store/memory/failures.js.map +1 -0
- package/dist/local/store/memory/index.d.ts +11 -0
- package/dist/local/store/memory/index.d.ts.map +1 -0
- package/dist/local/store/memory/index.js +7 -0
- package/dist/local/store/memory/index.js.map +1 -0
- package/dist/local/store/node/database.d.ts +1 -1
- package/dist/local/store/node/database.js +1 -1
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +69 -1
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/backend-conformance.d.ts +66 -0
- package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -0
- package/dist/local/store/react-native/backend-conformance.js +326 -0
- package/dist/local/store/react-native/backend-conformance.js.map +1 -0
- package/dist/local/store/react-native/index.d.ts +9 -4
- package/dist/local/store/react-native/index.d.ts.map +1 -1
- package/dist/local/store/react-native/index.js +2 -0
- package/dist/local/store/react-native/index.js.map +1 -1
- package/dist/local/store/react-native/reference-backend.d.ts +42 -0
- package/dist/local/store/react-native/reference-backend.d.ts.map +1 -0
- package/dist/local/store/react-native/reference-backend.js +177 -0
- package/dist/local/store/react-native/reference-backend.js.map +1 -0
- package/dist/local/store/react-native/storage.d.ts +9 -0
- package/dist/local/store/react-native/storage.d.ts.map +1 -1
- package/dist/local/store/web/adapter.d.ts +11 -1
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +226 -50
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web/index.d.ts +3 -2
- package/dist/local/store/web/index.d.ts.map +1 -1
- package/dist/local/store/web/index.js.map +1 -1
- package/dist/local/vault/index.d.ts +5 -1
- package/dist/local/vault/index.d.ts.map +1 -1
- package/dist/local/vault/index.js +1 -1
- package/dist/local/vault/index.js.map +1 -1
- package/dist/remote/relay/convex/component/certificates.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/certificates.js +26 -31
- package/dist/remote/relay/convex/component/certificates.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 +2 -2
- package/dist/remote/relay/index.js.map +1 -1
- package/dist/remote/relay/{mock → memory}/adapter.d.ts +17 -17
- package/dist/remote/relay/memory/adapter.d.ts.map +1 -0
- package/dist/remote/relay/{mock → memory}/adapter.js +17 -17
- package/dist/remote/relay/memory/adapter.js.map +1 -0
- package/dist/remote/relay/{mock → memory}/failures.d.ts +5 -5
- package/dist/remote/relay/memory/failures.d.ts.map +1 -0
- package/dist/remote/relay/{mock → memory}/failures.js +1 -1
- package/dist/remote/relay/memory/failures.js.map +1 -0
- package/dist/remote/relay/{mock → memory}/group-server.d.ts +1 -1
- package/dist/remote/relay/memory/group-server.d.ts.map +1 -0
- package/dist/remote/relay/{mock → memory}/group-server.js +1 -1
- package/dist/remote/relay/memory/group-server.js.map +1 -0
- package/dist/remote/relay/memory/index.d.ts +11 -0
- package/dist/remote/relay/memory/index.d.ts.map +1 -0
- package/dist/remote/relay/memory/index.js +7 -0
- package/dist/remote/relay/memory/index.js.map +1 -0
- package/dist/types/errors.d.ts +33 -0
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +36 -0
- package/dist/types/errors.js.map +1 -1
- package/dist/types/protocol-config.d.ts +44 -1
- package/dist/types/protocol-config.d.ts.map +1 -1
- package/dist/types/protocol-config.js +1 -0
- package/dist/types/protocol-config.js.map +1 -1
- package/dist/types/session.d.ts +1 -1
- package/dist/types/session.js +1 -1
- package/docs/ASSURANCE.md +49 -14
- package/docs/CLIENT_COMPOSITION.md +3 -3
- package/docs/DEVIATIONS.md +72 -31
- package/docs/GETTING_STARTED.md +11 -11
- package/docs/PACKAGE_SURFACE.md +10 -8
- package/docs/PROTOCOL_POLICY.md +6 -0
- package/docs/RECIPES.md +12 -12
- package/local/store/README.md +95 -8
- package/local/store/{mock → memory}/README.md +8 -8
- package/local/store/react-native/README.md +34 -2
- package/local/store/web/README.md +30 -3
- package/package.json +14 -11
- package/remote/README.md +7 -7
- package/remote/relay/README.md +5 -5
- package/remote/relay/{mock → memory}/README.md +8 -8
- package/dist/local/store/mock/adapter.d.ts.map +0 -1
- package/dist/local/store/mock/adapter.js.map +0 -1
- package/dist/local/store/mock/failures.d.ts.map +0 -1
- package/dist/local/store/mock/failures.js.map +0 -1
- package/dist/local/store/mock/index.d.ts +0 -11
- package/dist/local/store/mock/index.d.ts.map +0 -1
- package/dist/local/store/mock/index.js +0 -7
- package/dist/local/store/mock/index.js.map +0 -1
- package/dist/remote/relay/mock/adapter.d.ts.map +0 -1
- package/dist/remote/relay/mock/adapter.js.map +0 -1
- package/dist/remote/relay/mock/failures.d.ts.map +0 -1
- package/dist/remote/relay/mock/failures.js.map +0 -1
- package/dist/remote/relay/mock/group-server.d.ts.map +0 -1
- package/dist/remote/relay/mock/group-server.js.map +0 -1
- package/dist/remote/relay/mock/index.d.ts +0 -11
- package/dist/remote/relay/mock/index.d.ts.map +0 -1
- package/dist/remote/relay/mock/index.js +0 -7
- package/dist/remote/relay/mock/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol-config.js","sourceRoot":"","sources":["../../types/protocol-config.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,UAAU;IACpB,UAAU,EAAE,YAAY;CAChB,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAoCX;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAA6B;IACpE,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,iBAAiB,CAAC,QAAQ,CAAC;IACtE,MAAM,KAAK,GAAG,MAAM,EAAE,KAAK,IAAI,WAAW,CAAC,QAAQ,CAAC;IAEpD,IAAI,sBAA+B,CAAC;IACpC,IAAI,WAAW,KAAK,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAC/C,sB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Ae,EAAE,MAAM,EAAE,eAAe;QACxC,UAAU,EAAE,MAAM,EAAE,UAAU;QAC9B,qBAAqB,EAAE,MAAM,EAAE,qBAAqB;KACrD,CAAC;AACJ,CAAC;AAYD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD,cAAc,EAAE,KAAK;IACrB,iBAAiB,EAAE,IAAI;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAmB;IACnD,OAAO;QACL,cAAc,EAAE,MAAM,EAAE,cAAc,IAAI,oBAAoB,CAAC,cAAc;QAC7E,iBAAiB,EAAE,MAAM,EAAE,iBAAiB,IAAI,oBAAoB,CAAC,iBAAiB;KACvF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,MAA+B;IAC7D,OAAO,MAAM,EAAE,QAAQ,IAAI,OAAO,CAAC;AACrC,CAAC;AAYD;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,QAAiB;IAC7D,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC7C,CAAC;IACD,OAAO;QACL,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,iBAAiB;KACxB,CAAC;AACJ,CAAC"}
|
package/dist/types/session.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { ResolvedSPQRLimits, SCKAMode } from './protocol-config.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Persisted record version for the composite-identity session profile.
|
|
13
13
|
*
|
|
14
|
-
* Version 4 is a deliberate
|
|
14
|
+
* Version 4 is a deliberate pre-1.0 format break: version 3 records did not bind
|
|
15
15
|
* the ACI/PNI namespaces of both endpoint identity tuples and must be reset,
|
|
16
16
|
* never migrated or interpreted as version 4.
|
|
17
17
|
*/
|
package/dist/types/session.js
CHANGED
|
@@ -11,7 +11,7 @@ import { DEFAULT_SESAME_CONFIG } from '../internal/sesame/types.js';
|
|
|
11
11
|
/**
|
|
12
12
|
* Persisted record version for the composite-identity session profile.
|
|
13
13
|
*
|
|
14
|
-
* Version 4 is a deliberate
|
|
14
|
+
* Version 4 is a deliberate pre-1.0 format break: version 3 records did not bind
|
|
15
15
|
* the ACI/PNI namespaces of both endpoint identity tuples and must be reset,
|
|
16
16
|
* never migrated or interpreted as version 4.
|
|
17
17
|
*/
|
package/docs/ASSURANCE.md
CHANGED
|
@@ -29,16 +29,16 @@ files that nobody could run would look like assurance without being any.
|
|
|
29
29
|
Every change to the source repository runs the full set of automated checks,
|
|
30
30
|
and an export is only cut from a revision where they pass.
|
|
31
31
|
|
|
32
|
-
Most recent full run — 2026-
|
|
32
|
+
Most recent full run — 2026-08-12:
|
|
33
33
|
|
|
34
34
|
| | |
|
|
35
35
|
|---|---|
|
|
36
|
-
| Modules executed |
|
|
37
|
-
| Assertions | 6,
|
|
38
|
-
| Passed | 6,
|
|
36
|
+
| Modules executed | 387 |
|
|
37
|
+
| Assertions | 6,907 |
|
|
38
|
+
| Passed | 6,905 |
|
|
39
39
|
| Skipped | 2 |
|
|
40
40
|
| Failed | 0 |
|
|
41
|
-
| Wall time |
|
|
41
|
+
| Wall time | 146 s |
|
|
42
42
|
|
|
43
43
|
Longer-running performance and endurance checks are excluded from that figure
|
|
44
44
|
and run under separate commands.
|
|
@@ -61,11 +61,32 @@ Coverage spans, in the terms this documentation uses elsewhere:
|
|
|
61
61
|
invariants.
|
|
62
62
|
- **Integration flows** — multi-device fanout, group membership lifecycle,
|
|
63
63
|
device linking and provisioning, PNI-to-ACI upgrade, and relay delivery.
|
|
64
|
-
- **Adapter behavior** — the Expo, browser, Node, React Native, and
|
|
65
|
-
storage adapters, plus the Convex relay and object-store adapters.
|
|
64
|
+
- **Adapter behavior** — the Expo, browser, Node, React Native, and in-memory
|
|
65
|
+
storage adapters, plus the Convex relay and object-store adapters. The
|
|
66
|
+
browser adapter's contract suites additionally run inside real Chromium,
|
|
67
|
+
Firefox, and WebKit pages on every change, and a soak run drives thousands
|
|
68
|
+
of full open/write/read/close cycles through the browser adapter in
|
|
69
|
+
Chromium on every change, failing on upward memory or latency drift. The
|
|
70
|
+
React Native adapter's exported backend-conformance kit runs against its
|
|
71
|
+
reference backend on the Hermes engine on every change, and interruption
|
|
72
|
+
and storage-pressure suites drive the adapter over that backend. In every
|
|
73
|
+
case the assertions target the adapter's contract, and the engines are the
|
|
74
|
+
environment it must honor that contract in, not the subject of the tests.
|
|
66
75
|
- **Public surface** — the exported API shape and the quickstart printed in the
|
|
67
76
|
[README](../README.md), which is executed as written on every change.
|
|
68
77
|
|
|
78
|
+
## What reviews each change
|
|
79
|
+
|
|
80
|
+
The checks above are automated, and automation only finds what someone thought
|
|
81
|
+
to encode. Alongside them, every change to the source repository passes an
|
|
82
|
+
adversarial AI review before it merges, and recurring whole-codebase AI audit
|
|
83
|
+
passes run against the same repository, with their findings fixed through the
|
|
84
|
+
same gated process as any other change. These reviews are performed by AI
|
|
85
|
+
agents rather than by reviewers at a firm, and their transcripts are not
|
|
86
|
+
published — so they describe what the process requires, not a result you can
|
|
87
|
+
inspect. No independent firm has audited this package, and an adversarial AI
|
|
88
|
+
review is not a substitute for one.
|
|
89
|
+
|
|
69
90
|
## What this repository verifies in public
|
|
70
91
|
|
|
71
92
|
Continuous integration here runs on every push and pull request, and its result
|
|
@@ -75,18 +96,32 @@ is a badge on the README you can click through to the run logs:
|
|
|
75
96
|
- `npm run build` — a full TypeScript compile of the published sources;
|
|
76
97
|
- `npm run typecheck`;
|
|
77
98
|
- `npm audit --omit=dev` at moderate severity against the production
|
|
78
|
-
dependency tree
|
|
99
|
+
dependency tree;
|
|
100
|
+
- the [README](../README.md) Quick Start, extracted from the file as printed
|
|
101
|
+
and run against the packed package, then run a second time under
|
|
102
|
+
`--disallow-code-generation-from-strings` — the flag that stands in for a
|
|
103
|
+
strict `script-src` policy and for a Chrome MV3 extension;
|
|
104
|
+
- every classified snippet in the shipped documentation, executed against the
|
|
105
|
+
packed package;
|
|
106
|
+
- every subpath in the package's export map, imported by a consumer outside
|
|
107
|
+
the repository whose `node_modules` has all of the optional peer
|
|
108
|
+
dependencies removed. Entry points that are honestly bound to a platform are
|
|
109
|
+
named in the check itself, and the list is verified in both directions, so
|
|
110
|
+
an exemption that stops being true fails the check.
|
|
79
111
|
|
|
80
112
|
That is a genuine, independently reproducible signal about the code you are
|
|
81
|
-
reading: it compiles, its types are consistent,
|
|
82
|
-
dependencies carry no known advisories at moderate or higher severity
|
|
83
|
-
|
|
113
|
+
reading: it compiles, its types are consistent, its six production
|
|
114
|
+
dependencies carry no known advisories at moderate or higher severity, and the
|
|
115
|
+
code printed in its documentation runs as printed on a machine that is not
|
|
116
|
+
ours. It is not a substitute for the protocol checks, and it is not offered as
|
|
117
|
+
one.
|
|
84
118
|
|
|
85
119
|
## What this is not
|
|
86
120
|
|
|
87
|
-
- **Not an audit.** No independent security
|
|
88
|
-
|
|
89
|
-
|
|
121
|
+
- **Not an independent firm audit.** No independent security firm has audited
|
|
122
|
+
this package, and none is engaged. The adversarial AI review described above
|
|
123
|
+
is continuous and it is real, but it is not a third-party assurance result;
|
|
124
|
+
treat this package as unaudited by any independent firm.
|
|
90
125
|
- **Not a compatibility guarantee.** Conformance work checks this profile
|
|
91
126
|
against the published specifications it cites. It does not establish general
|
|
92
127
|
wire compatibility with Signal Messenger, which this project does not claim.
|
|
@@ -13,17 +13,17 @@ explicit object-store adapter. The current API passes protocol storage as
|
|
|
13
13
|
|
|
14
14
|
## Local Client
|
|
15
15
|
|
|
16
|
-
<!--
|
|
16
|
+
<!-- doc-snippet:run client-composition-local-client expect="" -->
|
|
17
17
|
```ts
|
|
18
18
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
19
19
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
20
|
-
import {
|
|
20
|
+
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
21
21
|
|
|
22
22
|
const signal = await createSignalProtocolClient({
|
|
23
23
|
// One Signal Protocol client represents one app account/device.
|
|
24
24
|
identity: { userId: "alice" },
|
|
25
25
|
// Local-only clients can omit a relay, but still need device-local storage.
|
|
26
|
-
adapters: { storage:
|
|
26
|
+
adapters: { storage: inMemoryStore() },
|
|
27
27
|
});
|
|
28
28
|
```
|
|
29
29
|
|
package/docs/DEVIATIONS.md
CHANGED
|
@@ -60,7 +60,7 @@ model and what is out of scope.
|
|
|
60
60
|
| **Identity keys** | X3DH §2.2; `libsignal` `identity_key.rs` | **Deviation.** A 67-byte composite of separate X25519 and Ed25519 keys replaces the single 33-byte Curve25519 identity key | Avoids XEdDSA, a non-standard signature scheme with no vetted JavaScript implementation; standard Ed25519 is independently verifiable | Two keys to store and rotate; larger identity; **no wire compatibility for any identity-bearing material** |
|
|
61
61
|
| **Prekey signatures** | X3DH §2.2, §4.5 | **Deviation.** RFC 8032 Ed25519 over a domain-separated context binding the identity commitment, algorithm tag, and key ID — not XEdDSA over the bare key | Defeats cross-algorithm and cross-key-ID substitution that a bare-key signature does not cover | Strictly stronger binding; signatures are unverifiable by Signal Messenger clients and vice versa |
|
|
62
62
|
| **Safety numbers** | `libsignal` `fingerprint.rs` | **Deviation.** Iteration and digit encoding are byte-identical, but the input is a composite-identity commitment under an SDK domain string, the QR version is `3`, and the two halves are ordered by user ID rather than by digit string | Follows from the composite identity; a single-key fingerprint cannot authenticate both components | **Safety numbers are not comparable to Signal Messenger's.** The ordering rule also differs from `libsignal` even on the single-key path |
|
|
63
|
-
| **X3DH / PQXDH** | X3DH rev. 1; PQXDH rev. 3 | **Faithful** on DH order, the `0xFF`×32 prefix, zero-salt HKDF, KEM-secret position, and
|
|
63
|
+
| **X3DH / PQXDH** | X3DH rev. 1; PQXDH rev. 3 | **Faithful** on DH order, the `0xFF`×32 prefix, zero-salt HKDF, KEM-secret position, and PQXDH §2.2's info-string construction. **Deviation:** ML-KEM-1024 (FIPS 203) replaces round-3 Kyber1024 | Standardized ML-KEM preferred over round-3 Kyber. The info string names it, and names this application rather than `libsignal`'s, as §2.1 and §2.2 require | Wire-incompatible with `libsignal` by construction, and the label now says so. The info string is part of the derivation, so any peer that names a different one derives a different `SK` and cannot complete the handshake |
|
|
64
64
|
| **Associated data** | X3DH §3.3 | **Deviation.** `AD` is a domain-separated HMAC input over SHA-256 commitments to both composite identities, not `IK_A ‖ IK_B` | Binds the Ed25519 component, which a raw-key `AD` would leave uncovered | Stronger binding; wire-incompatible |
|
|
65
65
|
| **Double Ratchet** | Double Ratchet rev. 4 | **Faithful** on `WhisperRatchet`, `WhisperMessageKeys`, the `0x01`/`0x02` seeds, the 80-byte split, AES-256-CBC, the `0x44` version byte, and 8-byte MAC truncation | — | The ratchet core follows the Double Ratchet specification |
|
|
66
66
|
| **Message wire format** | `libsignal` `wire.proto` | **Faithful** field numbers 1–8. **Extension:** fields at 100+ carry identity type and ML-KEM one-time prekey material. **Deviation:** address binding uses variable-length UTF-8 user IDs and 4-byte device IDs instead of 17-byte ServiceIds and 1-byte device IDs | The SDK binds application-defined identifiers, not Signal Messenger ACIs | Wire-incompatible; a Signal Messenger client would silently ignore the added fields |
|
|
@@ -75,7 +75,7 @@ model and what is out of scope.
|
|
|
75
75
|
| **Sender keys** | `libsignal` `sender_keys.rs` | **Deviation.** Protobuf field numbers and `0x33` framing match, and the `0x01`/`0x02` seeds match, but message-key derivation **omits HKDF-Extract**, signatures are Ed25519 not XEdDSA, and `distributionUuid` carries a UTF-8 string rather than 16 UUID bytes | The Ed25519 choice follows the identity profile; the missing Extract appears unintentional | Group message keys differ from `libsignal`'s for the same chain key. Confirmed numerically, not merely by inspection |
|
|
76
76
|
| **Groups** | Signal Private Group System | **Independent design.** Real zkgroup primitives underneath; the server validates every change against zero-knowledge presentations and signs the accepted result, and clients verify those signatures. **Deviation:** profile-key credential issuance is not blinded — the issuing server sees the raw profile key at issuance time | Ships a validating group server with an enforcement contract (S1–S14) specified in-tree | Not wire-compatible with the Signal Private Group System; credentials are not interchangeable. The unblinded issuance path means a hostile issuance server learns profile keys, which the Signal Private Group System's blinded issuance prevents |
|
|
77
77
|
| **zkgroup / zkcredential** | `libsignal` `zkgroup`, `zkcredential`, `poksho` | **Faithful** port of the Ristretto255 KVAC and Sigma-protocol system, verified against `libsignal`'s known-answer vectors. **Deviation:** server parameter derivation is structured as four labelled derivations rather than one seeded derivation | Server keys are the deploying operator's own trust root (each deployment generates its own seed), not Signal Messenger's | The zero-knowledge properties are real. Credentials are not interchangeable with Signal Messenger's |
|
|
78
|
-
| **Registration IDs** | `libsignal` `sealed_sender.rs` | **Faithful
|
|
78
|
+
| **Registration IDs** | `libsignal` `sealed_sender.rs` | **Faithful.** Generated in `[1, 16383]`, strictly inside the 14 bits the wire format reserves | — | — |
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
@@ -225,14 +225,13 @@ Registration IDs are generated in the closed range `[1, 16383]`
|
|
|
225
225
|
`libsignal` rejects any ID where `id & 0x3FFF != id`
|
|
226
226
|
([`sealed_sender.rs:1508-1515`][ss]); `libsignal`'s own helper generates `[1, 16380]`.
|
|
227
227
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
(`internal/protocol/sealed-sender/v2-binary.ts:170-171`), so
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
survives the mask unchanged.
|
|
228
|
+
The upper bound is load-bearing rather than cosmetic. `16384` is `0x4000` and
|
|
229
|
+
does not fit in 14 bits, and the SDK's multi-recipient sealed-sender encoder
|
|
230
|
+
masks rather than rejects
|
|
231
|
+
(`internal/protocol/sealed-sender/v2-binary.ts:170-171`), so an ID one above
|
|
232
|
+
the range would reach the wire as `0`. The generated range is therefore
|
|
233
|
+
strictly narrower than `libsignal`'s accepted range, and a test asserts every
|
|
234
|
+
generated ID survives the mask unchanged.
|
|
236
235
|
|
|
237
236
|
---
|
|
238
237
|
|
|
@@ -280,23 +279,22 @@ this SDK is and runs. PQXDH §2.2 defines the info string as `info`, `curve`,
|
|
|
280
279
|
defines the same `info` parameter, and §3.3 uses it as the HKDF info with
|
|
281
280
|
nothing appended.
|
|
282
281
|
|
|
283
|
-
|
|
284
|
-
`WhisperText_X25519_SHA-256_CRYSTALS-KYBER-1024` ([`pqxdh.rs:73-74`][pq])
|
|
285
|
-
|
|
282
|
+
The SDK does not use `libsignal`'s labels — `WhisperText` and
|
|
283
|
+
`WhisperText_X25519_SHA-256_CRYSTALS-KYBER-1024` ([`pqxdh.rs:73-74`][pq]).
|
|
284
|
+
Inheriting them would be wrong on both parameters:
|
|
286
285
|
|
|
287
|
-
1. **`pqkem`
|
|
288
|
-
labelling error: two implementations feeding an identical
|
|
289
|
-
*different* shared secrets, because the KEM underneath
|
|
290
|
-
nothing at the KDF layer to signal it. Domain separation is
|
|
291
|
-
info string has.
|
|
292
|
-
2. **`info`
|
|
293
|
-
identifier of the application deriving the key. This SDK is not
|
|
294
|
-
Messenger
|
|
286
|
+
1. **`pqkem` would name a KEM the SDK does not run**, violating §2.2. That is
|
|
287
|
+
worse than a labelling error: two implementations feeding an identical
|
|
288
|
+
label derive *different* shared secrets, because the KEM underneath
|
|
289
|
+
differs, with nothing at the KDF layer to signal it. Domain separation is
|
|
290
|
+
the one job the info string has.
|
|
291
|
+
2. **`info` would name someone else's application.** The specifications ask
|
|
292
|
+
for an identifier of the application deriving the key. This SDK is not
|
|
293
|
+
Signal Messenger.
|
|
295
294
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
changed.
|
|
295
|
+
Choosing the SDK's own labels is a pre-1.0 format break against sessions
|
|
296
|
+
established under `libsignal`'s: they derive a different `SK` and cannot be
|
|
297
|
+
continued. Nothing else about the derivation changes.
|
|
300
298
|
|
|
301
299
|
An application that needs `libsignal`'s known-answer vectors can still get them
|
|
302
300
|
by setting `protocolStrategy.keyExchangeInfoString` to the old label
|
|
@@ -489,8 +487,8 @@ past each boundary rather than on it.
|
|
|
489
487
|
## 4. SPQR and the ML-KEM Braid
|
|
490
488
|
|
|
491
489
|
This is the same protocol as the SparsePostQuantumRatchet v1 protocol, implemented
|
|
492
|
-
independently and pinned against
|
|
493
|
-
`
|
|
490
|
+
independently and pinned against commit `fd32048`, which upstream tags
|
|
491
|
+
`SparsePostQuantumRatchet v1.5.3`. The fidelity is high and specific:
|
|
494
492
|
|
|
495
493
|
- **KDF labels are byte-identical**, including the double space in
|
|
496
494
|
`"Signal PQ Ratchet V1 Chain Start"` (`internal/crypto/kdf/hkdf.ts:353-368`).
|
|
@@ -507,6 +505,18 @@ independently and pinned against `SparsePostQuantumRatchet v1.5.1` (commit
|
|
|
507
505
|
- **ML-KEM-768 with the same incremental split** (32-byte seed, 1152-byte vector,
|
|
508
506
|
960/128-byte ciphertext parts).
|
|
509
507
|
|
|
508
|
+
The delta review that moved the pin forward from `f2589fef` found one behavioural
|
|
509
|
+
change upstream. Decoding a chain epoch direction now rejects a `next` chain key
|
|
510
|
+
whose length is neither zero nor 32 bytes. The internal next-key assertion checks
|
|
511
|
+
that same exact length rather than mere non-emptiness.
|
|
512
|
+
|
|
513
|
+
The SDK is already at least as strict. Restoring SPQR state requires every chain
|
|
514
|
+
key, root key, and skipped-message key to be canonical base64 for exactly 32
|
|
515
|
+
bytes (`internal/protocol/spqr/serialize.ts:44-72`). The SDK has no state in
|
|
516
|
+
which the key is absent. Two upstream error strings now name the value they
|
|
517
|
+
reject. The rest of the delta is proof-assistant annotation and loop rewriting,
|
|
518
|
+
which leaves behaviour unchanged.
|
|
519
|
+
|
|
510
520
|
### 4.1 The `hek` operand order diverges
|
|
511
521
|
|
|
512
522
|
One divergence breaks interoperability completely. The SDK computes
|
|
@@ -549,7 +559,7 @@ braid session persisted under the former ordering.
|
|
|
549
559
|
|
|
550
560
|
**Extension.** An opt-in direct mode (`protocol.braid: 'disabled'`) uses stock
|
|
551
561
|
ML-KEM-768 and adds wire message types `0x80`–`0x82`
|
|
552
|
-
(`internal/encoding/proto/pq-ratchet-serialize.ts:
|
|
562
|
+
(`internal/encoding/proto/pq-ratchet-serialize.ts:40-45`). `libsignal`'s parser rejects
|
|
553
563
|
anything above `6`, so these are visible only within the SDK; they occupy a byte
|
|
554
564
|
range `libsignal` has not claimed. This mode has no Signal Protocol analogue.
|
|
555
565
|
|
|
@@ -562,6 +572,37 @@ evicts by wall-clock timestamp, where `libsignal` triggers at `max_ooo × 11/10
|
|
|
562
572
|
evicts by message index. `libsignal`'s rule is deterministic and index-anchored; the
|
|
563
573
|
SDK's introduces a clock dependency into ratchet state.
|
|
564
574
|
|
|
575
|
+
**Deviation.** The varint decoder is the stricter of the two. It rejects any
|
|
576
|
+
value above `uint64` (`internal/encoding/proto/pq-ratchet-serialize.ts:163-186`).
|
|
577
|
+
`libsignal` accumulates into a `u64` and shifts the tenth byte by 63 places
|
|
578
|
+
(`src/v1/chunked/states/serialize.rs:154-181`). It therefore drops every bit at
|
|
579
|
+
or above 2^64 without an error. The two decoders differ only on malformed input,
|
|
580
|
+
because no encoder produces such a varint.
|
|
581
|
+
|
|
582
|
+
**Deviation.** The erasure layer works in whole chunks. It counts 32-byte
|
|
583
|
+
chunks and zero-pads the final chunk
|
|
584
|
+
(`internal/protocol/spqr/ml-kem-braid/rs/codec.ts:261` and `:810`). `libsignal`
|
|
585
|
+
instead counts GF(2^16) elements, and spreads the remainder across the sixteen
|
|
586
|
+
polynomials (`src/encoding/polynomial.rs:794-802`). The two agree on any input
|
|
587
|
+
whose length is a multiple of 32 bytes. All four braid components have such a
|
|
588
|
+
length, from the 96-byte header with MAC to the 1152-byte encapsulation-key
|
|
589
|
+
vector (`internal/protocol/spqr/ml-kem-braid/state-machine.ts:91-97`). The
|
|
590
|
+
divergence therefore reaches no byte on the wire.
|
|
591
|
+
|
|
592
|
+
**Deviation.** The `PolynomialEncoder` state message differs from `libsignal`'s
|
|
593
|
+
in three ways (`internal/protocol/spqr/ml-kem-braid/serialize.ts:400`, `:671-682`).
|
|
594
|
+
The SDK sets `pts` and `polys` together. The reference sets exactly one of the
|
|
595
|
+
two, and its schema says so (`src/proto/pq_ratchet.proto:8-16`). The SDK's `pts`
|
|
596
|
+
holds one data chunk for each 32 bytes of the component, where the reference
|
|
597
|
+
holds sixteen point vectors. The SDK also adds a `messageSize` field at number 4,
|
|
598
|
+
which the reference message does not define. `libsignal` refuses all three
|
|
599
|
+
(`src/encoding/polynomial.rs:597-616`).
|
|
600
|
+
|
|
601
|
+
Nothing in the SDK calls this codec. It reaches only the internal `ml-kem-braid`
|
|
602
|
+
barrel (`internal/protocol/spqr/ml-kem-braid/index.ts:197-198`), and no braid
|
|
603
|
+
session persists through it. Correcting the shape would change a persisted
|
|
604
|
+
format, so this entry records the divergence rather than repairing it.
|
|
605
|
+
|
|
565
606
|
### 4.3 The Triple Ratchet is faithful
|
|
566
607
|
|
|
567
608
|
The post-quantum secret enters as the HKDF **salt** at message-key expansion, with
|
|
@@ -704,9 +745,9 @@ internally inconsistent about this.
|
|
|
704
745
|
field `libsignal` uses to dispatch between prekey, regular, sender-key, and
|
|
705
746
|
plaintext payloads ([`sealed_sender.rs:2055-2075`][ss]), as a leading byte
|
|
706
747
|
using `libsignal`'s enum values, so the framing differs but the dispatch does
|
|
707
|
-
not.
|
|
708
|
-
|
|
709
|
-
|
|
748
|
+
not. The field is what lets the unseal path restore the real message type
|
|
749
|
+
rather than reconstruct the envelope with a fixed one, which is what sealed
|
|
750
|
+
group messages need to decrypt as group messages.
|
|
710
751
|
|
|
711
752
|
**`PLAINTEXT_CONTENT` (8) is a known wire value that this SDK rejects.**
|
|
712
753
|
`libsignal` uses it to carry a `DecryptionErrorMessage` when no session exists
|
package/docs/GETTING_STARTED.md
CHANGED
|
@@ -107,14 +107,14 @@ This is the target DX the package is moving toward. It is shown here so app
|
|
|
107
107
|
developers can understand the intended mental model while the current stable API
|
|
108
108
|
still uses `storage`, `remoteObjectStore`, hooks, and transition-only media helpers.
|
|
109
109
|
|
|
110
|
-
<!--
|
|
110
|
+
<!-- doc-snippet:skip target-message-api-not-yet-shipped -->
|
|
111
111
|
```ts
|
|
112
112
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
113
113
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
114
114
|
import { createInMemoryDeviceStorage } from "@open-e2ee/signal-protocol-sdk/device/storage/memory";
|
|
115
|
-
import {
|
|
115
|
+
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
116
116
|
|
|
117
|
-
const relay =
|
|
117
|
+
const relay = inMemoryRelay();
|
|
118
118
|
|
|
119
119
|
const alice = await createSignalProtocolClient({
|
|
120
120
|
identity: { userId: "alice", deviceId: 1 },
|
|
@@ -224,18 +224,18 @@ current `signal.media.*` examples into lower-level transition or migration docs.
|
|
|
224
224
|
|
|
225
225
|
## Current Stable Local Clients
|
|
226
226
|
|
|
227
|
-
Use
|
|
227
|
+
Use the in-memory adapters for local examples and development:
|
|
228
228
|
the demo sends while Bob is offline, inspects the relay-visible ciphertext, and
|
|
229
229
|
then starts Bob's subscription to show the decrypted plaintext entering the app.
|
|
230
230
|
|
|
231
|
-
<!--
|
|
231
|
+
<!-- doc-snippet:run getting-started-stable-local-clients expect="bob decrypted: alice: hello" -->
|
|
232
232
|
```ts
|
|
233
233
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
234
234
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
235
|
-
import {
|
|
236
|
-
import {
|
|
235
|
+
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
236
|
+
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
237
237
|
|
|
238
|
-
const relay =
|
|
238
|
+
const relay = inMemoryRelay();
|
|
239
239
|
|
|
240
240
|
// The relay knows which devices exist, but it does not get plaintext.
|
|
241
241
|
await relay.registerDevice("alice", {
|
|
@@ -246,12 +246,12 @@ await relay.registerDevice("bob", { encryptedDeviceName: new ArrayBuffer(0) });
|
|
|
246
246
|
// Each client represents one device. Its protocol storage is local to that device.
|
|
247
247
|
const alice = await createSignalProtocolClient({
|
|
248
248
|
identity: { userId: "alice" },
|
|
249
|
-
adapters: { storage:
|
|
249
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
250
250
|
});
|
|
251
251
|
|
|
252
252
|
const bob = await createSignalProtocolClient({
|
|
253
253
|
identity: { userId: "bob" },
|
|
254
|
-
adapters: { storage:
|
|
254
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
255
255
|
});
|
|
256
256
|
|
|
257
257
|
await alice.syncToServer();
|
|
@@ -303,7 +303,7 @@ relay sees encrypted envelope: {
|
|
|
303
303
|
bob decrypted: alice: hello
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
The
|
|
306
|
+
The in-memory relay lets the example inspect what a server can see. The relay sees
|
|
307
307
|
metadata plus encrypted envelope bytes; it does not receive Bob's decrypted
|
|
308
308
|
message content. The first message often uses `prekey_bundle` to establish a
|
|
309
309
|
session, and later messages use `ciphertext`.
|
package/docs/PACKAGE_SURFACE.md
CHANGED
|
@@ -65,7 +65,7 @@ Expo storage or Convex helpers.
|
|
|
65
65
|
- `@open-e2ee/signal-protocol-sdk/remote/relay/convex`
|
|
66
66
|
- `@open-e2ee/signal-protocol-sdk/remote/relay/convex/relay`
|
|
67
67
|
- `@open-e2ee/signal-protocol-sdk/convex.config`
|
|
68
|
-
- `@open-e2ee/signal-protocol-sdk/remote/relay/
|
|
68
|
+
- `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
|
|
69
69
|
- `@open-e2ee/signal-protocol-sdk/remote/relay/types`
|
|
70
70
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store`
|
|
71
71
|
- `@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
|
@@ -81,6 +81,7 @@ Expo storage or Convex helpers.
|
|
|
81
81
|
- `@open-e2ee/signal-protocol-sdk/device`
|
|
82
82
|
- `@open-e2ee/signal-protocol-sdk/device/constants`
|
|
83
83
|
- `@open-e2ee/signal-protocol-sdk/device/device-id`
|
|
84
|
+
- `@open-e2ee/signal-protocol-sdk/device/expo-metadata`
|
|
84
85
|
- `@open-e2ee/signal-protocol-sdk/device/lifecycle`
|
|
85
86
|
- `@open-e2ee/signal-protocol-sdk/device/provisioning`
|
|
86
87
|
- `@open-e2ee/signal-protocol-sdk/encoding`
|
|
@@ -103,7 +104,7 @@ Expo storage or Convex helpers.
|
|
|
103
104
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo`
|
|
104
105
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo/db`
|
|
105
106
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo/schema`
|
|
106
|
-
- `@open-e2ee/signal-protocol-sdk/local/store/
|
|
107
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
107
108
|
- `@open-e2ee/signal-protocol-sdk/local/store/node`
|
|
108
109
|
- `@open-e2ee/signal-protocol-sdk/local/store/react-native`
|
|
109
110
|
- `@open-e2ee/signal-protocol-sdk/local/store/web`
|
|
@@ -121,8 +122,8 @@ Expo storage or Convex helpers.
|
|
|
121
122
|
|
|
122
123
|
### Development adapters
|
|
123
124
|
|
|
124
|
-
- `@open-e2ee/signal-protocol-sdk/remote/relay/
|
|
125
|
-
- `@open-e2ee/signal-protocol-sdk/local/store/
|
|
125
|
+
- `@open-e2ee/signal-protocol-sdk/remote/relay/memory`
|
|
126
|
+
- `@open-e2ee/signal-protocol-sdk/local/store/memory`
|
|
126
127
|
|
|
127
128
|
`internal/**` is implementation-only and not part of the supported external API.
|
|
128
129
|
|
|
@@ -150,7 +151,7 @@ Expo storage or Convex helpers.
|
|
|
150
151
|
`defineConvexSignalProtocolBackend()` and the `oe-groups` CLI
|
|
151
152
|
(`npx oe-groups trust-root`) for secret initialization and trust-root
|
|
152
153
|
export
|
|
153
|
-
- `
|
|
154
|
+
- `InMemorySignalProtocolRelayServer` / `inMemoryRelay()` for local development
|
|
154
155
|
- custom implementations via `ISignalProtocolRelayServer`
|
|
155
156
|
|
|
156
157
|
### Storage implementations
|
|
@@ -160,11 +161,12 @@ Expo storage or Convex helpers.
|
|
|
160
161
|
- `@open-e2ee/signal-protocol-sdk/local/store/expo` also exports the Expo helpers
|
|
161
162
|
Signal Protocol composes directly: `getKeyStorage`, `getDatabaseKeyManager`,
|
|
162
163
|
`clearDatabaseKeyCache`, and `createPreKeyMaintenanceStore`
|
|
163
|
-
- `IndexedDbSignalProtocolStore` / `indexedDbStore()` for browsers
|
|
164
|
+
- `IndexedDbSignalProtocolStore` / `indexedDbStore()` for browsers
|
|
164
165
|
- `ReactNativeSignalProtocolStore` / `reactNativeStore()` for bare React Native
|
|
165
|
-
(
|
|
166
|
+
(provide your own key-value backend and verify it with the exported
|
|
167
|
+
backend-conformance kit)
|
|
166
168
|
- `NodeSignalProtocolStore` / `nodeStore()` for Node environments
|
|
167
|
-
- `
|
|
169
|
+
- `InMemorySignalProtocolStore` / `inMemoryStore()` for local development
|
|
168
170
|
- custom implementations via `ISignalProtocolLocalStore`
|
|
169
171
|
|
|
170
172
|
### Remote object storage
|
package/docs/PROTOCOL_POLICY.md
CHANGED
|
@@ -114,5 +114,11 @@ for diagnostics. It distinguishes post-quantum success from explicit classical
|
|
|
114
114
|
compatibility fallback. Do not set `protocolStrategy.allowClassicalFallback`
|
|
115
115
|
when `protocol.postQuantum` is present.
|
|
116
116
|
|
|
117
|
+
The advanced `protocolStrategy.onBraidProgress` callback reports ML-KEM Braid
|
|
118
|
+
chunk progress after every braid-mode send and receive: the chunks this side has
|
|
119
|
+
carried in the current epoch, the chunks the open transfers account for, the
|
|
120
|
+
epoch, and whether the operation produced the epoch secret. A direct-mode
|
|
121
|
+
session never raises it.
|
|
122
|
+
|
|
117
123
|
Do not set `protocolStrategy.sckaMode` when `protocol` is present. Use
|
|
118
124
|
`protocol.braid` so the public product policy owns the direct-vs-Braid choice.
|
package/docs/RECIPES.md
CHANGED
|
@@ -13,14 +13,14 @@ uses public exports only.
|
|
|
13
13
|
This local demo sends while Bob is offline so you can see the relay's encrypted
|
|
14
14
|
envelope and Bob's decrypted plaintext in the same workflow.
|
|
15
15
|
|
|
16
|
-
<!--
|
|
16
|
+
<!-- doc-snippet:run recipes-two-local-clients expect="bob decrypted: alice: hello" -->
|
|
17
17
|
```ts
|
|
18
18
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
19
19
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
20
|
+
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
21
|
+
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
22
22
|
|
|
23
|
-
const relay =
|
|
23
|
+
const relay = inMemoryRelay();
|
|
24
24
|
|
|
25
25
|
// The relay knows which devices exist, but it does not get plaintext.
|
|
26
26
|
await relay.registerDevice("alice", {
|
|
@@ -31,12 +31,12 @@ await relay.registerDevice("bob", { encryptedDeviceName: new ArrayBuffer(0) });
|
|
|
31
31
|
// Each client represents one device. Its storage is local to that device.
|
|
32
32
|
const alice = await createSignalProtocolClient({
|
|
33
33
|
identity: { userId: "alice" },
|
|
34
|
-
adapters: { storage:
|
|
34
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
const bob = await createSignalProtocolClient({
|
|
38
38
|
identity: { userId: "bob" },
|
|
39
|
-
adapters: { storage:
|
|
39
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
await alice.syncToServer();
|
|
@@ -135,25 +135,25 @@ before creating the client.
|
|
|
135
135
|
|
|
136
136
|
## Local development
|
|
137
137
|
|
|
138
|
-
<!--
|
|
138
|
+
<!-- doc-snippet:run recipes-local-development expect="" -->
|
|
139
139
|
```ts
|
|
140
140
|
// Real protocol and cryptography; simulated in-memory infrastructure.
|
|
141
141
|
import { createSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
|
|
142
|
-
import {
|
|
143
|
-
import {
|
|
142
|
+
import { inMemoryRelay } from "@open-e2ee/signal-protocol-sdk/remote/relay/memory";
|
|
143
|
+
import { inMemoryStore } from "@open-e2ee/signal-protocol-sdk/local/store/memory";
|
|
144
144
|
|
|
145
|
-
const relay =
|
|
145
|
+
const relay = inMemoryRelay();
|
|
146
146
|
|
|
147
147
|
const alice = await createSignalProtocolClient({
|
|
148
148
|
// `identity` is the app account/device being represented.
|
|
149
149
|
identity: { userId: "alice" },
|
|
150
150
|
// `adapters` are the concrete storage/relay implementation for this run.
|
|
151
|
-
adapters: { storage:
|
|
151
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
152
152
|
});
|
|
153
153
|
|
|
154
154
|
const bob = await createSignalProtocolClient({
|
|
155
155
|
identity: { userId: "bob" },
|
|
156
|
-
adapters: { storage:
|
|
156
|
+
adapters: { storage: inMemoryStore(), relay },
|
|
157
157
|
});
|
|
158
158
|
```
|
|
159
159
|
|