@open-e2ee/signal-protocol-sdk 8.2.0 → 9.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.
Files changed (276) hide show
  1. package/ADAPTERS.md +13 -31
  2. package/ARCHITECTURE.md +5 -7
  3. package/CHANGELOG.md +105 -0
  4. package/README.md +36 -48
  5. package/SECURITY.md +2 -2
  6. package/client/README.md +9 -0
  7. package/dist/client/client.d.ts +21 -14
  8. package/dist/client/client.d.ts.map +1 -1
  9. package/dist/client/client.js +93 -78
  10. package/dist/client/client.js.map +1 -1
  11. package/dist/client/config.d.ts +10 -17
  12. package/dist/client/config.d.ts.map +1 -1
  13. package/dist/client/config.js.map +1 -1
  14. package/dist/client/event-hooks.js +27 -0
  15. package/dist/client/event-hooks.js.map +1 -1
  16. package/dist/client/group-receive-authorization.d.ts +5 -0
  17. package/dist/client/group-receive-authorization.d.ts.map +1 -0
  18. package/dist/client/group-receive-authorization.js +32 -0
  19. package/dist/client/group-receive-authorization.js.map +1 -0
  20. package/dist/client/group-sender-key-operations.d.ts +15 -0
  21. package/dist/client/group-sender-key-operations.d.ts.map +1 -0
  22. package/dist/client/group-sender-key-operations.js +31 -0
  23. package/dist/client/group-sender-key-operations.js.map +1 -0
  24. package/dist/client/groups.d.ts +3 -1
  25. package/dist/client/groups.d.ts.map +1 -1
  26. package/dist/client/groups.js +5 -2
  27. package/dist/client/groups.js.map +1 -1
  28. package/dist/client/relay-subscription.d.ts +2 -0
  29. package/dist/client/relay-subscription.d.ts.map +1 -1
  30. package/dist/client/relay-subscription.js +3 -1
  31. package/dist/client/relay-subscription.js.map +1 -1
  32. package/dist/client/sender-key-distribution.d.ts.map +1 -1
  33. package/dist/client/sender-key-distribution.js +4 -1
  34. package/dist/client/sender-key-distribution.js.map +1 -1
  35. package/dist/client/signal-service-cipher.d.ts +4 -2
  36. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  37. package/dist/client/signal-service-cipher.js +61 -51
  38. package/dist/client/signal-service-cipher.js.map +1 -1
  39. package/dist/index.d.ts +27 -21
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +8 -17
  42. package/dist/index.js.map +1 -1
  43. package/dist/internal/crypto/pq/kyber.d.ts +1 -1
  44. package/dist/internal/crypto/pq/kyber.js +1 -1
  45. package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
  46. package/dist/internal/encoding/proto/sender-key-message.d.ts.map +1 -1
  47. package/dist/internal/encoding/proto/sender-key-message.js +5 -2
  48. package/dist/internal/encoding/proto/sender-key-message.js.map +1 -1
  49. package/dist/internal/groups/manager.d.ts.map +1 -1
  50. package/dist/internal/groups/manager.js +5 -2
  51. package/dist/internal/groups/manager.js.map +1 -1
  52. package/dist/internal/groups/wire.d.ts +0 -2
  53. package/dist/internal/groups/wire.d.ts.map +1 -1
  54. package/dist/internal/groups/wire.js +0 -6
  55. package/dist/internal/groups/wire.js.map +1 -1
  56. package/dist/internal/manager/manager.d.ts.map +1 -1
  57. package/dist/internal/manager/manager.js +0 -1
  58. package/dist/internal/manager/manager.js.map +1 -1
  59. package/dist/internal/protocol/double-ratchet/ratchet.d.ts +0 -17
  60. package/dist/internal/protocol/double-ratchet/ratchet.d.ts.map +1 -1
  61. package/dist/internal/protocol/double-ratchet/ratchet.js +0 -4
  62. package/dist/internal/protocol/double-ratchet/ratchet.js.map +1 -1
  63. package/dist/internal/protocol/sealed-sender/certificate.d.ts +2 -32
  64. package/dist/internal/protocol/sealed-sender/certificate.d.ts.map +1 -1
  65. package/dist/internal/protocol/sealed-sender/certificate.js +4 -85
  66. package/dist/internal/protocol/sealed-sender/certificate.js.map +1 -1
  67. package/dist/internal/protocol/sealed-sender/index.d.ts +2 -2
  68. package/dist/internal/protocol/sealed-sender/index.d.ts.map +1 -1
  69. package/dist/internal/protocol/sealed-sender/index.js +2 -6
  70. package/dist/internal/protocol/sealed-sender/index.js.map +1 -1
  71. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +0 -19
  72. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  73. package/dist/internal/protocol/sealed-sender/proto/index.js +1 -48
  74. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  75. package/dist/internal/protocol/sender-keys/manager.d.ts +9 -13
  76. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  77. package/dist/internal/protocol/sender-keys/manager.js +90 -95
  78. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  79. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts +0 -2
  80. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.d.ts.map +1 -1
  81. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +4 -12
  82. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
  83. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +1 -0
  84. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  85. package/dist/internal/protocol/spqr/spqr.d.ts +1 -1
  86. package/dist/internal/protocol/spqr/spqr.js +1 -1
  87. package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
  88. package/dist/internal/protocol/x3dh/x3dh.js +1 -1
  89. package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
  90. package/dist/internal/protocol/zk/credentials/credentials.d.ts +3 -54
  91. package/dist/internal/protocol/zk/credentials/credentials.d.ts.map +1 -1
  92. package/dist/internal/protocol/zk/credentials/credentials.js +4 -91
  93. package/dist/internal/protocol/zk/credentials/credentials.js.map +1 -1
  94. package/dist/internal/protocol/zk/credentials/endorsements.d.ts +3 -64
  95. package/dist/internal/protocol/zk/credentials/endorsements.d.ts.map +1 -1
  96. package/dist/internal/protocol/zk/credentials/endorsements.js +4 -134
  97. package/dist/internal/protocol/zk/credentials/endorsements.js.map +1 -1
  98. package/dist/internal/protocol/zk/credentials/index.d.ts +3 -3
  99. package/dist/internal/protocol/zk/credentials/index.d.ts.map +1 -1
  100. package/dist/internal/protocol/zk/credentials/index.js +3 -3
  101. package/dist/internal/protocol/zk/credentials/index.js.map +1 -1
  102. package/dist/internal/protocol/zk/credentials/issuance.d.ts +3 -26
  103. package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
  104. package/dist/internal/protocol/zk/credentials/issuance.js +3 -80
  105. package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
  106. package/dist/internal/protocol/zk/credentials/presentation.d.ts +4 -73
  107. package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
  108. package/dist/internal/protocol/zk/credentials/presentation.js +4 -152
  109. package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
  110. package/dist/internal/protocol/zk/groups/auth-credential.d.ts +1 -61
  111. package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
  112. package/dist/internal/protocol/zk/groups/auth-credential.js +2 -196
  113. package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
  114. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +1 -86
  115. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
  116. package/dist/internal/protocol/zk/groups/group-send-endorsement.js +1 -152
  117. package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
  118. package/dist/internal/protocol/zk/groups/index.d.ts +4 -4
  119. package/dist/internal/protocol/zk/groups/index.d.ts.map +1 -1
  120. package/dist/internal/protocol/zk/groups/index.js +4 -4
  121. package/dist/internal/protocol/zk/groups/index.js.map +1 -1
  122. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +2 -57
  123. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts.map +1 -1
  124. package/dist/internal/protocol/zk/groups/profile-key-credential.js +2 -174
  125. package/dist/internal/protocol/zk/groups/profile-key-credential.js.map +1 -1
  126. package/dist/internal/protocol/zk/groups/server-params.d.ts +8 -72
  127. package/dist/internal/protocol/zk/groups/server-params.d.ts.map +1 -1
  128. package/dist/internal/protocol/zk/groups/server-params.js +8 -108
  129. package/dist/internal/protocol/zk/groups/server-params.js.map +1 -1
  130. package/dist/internal/protocol/zk/proofs/sign.d.ts +1 -2
  131. package/dist/internal/protocol/zk/proofs/sign.d.ts.map +1 -1
  132. package/dist/internal/protocol/zk/proofs/sign.js +2 -11
  133. package/dist/internal/protocol/zk/proofs/sign.js.map +1 -1
  134. package/dist/internal/session/ratchet.d.ts.map +1 -1
  135. package/dist/internal/session/ratchet.js +0 -2
  136. package/dist/internal/session/ratchet.js.map +1 -1
  137. package/dist/local/store/key-value/adapter.d.ts +3 -3
  138. package/dist/local/store/key-value/adapter.d.ts.map +1 -1
  139. package/dist/local/store/key-value/adapter.js +30 -15
  140. package/dist/local/store/key-value/adapter.js.map +1 -1
  141. package/dist/local/store/key-value/backend-conformance.d.ts.map +1 -1
  142. package/dist/local/store/key-value/backend-conformance.js +25 -0
  143. package/dist/local/store/key-value/backend-conformance.js.map +1 -1
  144. package/dist/local/store/key-value/batch.d.ts +3 -1
  145. package/dist/local/store/key-value/batch.d.ts.map +1 -1
  146. package/dist/local/store/key-value/batch.js +9 -1
  147. package/dist/local/store/key-value/batch.js.map +1 -1
  148. package/dist/local/store/key-value/storage.d.ts +6 -0
  149. package/dist/local/store/key-value/storage.d.ts.map +1 -1
  150. package/dist/local/store/key-value/transactional-backend.d.ts +1 -1
  151. package/dist/local/store/key-value/transactional-backend.js +1 -1
  152. package/dist/local/store/memory/adapter.d.ts +3 -3
  153. package/dist/local/store/memory/adapter.d.ts.map +1 -1
  154. package/dist/local/store/memory/adapter.js +43 -18
  155. package/dist/local/store/memory/adapter.js.map +1 -1
  156. package/dist/local/store/sqlite/migrations.d.ts.map +1 -1
  157. package/dist/local/store/sqlite/migrations.js +18 -0
  158. package/dist/local/store/sqlite/migrations.js.map +1 -1
  159. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts +3 -3
  160. package/dist/local/store/sqlite/models/skipped-sender-key.d.ts.map +1 -1
  161. package/dist/local/store/sqlite/models/skipped-sender-key.js +13 -17
  162. package/dist/local/store/sqlite/models/skipped-sender-key.js.map +1 -1
  163. package/dist/local/store/sqlite/store.d.ts +3 -3
  164. package/dist/local/store/sqlite/store.d.ts.map +1 -1
  165. package/dist/local/store/sqlite/store.js +17 -9
  166. package/dist/local/store/sqlite/store.js.map +1 -1
  167. package/dist/local/store/web/adapter.d.ts +3 -3
  168. package/dist/local/store/web/adapter.d.ts.map +1 -1
  169. package/dist/local/store/web/adapter.js +59 -20
  170. package/dist/local/store/web/adapter.js.map +1 -1
  171. package/dist/remote/relay/index.d.ts +4 -7
  172. package/dist/remote/relay/index.d.ts.map +1 -1
  173. package/dist/remote/relay/index.js +5 -7
  174. package/dist/remote/relay/index.js.map +1 -1
  175. package/dist/remote/relay/types.d.ts +3 -3
  176. package/dist/types/api.d.ts +29 -8
  177. package/dist/types/api.d.ts.map +1 -1
  178. package/dist/versions.d.ts +3 -3
  179. package/dist/versions.js +3 -3
  180. package/dist/zk/credentials.d.ts +2 -2
  181. package/dist/zk/credentials.js +2 -2
  182. package/dist/zk/groups.d.ts +3 -3
  183. package/dist/zk/groups.d.ts.map +1 -1
  184. package/dist/zk/groups.js +3 -3
  185. package/dist/zk/groups.js.map +1 -1
  186. package/docs/ASSURANCE.md +12 -14
  187. package/docs/CLIENT_COMPOSITION.md +9 -3
  188. package/docs/DEVIATIONS.md +24 -25
  189. package/docs/GETTING_STARTED.md +42 -320
  190. package/docs/INTERFACES.md +7 -7
  191. package/docs/PACKAGE_SURFACE.md +14 -16
  192. package/docs/RECIPES.md +6 -112
  193. package/groups/README.md +9 -1
  194. package/local/store/README.md +26 -6
  195. package/package.json +1 -30
  196. package/remote/README.md +12 -78
  197. package/remote/object-store/convex-r2/README.md +17 -49
  198. package/remote/relay/README.md +21 -18
  199. package/zk/README.md +6 -7
  200. package/dist/client/dual-store.d.ts +0 -70
  201. package/dist/client/dual-store.d.ts.map +0 -1
  202. package/dist/client/dual-store.js +0 -123
  203. package/dist/client/dual-store.js.map +0 -1
  204. package/dist/client/multi-device.d.ts +0 -74
  205. package/dist/client/multi-device.d.ts.map +0 -1
  206. package/dist/client/multi-device.js +0 -105
  207. package/dist/client/multi-device.js.map +0 -1
  208. package/dist/groups/server.d.ts +0 -10
  209. package/dist/groups/server.d.ts.map +0 -1
  210. package/dist/groups/server.js +0 -6
  211. package/dist/groups/server.js.map +0 -1
  212. package/dist/internal/encoding/index.d.ts +0 -2
  213. package/dist/internal/encoding/index.d.ts.map +0 -1
  214. package/dist/internal/encoding/index.js +0 -2
  215. package/dist/internal/encoding/index.js.map +0 -1
  216. package/dist/internal/groups/server-engine.d.ts +0 -118
  217. package/dist/internal/groups/server-engine.d.ts.map +0 -1
  218. package/dist/internal/groups/server-engine.js +0 -1268
  219. package/dist/internal/groups/server-engine.js.map +0 -1
  220. package/dist/internal/protocol/index.d.ts +0 -24
  221. package/dist/internal/protocol/index.d.ts.map +0 -1
  222. package/dist/internal/protocol/index.js +0 -9
  223. package/dist/internal/protocol/index.js.map +0 -1
  224. package/dist/internal/protocol/sealed-sender/trust-root.d.ts +0 -56
  225. package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +0 -1
  226. package/dist/internal/protocol/sealed-sender/trust-root.js +0 -90
  227. package/dist/internal/protocol/sealed-sender/trust-root.js.map +0 -1
  228. package/dist/internal/protocol/triple-ratchet/index.d.ts +0 -21
  229. package/dist/internal/protocol/triple-ratchet/index.d.ts.map +0 -1
  230. package/dist/internal/protocol/triple-ratchet/index.js +0 -19
  231. package/dist/internal/protocol/triple-ratchet/index.js.map +0 -1
  232. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +0 -233
  233. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +0 -1
  234. package/dist/internal/protocol/triple-ratchet/ratchet.js +0 -254
  235. package/dist/internal/protocol/triple-ratchet/ratchet.js.map +0 -1
  236. package/dist/internal/protocol/zk/proofs/index.d.ts +0 -13
  237. package/dist/internal/protocol/zk/proofs/index.d.ts.map +0 -1
  238. package/dist/internal/protocol/zk/proofs/index.js +0 -7
  239. package/dist/internal/protocol/zk/proofs/index.js.map +0 -1
  240. package/dist/local/store/sqlite/index.d.ts +0 -20
  241. package/dist/local/store/sqlite/index.d.ts.map +0 -1
  242. package/dist/local/store/sqlite/index.js +0 -18
  243. package/dist/local/store/sqlite/index.js.map +0 -1
  244. package/dist/remote/object-store/convex-r2/server/index.d.ts +0 -2
  245. package/dist/remote/object-store/convex-r2/server/index.d.ts.map +0 -1
  246. package/dist/remote/object-store/convex-r2/server/index.js +0 -2
  247. package/dist/remote/object-store/convex-r2/server/index.js.map +0 -1
  248. package/dist/remote/object-store/convex-r2/server.d.ts +0 -129
  249. package/dist/remote/object-store/convex-r2/server.d.ts.map +0 -1
  250. package/dist/remote/object-store/convex-r2/server.js +0 -244
  251. package/dist/remote/object-store/convex-r2/server.js.map +0 -1
  252. package/dist/remote/relay/memory/adapter.d.ts +0 -252
  253. package/dist/remote/relay/memory/adapter.d.ts.map +0 -1
  254. package/dist/remote/relay/memory/adapter.js +0 -1057
  255. package/dist/remote/relay/memory/adapter.js.map +0 -1
  256. package/dist/remote/relay/memory/failures.d.ts +0 -58
  257. package/dist/remote/relay/memory/failures.d.ts.map +0 -1
  258. package/dist/remote/relay/memory/failures.js +0 -124
  259. package/dist/remote/relay/memory/failures.js.map +0 -1
  260. package/dist/remote/relay/memory/group-server.d.ts +0 -13
  261. package/dist/remote/relay/memory/group-server.d.ts.map +0 -1
  262. package/dist/remote/relay/memory/group-server.js +0 -19
  263. package/dist/remote/relay/memory/group-server.js.map +0 -1
  264. package/dist/remote/relay/memory/index.d.ts +0 -11
  265. package/dist/remote/relay/memory/index.d.ts.map +0 -1
  266. package/dist/remote/relay/memory/index.js +0 -7
  267. package/dist/remote/relay/memory/index.js.map +0 -1
  268. package/examples/browser/README.md +0 -35
  269. package/examples/browser/index.html +0 -27
  270. package/examples/browser/src/exchange.ts +0 -69
  271. package/examples/browser/src/main.ts +0 -63
  272. package/examples/browser/src/style.css +0 -9
  273. package/examples/browser/src/worker.ts +0 -10
  274. package/examples/browser/vite.config.ts +0 -9
  275. package/remote/relay/memory/README.md +0 -72
  276. package/scripts/oe-groups.mjs +0 -166
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Public zkcredential API.
3
3
  *
4
- * This is the supported import surface for credential serialization and key
5
- * helpers used by server wrappers and advanced integrations.
4
+ * Client integrations use this module for credential response verification,
5
+ * presentation creation, and public-key serialization.
6
6
  */
7
7
  export * from '../internal/protocol/zk/credentials/index.js';
8
8
  export { serializeCredentialPublicKey, deserializeCredentialPublicKey, } from '../internal/protocol/zk/credentials/credentials.js';
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Public zkgroup API.
3
3
  *
4
- * Server-side wrappers and advanced app integrations should use this module
5
- * rather than importing Signal Protocol internals directly.
4
+ * Client integrations use this module for group encryption, credential requests,
5
+ * response verification, and presentation creation.
6
6
  */
7
7
  export {};
8
8
  export * from '../internal/protocol/zk/groups/index.js';
9
9
  export { uuidToBytes, serviceIdBinary, uidStructFromServiceId, type ServiceId, type ServiceIdKind, SERVICE_ID_ACI, SERVICE_ID_PNI, } from '../internal/protocol/zk/groups/uid-struct.js';
10
10
  export { computeProfileKeyVersion } from '../internal/protocol/zk/groups/profile-key-version.js';
11
- export { serializeAuthCredentialResponse, deserializeAuthCredentialResponse, deserializeAuthCredentialPresentation, deserializeGroupPublicParams, } from '../internal/protocol/zk/groups/auth-credential.js';
11
+ export { deserializeAuthCredentialResponse } from '../internal/protocol/zk/groups/auth-credential.js';
12
12
  //# sourceMappingURL=groups.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../zk/groups.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC;AACV,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EACL,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,cAAc,EACd,cAAc,GACf,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,qCAAqC,EACrC,4BAA4B,GAC7B,MAAM,gDAAgD,CAAC"}
1
+ {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../zk/groups.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC;AACV,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EACL,WAAW,EACX,eAAe,EACf,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,cAAc,EACd,cAAc,GACf,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC"}
package/dist/zk/groups.js CHANGED
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * Public zkgroup API.
3
3
  *
4
- * Server-side wrappers and advanced app integrations should use this module
5
- * rather than importing Signal Protocol internals directly.
4
+ * Client integrations use this module for group encryption, credential requests,
5
+ * response verification, and presentation creation.
6
6
  */
7
7
  export * from '../internal/protocol/zk/groups/index.js';
8
8
  export { uuidToBytes, serviceIdBinary, uidStructFromServiceId, SERVICE_ID_ACI, SERVICE_ID_PNI, } from '../internal/protocol/zk/groups/uid-struct.js';
9
9
  export { computeProfileKeyVersion } from '../internal/protocol/zk/groups/profile-key-version.js';
10
- export { serializeAuthCredentialResponse, deserializeAuthCredentialResponse, deserializeAuthCredentialPresentation, deserializeGroupPublicParams, } from '../internal/protocol/zk/groups/auth-credential.js';
10
+ export { deserializeAuthCredentialResponse } from '../internal/protocol/zk/groups/auth-credential.js';
11
11
  //# sourceMappingURL=groups.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../zk/groups.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EACL,WAAW,EACX,eAAe,EACf,sBAAsB,EAGtB,cAAc,EACd,cAAc,GACf,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,EACL,+BAA+B,EAC/B,iCAAiC,EACjC,qCAAqC,EACrC,4BAA4B,GAC7B,MAAM,gDAAgD,CAAC"}
1
+ {"version":3,"file":"groups.js","sourceRoot":"","sources":["../../zk/groups.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,cAAc,gCAAgC,CAAC;AAE/C,OAAO,EACL,WAAW,EACX,eAAe,EACf,sBAAsB,EAGtB,cAAc,EACd,cAAc,GACf,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,oDAAoD,CAAC;AAE9F,OAAO,EAAE,iCAAiC,EAAE,MAAM,gDAAgD,CAAC"}
package/docs/ASSURANCE.md CHANGED
@@ -6,9 +6,9 @@ This document states our testing methods, reported results, public checks, and r
6
6
 
7
7
  ## What is public
8
8
 
9
- The public repository contains the SDK source, documentation, examples, and build checks. An export tool copies approved files from the engineering repository. It excludes private engineering material and its development dependencies.
9
+ The public repository contains SDK client source, documentation, and build checks. An export tool copies approved files from the engineering repository. It excludes private engineering material and its development dependencies.
10
10
 
11
- You can inspect the implementation and run the examples. You cannot reproduce the private results from this repository alone.
11
+ You can inspect the client implementation and run the public checks. Relay server implementations and the internal runtime examples remain private. You cannot reproduce the private results from this repository alone.
12
12
 
13
13
  Private testing also exists in other open-source projects. [SQLite publishes some checks and keeps TH3 private](https://www.sqlite.org/testing.html). [Convex documents a private testing framework](https://github.com/get-convex/convex-backend#readme). Those projects do not review or endorse this SDK.
14
14
 
@@ -16,16 +16,16 @@ Private testing also exists in other open-source projects. [SQLite publishes som
16
16
 
17
17
  Engineering CI runs the default automated checks on pull requests that are ready for review and on changes to the main branch. Release preparation requires a passing run.
18
18
 
19
- Most recent full run on 2026-09-30:
19
+ Most recent full run on 2026-10-04:
20
20
 
21
21
  | | |
22
22
  |---|---|
23
- | Test modules | 480 |
24
- | Test cases | 8,820 |
25
- | Passed | 8,816 |
23
+ | Test modules | 491 |
24
+ | Test cases | 9,111 |
25
+ | Passed | 9,107 |
26
26
  | Skipped | 4 |
27
27
  | Failed | 0 |
28
- | Wall time | 185 s |
28
+ | Wall time | 232 s |
29
29
 
30
30
  The total counts test cases. One test case can contain several assertions. Separate commands run the longer performance and endurance checks.
31
31
 
@@ -47,7 +47,7 @@ The browser storage job also runs 2,000 open, write, read, and close cycles of t
47
47
 
48
48
  In Chromium, the browser storage job also builds an app with the Vite version of the browser example and the packed package. The entry module of the app completes an exchange in each direction with a top-level await. The job fails when the exchange does not finish in 30 seconds, or when a chunk of the build imports the entry chunk. A default automated check also fails when the SDK loads a module with a dynamic import and that module imports another module. Other bundlers are not checked.
49
49
 
50
- A storage contract check does not prove a full encrypted exchange. The [browser example](../examples/browser/README.md) and [Expo example](../examples/expo/README.md) exercise message encryption, delivery, and decryption.
50
+ A storage contract check does not prove a full encrypted exchange. Internal browser and Expo examples exercise message encryption, delivery, and decryption.
51
51
 
52
52
  ## SQLite store checks
53
53
 
@@ -79,7 +79,7 @@ No CI job signs the app with a Developer ID. On 2026-09-29, a manual check on ma
79
79
  |---|---|---|
80
80
  | The store passes the shared storage contract. | Default automated checks: Linux, Node 26 | The storage contract on the `expo-sqlite` JavaScript layer over `node:sqlite`. This check runs no native module and no SQLCipher. |
81
81
  | A release build of the Expo example stores its state with SQLCipher on Android and keeps it across a process restart. | Android emulator job | A release APK on Hermes V1, run twice on an Android API 36 x86_64 emulator. Each run must log a SQLCipher version and a database header that is not the SQLite header. The second run must resume the stored identity and complete an exchange. This job runs on a change to the main branch that can reach the React Native runtime, and on demand. It does not run on a pull request. |
82
- | The Expo example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Public CI (`Checks`) | The Android bundle of the Expo example with the packed package, on Expo SDK 55 and Expo SDK 57. |
82
+ | The Expo example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Engineering CI | The Android bundle of the Expo example with the packed package, on Expo SDK 55 and Expo SDK 57. |
83
83
  | In an Expo web build, an encrypted open and a reset fail with `SqliteEncryptionUnavailableError` (`KEY_STORAGE_ERROR`) before they use the vault. With `encryptionAtRest: false`, the store opens and keeps its data across a page load. | Browser storage job: Chromium on Linux | An `expo export --platform web` of an Expo SDK 57 app that installs the packed package, loaded in Chromium. The page reads no `PRAGMA cipher_version` row, and Expo SecureStore reports that it is not available. The check does not open a store with `./local/store/web-sqlite` in the Expo web build. |
84
84
 
85
85
  The Hermes flow job does not load a SQLite store. Its flows use the memory and key-value stores. The Android emulator job is the only CI job that runs the Expo store on Hermes.
@@ -94,7 +94,7 @@ The Hermes flow job does not load a SQLite store. Its flows use the memory and k
94
94
  | Without `encryptionAtRest: false`, the store refuses an op-sqlite build without SQLCipher and creates no file. A plaintext file opened with encryption fails as a key mismatch and does not change. | Default automated checks: Linux, Node 26 | The same test doubles. The double answers as an op-sqlite build without SQLCipher. |
95
95
  | Two parallel first opens of one name write one key, and the second open fails with `INVALID_STATE`. An open or a reset of a name that an open store holds fails with `INVALID_STATE`. | Default automated checks: Linux, Node 26 | The same test doubles. |
96
96
  | A release build of the bare React Native example stores its state with SQLCipher on Android, with the default keychain vault, and keeps it across a process restart. A key that does not open the file fails with `KEY_STORAGE_ERROR`. | Android emulator job | A release APK on Hermes V1 with the native op-sqlite SQLCipher build, run twice on an Android API 36 x86_64 emulator. Each run must log a SQLCipher version, a database header that is not the SQLite header, and a wrong-key open that fails with `SqliteKeyMismatchError`. The second run must resume the stored identity and complete an exchange. This job runs on a change to the main branch that can reach the React Native runtime, and on demand. It does not run on a pull request. |
97
- | The bare React Native example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Public CI (`Checks`) | The Android release bundle of the bare React Native example with the packed package. |
97
+ | The bare React Native example, which imports this entry, bundles with the Hermes compiler that React Native pins. | Engineering CI | The Android release bundle of the bare React Native example with the packed package. |
98
98
 
99
99
  The Android emulator job is the only CI job that runs this store on Hermes with the native op-sqlite module. No CI job runs it on iOS. On 2026-09-28, a manual check of a development build of the SDK before 8.0.0 ran the bare React Native example in the iOS 26.2 simulator with Xcode 26.3. Each of four launches logged a SQLCipher version, a database header that is not the SQLite header, and the wrong-key failure. Each launch after the first resumed the stored identity.
100
100
 
@@ -121,7 +121,7 @@ The simulator does not enforce Data Protection. These results do not show the pr
121
121
 
122
122
  The WebKit store job runs Playwright's WebKit on macOS, where WebKit has OPFS synchronous access handles. Playwright's WebKit is not Safari, so the same job then runs the same checks in the Safari of the macOS runner through `safaridriver`, and records the Safari version. A WebDriver runner runs the Playwright checks unchanged. It counts the workers of a page from inside the page, and it reports the uncaught errors of a page only after the page loads. Each browser context is a Safari WebDriver session, so the check for an ephemeral context that refuses OPFS access handles skips when that session has them. It runs only on a change to the web SQLite store, the SQLite core, the storage contract, the key vault, the job, or a dependency. On a pull request, it runs only when a maintainer requests it. In the browser storage job for Chromium and Firefox and in the WebKit store job, a check that skips for want of OPFS fails.
123
123
 
124
- The code-generation check in public CI runs the README example with the memory store. It does not load a SQLite store.
124
+ The internal code-generation check runs an encrypted exchange with the memory store. It does not load a SQLite store.
125
125
 
126
126
  ### Tauri
127
127
 
@@ -187,13 +187,11 @@ This statement describes our process. It is not an independent security assessme
187
187
 
188
188
  - Install from the committed lockfile, compile the SDK, and check its types.
189
189
  - Check dependencies for known advisories at moderate severity or higher.
190
- - Extract the README example and run it against the packed package.
191
- - Run the example with string-based code generation disabled.
192
190
  - Run complete documentation programs and check their expected output.
193
191
  - Check SDK imports and types in snippets that require application context.
194
192
  - Check exported import paths in a separate consumer without optional peer dependencies. Verify the declared platform exceptions.
195
193
 
196
- The examples include installation commands and expected output. The browser example shows ciphertext and decrypted messages in the page and console.
194
+ Hosted client snippets need a configured Relay project and identity provider. Public snippet checks validate their imports and types without calling a live Relay.
197
195
 
198
196
  A passing build establishes that the checked code builds and the exercised behavior passes. It does not establish the absence of vulnerabilities.
199
197
 
@@ -2,9 +2,10 @@
2
2
 
3
3
  > Navigation: [README](../README.md) | [ARCHITECTURE](../ARCHITECTURE.md) | [Getting Started](./GETTING_STARTED.md) | **Client Composition**
4
4
 
5
- Use `createSignalProtocolClient()` when app setup owns identity, local device storage,
6
- relay transport, remote encrypted object storage, logging, and protocol policy
7
- in one place.
5
+ Use `createHostedSignalProtocolClient()` to connect to the OpenE2EE Signal
6
+ Protocol Relay. Supply device-local storage, the environment connection URL,
7
+ and an identity-assertion callback. Advanced integrations can compose an
8
+ application-owned transport with `createSignalProtocolClient()`.
8
9
 
9
10
  This guide documents the current stable composition API. It groups local
10
11
  persistence under device storage, and an explicit object-store adapter supplies
@@ -29,6 +30,11 @@ const signal = await createSignalProtocolClient({
29
30
 
30
31
  ## Expo client on the Signal Protocol Relay
31
32
 
33
+ Configure the Relay project and its identity provider in the OpenE2EE console.
34
+ Copy the environment connection URL into your application configuration.
35
+ `getIdentityAssertion` returns a short-lived signed assertion for the signed-in
36
+ user. The hosted factory uses it for device registration and authentication.
37
+
32
38
  <!-- doc-snippet:skip requires-external-context -->
33
39
  ```ts
34
40
  import { createHostedSignalProtocolClient } from "@open-e2ee/signal-protocol-sdk";
@@ -85,7 +85,7 @@ model and what is out of scope.
85
85
  | **Sesame** | Sesame rev. 2 | **Deviation** on session expiry (§4.2 applies only to unacknowledged sessions), on deleted devices (hard-removed rather than marked stale), and on device-list currency (the sender reads the relay's list at most once per 60 s instead of the server rejecting a stale send). **Extensions:** QR provisioning, device transfer, encrypted device names, identity-change gating, a 5-device cap | Product requirements the specification does not address | Hard deletion **drops the MAXLATENCY window, so in-flight messages from a just-removed device become permanently undecryptable**. A device linked or removed less than 60 s ago can miss a send or still receive one. Device transfer clones ratchet state, which weakens the forward-secrecy bound |
86
86
  | **Sealed sender** | `libsignal` `sealed_sender.rs` | **Faithful** on the multi-recipient transport labels, KEM, AES-256-GCM-SIV, binary format, and `0x3FFF` registration-ID mask. **Extension:** sender and server certificates require signed Relay scope and issuer validity under operator-owned Ed25519 roots | Binds anonymous delivery to one Relay deployment and supports explicit issuer rotation and revocation | The transport follows `libsignal`; certificates are not interchangeable with Signal Messenger or another deployment |
87
87
  | **Delivery token** | `libsignal` `profile_key.rs` | **Faithful.** `deriveAccessKey` follows `libsignal`'s `ProfileKey::derive_access_key`, and reproduces `libsignal`'s published known-answer values | — | Not an SDK invention, despite what the module name suggests |
88
- | **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 |
88
+ | **Sender keys** | `libsignal` `sender_keys.rs` | **Deviation.** Protobuf fields, chain seeds, and HKDF-Extract/Expand match. The SDK uses frame version `0x44`, Ed25519 signatures, and UTF-8 distribution identifiers. | The identity profile selects Ed25519. The frame version marks the correction of the former missing Extract. | Message-key derivation matches the reference. Former SDK state and messages require a reset. Frames still differ from Signal Messenger. |
89
89
  | **Groups** | Signal Private Group System | **Independent design.** Real zkgroup primitives underneath; profile-key credential issuance blinds the ACI-bound profile-key attribute, the server validates every change against zero-knowledge presentations and signs the accepted result, and clients verify those signatures | 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 issuer sees the authenticated ACI and redemption window, but not the raw profile key |
90
90
  | **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 labeled 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 |
91
91
  | **Registration IDs** | `libsignal` `sealed_sender.rs` | **Faithful.** Generated in `[1, 16383]`, strictly inside the 14 bits the wire format reserves | — | — |
@@ -873,13 +873,16 @@ Signal Messenger trust root.
873
873
  These parts match:
874
874
 
875
875
  - protobuf field numbers and types, against [`wire.proto`][wp] exactly
876
- - the `[version byte] ‖ protobuf ‖ [64-byte signature]` framing with version
877
- `0x33`
876
+ - the `[version byte] ‖ protobuf ‖ [64-byte signature]` framing
878
877
  - the `0x01`/`0x02` chain seeds and the `WhisperGroup` info string
879
878
  - AES-256-CBC with the derived IV
880
879
  - the capacity constants
881
880
 
882
- Three things do not:
881
+ The following details differ:
882
+
883
+ **The signed frame version is `0x44`**. The format break in §7.2 separates
884
+ corrected message-key derivation from the former SDK derivation. Libsignal uses
885
+ `0x33`.
883
886
 
884
887
  **`distributionUuid` carries a UTF-8 string, not 16 UUID bytes**. The SDK writes
885
888
  the 36-character textual form of a random UUIDv4
@@ -899,31 +902,27 @@ requires an opaque identifier.
899
902
  **Signatures are Ed25519, not XEdDSA**, per §1.2. `libsignal` also serializes the
900
903
  signing key as 33 bytes where the SDK uses 32.
901
904
 
902
- ### 7.2 Message-key derivation omits HKDF-Extract
903
-
904
- This one is worth stating precisely because the field numbers and labels above
905
- make the format look compatible.
905
+ ### 7.2 Message-key derivation matches the reference
906
906
 
907
- `libsignal` derives sender message keys with
908
- `Hkdf::<Sha256>::new(None, &seed).expand(b"WhisperGroup", 48)`
909
- ([`sender_keys.rs:36-38`][sk]). `Hkdf::new` runs HKDF-**Extract** first, as
910
- `PRK = HMAC-SHA256(salt = zeros[32], seed)`. Only then does it expand.
907
+ Reviewed: 2026-10-02.
911
908
 
912
- The SDK calls `hkdfExpand(seed, info, 48)` directly
913
- (`internal/protocol/sender-keys/manager.ts:1062-1066`), where `hkdfExpand`
914
- (`internal/crypto/kdf/hkdf.ts:86-116`) is pure RFC 5869 Expand using the seed
915
- itself as the PRK. The SDK never runs the extract step.
909
+ The SDK derives Sender Keys message material with HKDF-SHA256 Extract and
910
+ Expand. Its input is `HMAC-SHA256(chain_key, 0x01)`, its salt is 32 zero bytes,
911
+ and its info string is `WhisperGroup`. The 48-byte output contains a 16-byte
912
+ IV followed by a 32-byte cipher key. This matches
913
+ [`SenderMessageKey::new` in libsignal][sk].
916
914
 
917
- The derived IV and cipher key therefore differ from `libsignal`'s for the same
918
- chain key. A numeric check confirms it, rather than inspection alone. For a chain
919
- key of 32 repeated `0x42` bytes, the SDK derives IV
920
- `2a56b9eb80b3c1ffebd97221b2175960` where `libsignal` derives
921
- `890d51ea73e564722351dc0d5a09142c`.
915
+ The former implementation omitted Extract. The correction changes derived keys
916
+ and requires a format break. State and encrypted distribution messages now
917
+ require `senderKeyVersion: 'v2'`. Signed group frames require byte `0x44`.
918
+ The SDK rejects old state, unversioned distributions, and old frames.
919
+ Applications must reset group sender-key state and discard queued group sends
920
+ before they redistribute keys with upgraded peers.
922
921
 
923
- This appears unintentional. It is not a weakness, because dropping Extract from a
924
- uniformly random HMAC output is cryptographically sound. The repository's own
925
- sender-keys note still claims equivalence with `libsignal` at this step, and that
926
- claim is incorrect. This entry flags it for correction.
922
+ For a chain key of 32 repeated `0x42` bytes, the current IV is
923
+ `890d51ea73e564722351dc0d5a09142c`. The former IV was
924
+ `2a56b9eb80b3c1ffebd97221b2175960`. An independent Node/OpenSSL oracle checks
925
+ ciphertext against the current derivation.
927
926
 
928
927
  ### 7.3 Groups are an independent design
929
928