@open-e2ee/signal-protocol-sdk 0.2.2 → 0.3.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 (601) hide show
  1. package/ADAPTERS.md +4 -4
  2. package/ARCHITECTURE.md +17 -16
  3. package/CHANGELOG.md +49 -0
  4. package/COMMERCIAL.md +6 -6
  5. package/NOTICE +1 -1
  6. package/README.md +44 -34
  7. package/SECURITY.md +16 -13
  8. package/TROUBLESHOOTING.md +5 -5
  9. package/blocking/README.md +6 -5
  10. package/client/README.md +5 -5
  11. package/device/README.md +8 -8
  12. package/dist/blocking/types.d.ts +2 -2
  13. package/dist/blocking/types.js +2 -2
  14. package/dist/client/client.d.ts +46 -45
  15. package/dist/client/client.d.ts.map +1 -1
  16. package/dist/client/client.js +61 -60
  17. package/dist/client/client.js.map +1 -1
  18. package/dist/client/config.d.ts +32 -32
  19. package/dist/client/constants.d.ts +7 -6
  20. package/dist/client/constants.d.ts.map +1 -1
  21. package/dist/client/constants.js +5 -4
  22. package/dist/client/constants.js.map +1 -1
  23. package/dist/client/dual-store.d.ts +2 -2
  24. package/dist/client/dual-store.js +2 -2
  25. package/dist/client/endorsement-manager.d.ts +14 -14
  26. package/dist/client/endorsement-manager.d.ts.map +1 -1
  27. package/dist/client/endorsement-manager.js +15 -15
  28. package/dist/client/endorsement-manager.js.map +1 -1
  29. package/dist/client/event-hooks.d.ts +16 -16
  30. package/dist/client/event-hooks.d.ts.map +1 -1
  31. package/dist/client/event-hooks.js +1 -1
  32. package/dist/client/event-hooks.js.map +1 -1
  33. package/dist/client/files.js +4 -4
  34. package/dist/client/files.js.map +1 -1
  35. package/dist/client/headless.d.ts +7 -7
  36. package/dist/client/headless.d.ts.map +1 -1
  37. package/dist/client/headless.js +4 -4
  38. package/dist/client/key-rotation-core.d.ts +19 -17
  39. package/dist/client/key-rotation-core.d.ts.map +1 -1
  40. package/dist/client/key-rotation-core.js +35 -31
  41. package/dist/client/key-rotation-core.js.map +1 -1
  42. package/dist/client/key-rotation.d.ts +8 -8
  43. package/dist/client/key-rotation.js +8 -8
  44. package/dist/client/media.d.ts +1 -1
  45. package/dist/client/messages.d.ts.map +1 -1
  46. package/dist/client/messages.js +13 -11
  47. package/dist/client/messages.js.map +1 -1
  48. package/dist/client/multi-device.d.ts +5 -4
  49. package/dist/client/multi-device.d.ts.map +1 -1
  50. package/dist/client/multi-device.js.map +1 -1
  51. package/dist/client/prekeys.d.ts +7 -7
  52. package/dist/client/prekeys.js +10 -10
  53. package/dist/client/prekeys.js.map +1 -1
  54. package/dist/client/relay-subscription.d.ts +3 -0
  55. package/dist/client/relay-subscription.d.ts.map +1 -1
  56. package/dist/client/relay-subscription.js +7 -4
  57. package/dist/client/relay-subscription.js.map +1 -1
  58. package/dist/client/retry-utils.d.ts +5 -6
  59. package/dist/client/retry-utils.d.ts.map +1 -1
  60. package/dist/client/retry-utils.js +5 -12
  61. package/dist/client/retry-utils.js.map +1 -1
  62. package/dist/client/retry.js +7 -7
  63. package/dist/client/retry.js.map +1 -1
  64. package/dist/client/sealed-sender-ops.d.ts +3 -3
  65. package/dist/client/sealed-sender-ops.js +5 -5
  66. package/dist/client/sealed-sender-ops.js.map +1 -1
  67. package/dist/client/sessions.d.ts +2 -2
  68. package/dist/client/sessions.js +2 -2
  69. package/dist/client/signal-service-cipher.d.ts +9 -9
  70. package/dist/client/signal-service-cipher.d.ts.map +1 -1
  71. package/dist/client/signal-service-cipher.js +41 -40
  72. package/dist/client/signal-service-cipher.js.map +1 -1
  73. package/dist/client/state.d.ts +1 -1
  74. package/dist/client/state.js +1 -1
  75. package/dist/client/types.d.ts +19 -19
  76. package/dist/client/types.d.ts.map +1 -1
  77. package/dist/device/connection.d.ts +1 -1
  78. package/dist/device/connection.js +2 -2
  79. package/dist/device/connection.js.map +1 -1
  80. package/dist/device/constants.d.ts +4 -4
  81. package/dist/device/constants.js +3 -3
  82. package/dist/device/device-id.d.ts +4 -4
  83. package/dist/device/device-id.js +4 -4
  84. package/dist/device/expo-metadata.d.ts +13 -11
  85. package/dist/device/expo-metadata.d.ts.map +1 -1
  86. package/dist/device/expo-metadata.js +13 -11
  87. package/dist/device/expo-metadata.js.map +1 -1
  88. package/dist/device/lifecycle/manager.d.ts +6 -6
  89. package/dist/device/lifecycle/manager.js +7 -7
  90. package/dist/device/lifecycle/types.d.ts +13 -13
  91. package/dist/device/lifecycle/types.d.ts.map +1 -1
  92. package/dist/device/lifecycle/utils.d.ts +2 -2
  93. package/dist/device/lifecycle/utils.js +5 -5
  94. package/dist/device/lifecycle/utils.js.map +1 -1
  95. package/dist/device/provisioning.d.ts +5 -4
  96. package/dist/device/provisioning.d.ts.map +1 -1
  97. package/dist/device/provisioning.js +5 -4
  98. package/dist/device/provisioning.js.map +1 -1
  99. package/dist/device/transfer.d.ts +2 -2
  100. package/dist/device/transfer.js +3 -3
  101. package/dist/device/transfer.js.map +1 -1
  102. package/dist/encoding/index.d.ts +3 -4
  103. package/dist/encoding/index.d.ts.map +1 -1
  104. package/dist/encoding/index.js.map +1 -1
  105. package/dist/files/index.d.ts +1 -1
  106. package/dist/files/index.js +1 -1
  107. package/dist/hooks/use-connection-presence.d.ts +1 -1
  108. package/dist/hooks/use-connection-presence.js +7 -7
  109. package/dist/hooks/use-connection-presence.js.map +1 -1
  110. package/dist/hooks/use-group-membership.d.ts +2 -2
  111. package/dist/hooks/use-group-membership.d.ts.map +1 -1
  112. package/dist/hooks/use-group-membership.js +6 -6
  113. package/dist/hooks/use-group-membership.js.map +1 -1
  114. package/dist/hooks/use-key-rotation.js +3 -3
  115. package/dist/hooks/use-key-rotation.js.map +1 -1
  116. package/dist/hooks/use-single-flight.d.ts +2 -2
  117. package/dist/hooks/use-single-flight.js +1 -1
  118. package/dist/index.d.ts +4 -3
  119. package/dist/index.d.ts.map +1 -1
  120. package/dist/index.js +22 -4
  121. package/dist/index.js.map +1 -1
  122. package/dist/internal/crypto/ec/ed25519.d.ts +6 -6
  123. package/dist/internal/crypto/ec/ed25519.js +6 -6
  124. package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
  125. package/dist/internal/crypto/ec/x25519-validation.js +4 -2
  126. package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
  127. package/dist/internal/crypto/index.d.ts +2 -0
  128. package/dist/internal/crypto/index.d.ts.map +1 -1
  129. package/dist/internal/crypto/index.js +2 -0
  130. package/dist/internal/crypto/index.js.map +1 -1
  131. package/dist/internal/crypto/kdf/hkdf.d.ts +9 -8
  132. package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
  133. package/dist/internal/crypto/kdf/hkdf.js +11 -10
  134. package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
  135. package/dist/internal/crypto/key-prefix.d.ts +3 -3
  136. package/dist/internal/crypto/key-prefix.js +3 -3
  137. package/dist/internal/crypto/pq/kyber.d.ts +7 -7
  138. package/dist/internal/crypto/pq/kyber.js +10 -10
  139. package/dist/internal/crypto/pq/kyber.js.map +1 -1
  140. package/dist/internal/crypto/random.d.ts +1 -1
  141. package/dist/internal/crypto/random.js +1 -1
  142. package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
  143. package/dist/internal/crypto/symmetric/aes.js +4 -4
  144. package/dist/internal/crypto/symmetric/aes.js.map +1 -1
  145. package/dist/internal/crypto/symmetric/mac.d.ts +1 -1
  146. package/dist/internal/crypto/symmetric/mac.js +3 -3
  147. package/dist/internal/crypto/symmetric/padding.js +1 -1
  148. package/dist/internal/crypto/symmetric/padding.js.map +1 -1
  149. package/dist/internal/crypto/symmetric/streaming-aead.d.ts +7 -1
  150. package/dist/internal/crypto/symmetric/streaming-aead.d.ts.map +1 -1
  151. package/dist/internal/crypto/symmetric/streaming-aead.js +10 -4
  152. package/dist/internal/crypto/symmetric/streaming-aead.js.map +1 -1
  153. package/dist/internal/crypto/utils.d.ts +2 -2
  154. package/dist/internal/crypto/utils.d.ts.map +1 -1
  155. package/dist/internal/crypto/utils.js +16 -14
  156. package/dist/internal/crypto/utils.js.map +1 -1
  157. package/dist/internal/crypto/validation.d.ts +4 -4
  158. package/dist/internal/crypto/validation.js +2 -2
  159. package/dist/internal/encoding/proto/envelope.d.ts +1 -1
  160. package/dist/internal/encoding/proto/envelope.js +1 -1
  161. package/dist/internal/encoding/proto/index.d.ts +4 -4
  162. package/dist/internal/encoding/proto/index.js +4 -4
  163. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +28 -16
  164. package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
  165. package/dist/internal/encoding/proto/pq-ratchet-serialize.js +30 -18
  166. package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
  167. package/dist/internal/encoding/proto/primitives.d.ts +45 -35
  168. package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
  169. package/dist/internal/encoding/proto/primitives.js +54 -43
  170. package/dist/internal/encoding/proto/primitives.js.map +1 -1
  171. package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
  172. package/dist/internal/encoding/proto/sender-key-message.js +2 -2
  173. package/dist/internal/encoding/proto/signal-message.d.ts +13 -13
  174. package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
  175. package/dist/internal/encoding/proto/signal-message.js +13 -13
  176. package/dist/internal/encoding/proto/signal-message.js.map +1 -1
  177. package/dist/internal/groups/access-control.d.ts +5 -5
  178. package/dist/internal/groups/access-control.js +6 -6
  179. package/dist/internal/groups/access-control.js.map +1 -1
  180. package/dist/internal/groups/change-actions.d.ts +4 -4
  181. package/dist/internal/groups/change-actions.js +3 -3
  182. package/dist/internal/groups/encrypted-state.js +1 -1
  183. package/dist/internal/groups/encrypted-state.js.map +1 -1
  184. package/dist/internal/groups/group-id.d.ts +1 -1
  185. package/dist/internal/groups/manager.d.ts +24 -23
  186. package/dist/internal/groups/manager.d.ts.map +1 -1
  187. package/dist/internal/groups/manager.js +40 -36
  188. package/dist/internal/groups/manager.js.map +1 -1
  189. package/dist/internal/groups/server-engine.d.ts +29 -21
  190. package/dist/internal/groups/server-engine.d.ts.map +1 -1
  191. package/dist/internal/groups/server-engine.js +55 -50
  192. package/dist/internal/groups/server-engine.js.map +1 -1
  193. package/dist/internal/groups/trust-root.d.ts +2 -2
  194. package/dist/internal/groups/trust-root.js +2 -2
  195. package/dist/internal/groups/types.d.ts +4 -4
  196. package/dist/internal/groups/types.d.ts.map +1 -1
  197. package/dist/internal/groups/wire.d.ts +6 -7
  198. package/dist/internal/groups/wire.d.ts.map +1 -1
  199. package/dist/internal/groups/wire.js +6 -7
  200. package/dist/internal/groups/wire.js.map +1 -1
  201. package/dist/internal/manager/manager.d.ts +14 -12
  202. package/dist/internal/manager/manager.d.ts.map +1 -1
  203. package/dist/internal/manager/manager.js +47 -41
  204. package/dist/internal/manager/manager.js.map +1 -1
  205. package/dist/internal/protocol/double-ratchet/chains.d.ts +8 -6
  206. package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
  207. package/dist/internal/protocol/double-ratchet/chains.js +10 -8
  208. package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
  209. package/dist/internal/protocol/double-ratchet/index.d.ts +2 -2
  210. package/dist/internal/protocol/double-ratchet/index.js +2 -2
  211. package/dist/internal/protocol/double-ratchet/ratchet.d.ts +4 -4
  212. package/dist/internal/protocol/double-ratchet/ratchet.js +6 -6
  213. package/dist/internal/protocol/pqxdh/pqxdh.d.ts +21 -18
  214. package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
  215. package/dist/internal/protocol/pqxdh/pqxdh.js +48 -42
  216. package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
  217. package/dist/internal/protocol/sealed-sender/decryption-v2.js +5 -5
  218. package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -1
  219. package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
  220. package/dist/internal/protocol/sealed-sender/decryption.js +11 -8
  221. package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
  222. package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +2 -2
  223. package/dist/internal/protocol/sealed-sender/delivery-token.js +2 -2
  224. package/dist/internal/protocol/sealed-sender/encryption-v2.js +1 -1
  225. package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
  226. package/dist/internal/protocol/sealed-sender/encryption.d.ts +2 -2
  227. package/dist/internal/protocol/sealed-sender/encryption.js +2 -2
  228. package/dist/internal/protocol/sealed-sender/proto/index.d.ts +25 -23
  229. package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
  230. package/dist/internal/protocol/sealed-sender/proto/index.js +32 -30
  231. package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
  232. package/dist/internal/protocol/sealed-sender/trust-root.d.ts +10 -9
  233. package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -1
  234. package/dist/internal/protocol/sealed-sender/trust-root.js +10 -9
  235. package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -1
  236. package/dist/internal/protocol/sealed-sender/types.d.ts +13 -14
  237. package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
  238. package/dist/internal/protocol/sealed-sender/types.js +7 -8
  239. package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
  240. package/dist/internal/protocol/sealed-sender/v2-binary.d.ts +1 -1
  241. package/dist/internal/protocol/sealed-sender/v2-binary.js +2 -2
  242. package/dist/internal/protocol/sealed-sender/v2-binary.js.map +1 -1
  243. package/dist/internal/protocol/sender-keys/manager.d.ts +16 -14
  244. package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
  245. package/dist/internal/protocol/sender-keys/manager.js +37 -34
  246. package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
  247. package/dist/internal/protocol/spqr/braid-serialize.d.ts +6 -6
  248. package/dist/internal/protocol/spqr/braid-serialize.js +5 -5
  249. package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -1
  250. package/dist/internal/protocol/spqr/braid.d.ts +3 -3
  251. package/dist/internal/protocol/spqr/braid.js +7 -7
  252. package/dist/internal/protocol/spqr/braid.js.map +1 -1
  253. package/dist/internal/protocol/spqr/index.js +1 -1
  254. package/dist/internal/protocol/spqr/index.js.map +1 -1
  255. package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts +3 -3
  256. package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js +3 -3
  257. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +1 -1
  258. package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
  259. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts +1 -1
  260. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js +1 -1
  261. package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js.map +1 -1
  262. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts +4 -3
  263. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts.map +1 -1
  264. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js +4 -3
  265. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js.map +1 -1
  266. package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +2 -2
  267. package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +1 -1
  268. package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +1 -1
  269. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +15 -7
  270. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
  271. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +15 -7
  272. package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
  273. package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js +1 -1
  274. package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts +3 -3
  275. package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js +1 -1
  276. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -7
  277. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +11 -11
  278. package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
  279. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts +1 -1
  280. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +6 -6
  281. package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
  282. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +2 -2
  283. package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
  284. package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
  285. package/dist/internal/protocol/spqr/serialize.d.ts +12 -12
  286. package/dist/internal/protocol/spqr/serialize.js +5 -5
  287. package/dist/internal/protocol/spqr/spqr.d.ts +6 -6
  288. package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
  289. package/dist/internal/protocol/spqr/spqr.js +47 -42
  290. package/dist/internal/protocol/spqr/spqr.js.map +1 -1
  291. package/dist/internal/protocol/spqr/validate.d.ts +1 -1
  292. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +12 -12
  293. package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
  294. package/dist/internal/protocol/triple-ratchet/ratchet.js +11 -11
  295. package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
  296. package/dist/internal/protocol/username/hash.d.ts.map +1 -1
  297. package/dist/internal/protocol/username/hash.js +6 -4
  298. package/dist/internal/protocol/username/hash.js.map +1 -1
  299. package/dist/internal/protocol/version.d.ts +3 -3
  300. package/dist/internal/protocol/version.js +1 -1
  301. package/dist/internal/protocol/x3dh/x3dh.d.ts +16 -16
  302. package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
  303. package/dist/internal/protocol/x3dh/x3dh.js +15 -15
  304. package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
  305. package/dist/internal/protocol/zk/credentials/attributes.d.ts +7 -7
  306. package/dist/internal/protocol/zk/credentials/attributes.js +7 -7
  307. package/dist/internal/protocol/zk/credentials/credentials.d.ts +1 -1
  308. package/dist/internal/protocol/zk/credentials/credentials.js +1 -1
  309. package/dist/internal/protocol/zk/credentials/endorsements.d.ts +11 -11
  310. package/dist/internal/protocol/zk/credentials/endorsements.js +14 -14
  311. package/dist/internal/protocol/zk/credentials/issuance.d.ts +5 -1
  312. package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
  313. package/dist/internal/protocol/zk/credentials/issuance.js +5 -1
  314. package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
  315. package/dist/internal/protocol/zk/credentials/presentation.d.ts +16 -16
  316. package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
  317. package/dist/internal/protocol/zk/credentials/presentation.js +18 -18
  318. package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
  319. package/dist/internal/protocol/zk/groups/auth-credential.d.ts +22 -16
  320. package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
  321. package/dist/internal/protocol/zk/groups/auth-credential.js +19 -14
  322. package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
  323. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +4 -4
  324. package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +4 -4
  325. package/dist/internal/protocol/zk/groups/group-params.d.ts +2 -2
  326. package/dist/internal/protocol/zk/groups/group-params.js +2 -2
  327. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +10 -9
  328. package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
  329. package/dist/internal/protocol/zk/groups/group-send-endorsement.js +9 -8
  330. package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
  331. package/dist/internal/protocol/zk/groups/lizard.d.ts +1 -1
  332. package/dist/internal/protocol/zk/groups/lizard.js +4 -4
  333. package/dist/internal/protocol/zk/groups/lizard.js.map +1 -1
  334. package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts +3 -3
  335. package/dist/internal/protocol/zk/groups/profile-key-commitment.js +3 -3
  336. package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +11 -11
  337. package/dist/internal/protocol/zk/groups/profile-key-credential.js +7 -7
  338. package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts +2 -2
  339. package/dist/internal/protocol/zk/groups/profile-key-encryption.js +2 -2
  340. package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts +2 -2
  341. package/dist/internal/protocol/zk/groups/profile-key-struct.js +2 -2
  342. package/dist/internal/protocol/zk/groups/profile-key-version.d.ts +2 -2
  343. package/dist/internal/protocol/zk/groups/profile-key-version.js +2 -2
  344. package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
  345. package/dist/internal/protocol/zk/groups/server-params.js +1 -1
  346. package/dist/internal/protocol/zk/groups/uid-encryption.d.ts +4 -4
  347. package/dist/internal/protocol/zk/groups/uid-encryption.js +4 -4
  348. package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -2
  349. package/dist/internal/protocol/zk/groups/uid-struct.js +3 -3
  350. package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
  351. package/dist/internal/protocol/zk/proofs/args.d.ts +3 -3
  352. package/dist/internal/protocol/zk/proofs/args.js +3 -3
  353. package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts +3 -3
  354. package/dist/internal/protocol/zk/proofs/sho-sha256.js +3 -3
  355. package/dist/internal/protocol/zk/proofs/sho.d.ts +8 -7
  356. package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -1
  357. package/dist/internal/protocol/zk/proofs/sho.js +8 -7
  358. package/dist/internal/protocol/zk/proofs/sho.js.map +1 -1
  359. package/dist/internal/protocol/zk/proofs/statement.d.ts +8 -6
  360. package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -1
  361. package/dist/internal/protocol/zk/proofs/statement.js +8 -6
  362. package/dist/internal/protocol/zk/proofs/statement.js.map +1 -1
  363. package/dist/internal/sesame/manager.d.ts +23 -19
  364. package/dist/internal/sesame/manager.d.ts.map +1 -1
  365. package/dist/internal/sesame/manager.js +64 -54
  366. package/dist/internal/sesame/manager.js.map +1 -1
  367. package/dist/internal/sesame/types.d.ts +28 -25
  368. package/dist/internal/sesame/types.d.ts.map +1 -1
  369. package/dist/internal/sesame/types.js +2 -2
  370. package/dist/internal/sesame/types.js.map +1 -1
  371. package/dist/internal/sesame/validation.d.ts +2 -2
  372. package/dist/internal/sesame/validation.js +3 -3
  373. package/dist/internal/sesame/validation.js.map +1 -1
  374. package/dist/internal/session/builder.d.ts +8 -8
  375. package/dist/internal/session/builder.js +22 -22
  376. package/dist/internal/session/builder.js.map +1 -1
  377. package/dist/internal/session/cipher.d.ts +3 -3
  378. package/dist/internal/session/cipher.d.ts.map +1 -1
  379. package/dist/internal/session/cipher.js +51 -40
  380. package/dist/internal/session/cipher.js.map +1 -1
  381. package/dist/internal/session/decryption.js +11 -9
  382. package/dist/internal/session/decryption.js.map +1 -1
  383. package/dist/internal/session/factory.js +1 -1
  384. package/dist/internal/session/factory.js.map +1 -1
  385. package/dist/internal/session/handshake.d.ts +4 -4
  386. package/dist/internal/session/handshake.js +4 -4
  387. package/dist/internal/session/keys.d.ts +3 -4
  388. package/dist/internal/session/keys.d.ts.map +1 -1
  389. package/dist/internal/session/keys.js.map +1 -1
  390. package/dist/internal/session/ratchet.d.ts +8 -8
  391. package/dist/internal/session/ratchet.js +10 -10
  392. package/dist/internal/session/ratchet.js.map +1 -1
  393. package/dist/internal/session/session-resolver.d.ts +6 -6
  394. package/dist/internal/session/session-resolver.js +6 -6
  395. package/dist/internal/session/state.d.ts +12 -12
  396. package/dist/internal/session/state.d.ts.map +1 -1
  397. package/dist/internal/session/state.js +7 -7
  398. package/dist/internal/session/types.d.ts +20 -20
  399. package/dist/internal/session/types.d.ts.map +1 -1
  400. package/dist/internal/session/types.js +3 -3
  401. package/dist/internal/session/validation.d.ts +1 -1
  402. package/dist/internal/session/validation.js +4 -4
  403. package/dist/internal/session/validation.js.map +1 -1
  404. package/dist/keys/branded.d.ts +12 -12
  405. package/dist/keys/branded.js +3 -3
  406. package/dist/keys/generation.d.ts +4 -4
  407. package/dist/keys/generation.js +4 -4
  408. package/dist/keys/identity.d.ts +7 -7
  409. package/dist/keys/identity.d.ts.map +1 -1
  410. package/dist/keys/identity.js +7 -7
  411. package/dist/keys/identity.js.map +1 -1
  412. package/dist/keys/types.d.ts +16 -16
  413. package/dist/keys/types.d.ts.map +1 -1
  414. package/dist/layers.d.ts +1 -1
  415. package/dist/layers.js +1 -1
  416. package/dist/local/store/expo/adapter.d.ts +8 -8
  417. package/dist/local/store/expo/adapter.js +10 -10
  418. package/dist/local/store/expo/adapter.js.map +1 -1
  419. package/dist/local/store/expo/database-key.d.ts +7 -7
  420. package/dist/local/store/expo/database-key.js +7 -7
  421. package/dist/local/store/expo/key-storage.d.ts +1 -1
  422. package/dist/local/store/expo/key-storage.js +4 -4
  423. package/dist/local/store/expo/key-storage.js.map +1 -1
  424. package/dist/local/store/expo/models/kyber-prekey-used.d.ts +6 -6
  425. package/dist/local/store/expo/models/kyber-prekey-used.js +3 -3
  426. package/dist/local/store/expo/models/kyber-prekey.d.ts +1 -1
  427. package/dist/local/store/expo/models/kyber-prekey.js +1 -1
  428. package/dist/local/store/expo/models/message-record.d.ts +2 -2
  429. package/dist/local/store/expo/models/message-record.d.ts.map +1 -1
  430. package/dist/local/store/expo/models/message-record.js +1 -1
  431. package/dist/local/store/expo/models/message-record.js.map +1 -1
  432. package/dist/local/store/expo/models/sender-key.d.ts +11 -10
  433. package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
  434. package/dist/local/store/expo/models/sender-key.js +11 -10
  435. package/dist/local/store/expo/models/sender-key.js.map +1 -1
  436. package/dist/local/store/expo/schema.d.ts +2 -2
  437. package/dist/local/store/expo/schema.js +2 -2
  438. package/dist/local/store/expo/secure-store-options.d.ts +1 -1
  439. package/dist/local/store/memory/adapter.d.ts +2 -2
  440. package/dist/local/store/memory/adapter.js +12 -12
  441. package/dist/local/store/memory/adapter.js.map +1 -1
  442. package/dist/local/store/node/adapter.d.ts.map +1 -1
  443. package/dist/local/store/node/adapter.js +5 -4
  444. package/dist/local/store/node/adapter.js.map +1 -1
  445. package/dist/local/store/node/database-key.d.ts +8 -8
  446. package/dist/local/store/node/database-key.js +10 -10
  447. package/dist/local/store/node/database-key.js.map +1 -1
  448. package/dist/local/store/node/database.d.ts +5 -5
  449. package/dist/local/store/node/database.js +11 -11
  450. package/dist/local/store/node/database.js.map +1 -1
  451. package/dist/local/store/react-native/adapter.d.ts +6 -6
  452. package/dist/local/store/react-native/adapter.d.ts.map +1 -1
  453. package/dist/local/store/react-native/adapter.js +35 -32
  454. package/dist/local/store/react-native/adapter.js.map +1 -1
  455. package/dist/local/store/react-native/backend-conformance.d.ts +11 -10
  456. package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -1
  457. package/dist/local/store/react-native/backend-conformance.js +13 -12
  458. package/dist/local/store/react-native/backend-conformance.js.map +1 -1
  459. package/dist/local/store/react-native/index.d.ts +1 -1
  460. package/dist/local/store/react-native/reference-backend.d.ts +14 -13
  461. package/dist/local/store/react-native/reference-backend.d.ts.map +1 -1
  462. package/dist/local/store/react-native/reference-backend.js +15 -14
  463. package/dist/local/store/react-native/reference-backend.js.map +1 -1
  464. package/dist/local/store/react-native/storage.d.ts +3 -3
  465. package/dist/local/store/web/adapter.d.ts +3 -3
  466. package/dist/local/store/web/adapter.d.ts.map +1 -1
  467. package/dist/local/store/web/adapter.js +30 -31
  468. package/dist/local/store/web/adapter.js.map +1 -1
  469. package/dist/local/store/web/index.d.ts +1 -1
  470. package/dist/local/vault/index.d.ts +2 -2
  471. package/dist/media/index.d.ts +11 -11
  472. package/dist/media/index.js +9 -9
  473. package/dist/profile/contact-state.d.ts +1 -1
  474. package/dist/profile/contact-state.js +1 -1
  475. package/dist/profile/profile-key.d.ts +2 -2
  476. package/dist/profile/profile-key.js +7 -6
  477. package/dist/profile/profile-key.js.map +1 -1
  478. package/dist/remote/object-store/index.d.ts +1 -1
  479. package/dist/remote/object-store/s3/storage.d.ts +1 -1
  480. package/dist/remote/object-store/types.d.ts +4 -4
  481. package/dist/remote/object-store/types.d.ts.map +1 -1
  482. package/dist/remote/relay/convex/backend.d.ts +4 -4
  483. package/dist/remote/relay/convex/backend.js +3 -3
  484. package/dist/remote/relay/convex/backend.js.map +1 -1
  485. package/dist/remote/relay/convex/component/accounts.d.ts +15 -13
  486. package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -1
  487. package/dist/remote/relay/convex/component/accounts.js +31 -28
  488. package/dist/remote/relay/convex/component/accounts.js.map +1 -1
  489. package/dist/remote/relay/convex/component/certificates.js +1 -1
  490. package/dist/remote/relay/convex/component/cleanup.js +7 -7
  491. package/dist/remote/relay/convex/component/cleanup.js.map +1 -1
  492. package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -1
  493. package/dist/remote/relay/convex/component/convex.config.js +10 -8
  494. package/dist/remote/relay/convex/component/convex.config.js.map +1 -1
  495. package/dist/remote/relay/convex/component/devices.d.ts +21 -20
  496. package/dist/remote/relay/convex/component/devices.d.ts.map +1 -1
  497. package/dist/remote/relay/convex/component/devices.js +24 -23
  498. package/dist/remote/relay/convex/component/devices.js.map +1 -1
  499. package/dist/remote/relay/convex/component/groups.js +6 -6
  500. package/dist/remote/relay/convex/component/groups.js.map +1 -1
  501. package/dist/remote/relay/convex/component/messages.d.ts.map +1 -1
  502. package/dist/remote/relay/convex/component/messages.js +89 -82
  503. package/dist/remote/relay/convex/component/messages.js.map +1 -1
  504. package/dist/remote/relay/convex/component/provisioning.d.ts +3 -3
  505. package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -1
  506. package/dist/remote/relay/convex/component/provisioning.js +17 -16
  507. package/dist/remote/relay/convex/component/provisioning.js.map +1 -1
  508. package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -1
  509. package/dist/remote/relay/convex/component/runtime.js +4 -2
  510. package/dist/remote/relay/convex/component/runtime.js.map +1 -1
  511. package/dist/remote/relay/convex/component/schema.js +25 -24
  512. package/dist/remote/relay/convex/component/schema.js.map +1 -1
  513. package/dist/remote/relay/convex/group-server.d.ts +3 -3
  514. package/dist/remote/relay/convex/group-server.js +3 -3
  515. package/dist/remote/relay/convex/relay.d.ts +3 -3
  516. package/dist/remote/relay/convex/relay.d.ts.map +1 -1
  517. package/dist/remote/relay/convex/relay.js +18 -17
  518. package/dist/remote/relay/convex/relay.js.map +1 -1
  519. package/dist/remote/relay/convex/types.d.ts +7 -7
  520. package/dist/remote/relay/convex/types.js +4 -4
  521. package/dist/remote/relay/memory/adapter.js +9 -9
  522. package/dist/remote/relay/memory/adapter.js.map +1 -1
  523. package/dist/remote/relay/types.d.ts +27 -27
  524. package/dist/remote/relay/types.d.ts.map +1 -1
  525. package/dist/safety/fingerprint.d.ts +7 -6
  526. package/dist/safety/fingerprint.d.ts.map +1 -1
  527. package/dist/safety/fingerprint.js +5 -4
  528. package/dist/safety/fingerprint.js.map +1 -1
  529. package/dist/safety/index.d.ts +6 -5
  530. package/dist/safety/index.d.ts.map +1 -1
  531. package/dist/safety/index.js +7 -6
  532. package/dist/safety/index.js.map +1 -1
  533. package/dist/safety/protobuf.js +2 -2
  534. package/dist/safety/protobuf.js.map +1 -1
  535. package/dist/safety/url.d.ts +5 -5
  536. package/dist/safety/url.js +6 -6
  537. package/dist/types/address.d.ts +2 -2
  538. package/dist/types/address.js +2 -2
  539. package/dist/types/api.d.ts +78 -73
  540. package/dist/types/api.d.ts.map +1 -1
  541. package/dist/types/errors.d.ts +63 -403
  542. package/dist/types/errors.d.ts.map +1 -1
  543. package/dist/types/errors.js +62 -537
  544. package/dist/types/errors.js.map +1 -1
  545. package/dist/types/messages.d.ts +16 -16
  546. package/dist/types/messages.d.ts.map +1 -1
  547. package/dist/types/messages.js +7 -7
  548. package/dist/types/messages.js.map +1 -1
  549. package/dist/types/protocol-config.d.ts +52 -49
  550. package/dist/types/protocol-config.d.ts.map +1 -1
  551. package/dist/types/protocol-config.js +36 -34
  552. package/dist/types/protocol-config.js.map +1 -1
  553. package/dist/types/protocol-constants.d.ts +2 -2
  554. package/dist/types/protocol-constants.js +2 -2
  555. package/dist/types/session.d.ts +62 -61
  556. package/dist/types/session.d.ts.map +1 -1
  557. package/dist/types/session.js +13 -14
  558. package/dist/types/session.js.map +1 -1
  559. package/dist/types/trust.d.ts +8 -8
  560. package/dist/types/trust.js +3 -3
  561. package/dist/utils/retry.d.ts.map +1 -1
  562. package/dist/utils/retry.js +2 -4
  563. package/dist/utils/retry.js.map +1 -1
  564. package/docs/ASSURANCE.md +82 -74
  565. package/docs/CLIENT_COMPOSITION.md +19 -15
  566. package/docs/DEVIATIONS.md +507 -425
  567. package/docs/DOCUMENTATION_STANDARDS.md +24 -24
  568. package/docs/E2EE.md +45 -42
  569. package/docs/ERROR_HANDLING.md +29 -105
  570. package/docs/GETTING_STARTED.md +24 -25
  571. package/docs/INTERFACES.md +27 -18
  572. package/docs/PACKAGE_SURFACE.md +23 -21
  573. package/docs/PROTOCOL_POLICY.md +19 -13
  574. package/docs/RECIPES.md +4 -4
  575. package/docs/SECURITY.md +72 -60
  576. package/encoding/README.md +2 -2
  577. package/files/README.md +1 -1
  578. package/groups/README.md +4 -3
  579. package/hooks/README.md +2 -2
  580. package/keys/README.md +15 -14
  581. package/local/store/README.md +82 -67
  582. package/local/store/expo/README.md +17 -12
  583. package/local/store/memory/README.md +4 -3
  584. package/local/store/node/README.md +8 -6
  585. package/local/store/react-native/README.md +14 -12
  586. package/local/store/web/README.md +31 -26
  587. package/local/vault/README.md +4 -4
  588. package/media/README.md +6 -5
  589. package/package.json +2 -2
  590. package/profile/README.md +7 -7
  591. package/remote/README.md +20 -18
  592. package/remote/object-store/README.md +8 -4
  593. package/remote/object-store/convex-r2/README.md +3 -3
  594. package/remote/object-store/s3/README.md +10 -5
  595. package/remote/relay/convex/README.md +5 -5
  596. package/remote/relay/convex/component/README.md +145 -124
  597. package/remote/relay/memory/README.md +6 -5
  598. package/safety/README.md +1 -1
  599. package/sealed-sender/README.md +3 -2
  600. package/types/README.md +1 -1
  601. package/utils/README.md +4 -4
@@ -6,7 +6,7 @@
6
6
  * - Stage 2 (Sender): Encrypts certificate + message
7
7
  *
8
8
  * This provides binding between the ephemeral key and sender identity,
9
- * ensuring the sender cannot be impersonated even if the ephemeral key
9
+ * so the sender cannot be impersonated even if the ephemeral key
10
10
  * is somehow compromised.
11
11
  *
12
12
  * @see https://signal.org/blog/sealed-sender/
@@ -18,7 +18,7 @@ import type { SealOptions, UnidentifiedSenderMessage } from './types.js';
18
18
  * Format: contentType(1) || varint(certLen) || certBytes || varint(msgLen) || msg || contentHint
19
19
  *
20
20
  * The content type leads because it is what the recipient needs before it can
21
- * do anything with the payload. No group identifier is serialized: a group
21
+ * do anything with the payload. No group identifier is serialized. A group
22
22
  * message says only that it is a framed SenderKeyMessage, and the recipient
23
23
  * resolves the group from the frame's opaque distribution identifier.
24
24
  *
@@ -6,7 +6,7 @@
6
6
  * - Stage 2 (Sender): Encrypts certificate + message
7
7
  *
8
8
  * This provides binding between the ephemeral key and sender identity,
9
- * ensuring the sender cannot be impersonated even if the ephemeral key
9
+ * so the sender cannot be impersonated even if the ephemeral key
10
10
  * is somehow compromised.
11
11
  *
12
12
  * @see https://signal.org/blog/sealed-sender/
@@ -128,7 +128,7 @@ export async function seal(options) {
128
128
  const s_salt = concatBytes(e_chain, e_ciphertext, e_mac);
129
129
  // Step 2.3: Derive sender keys (96 bytes: discard + cipher + mac)
130
130
  // The first 32 bytes of the 96-byte derivation are domain-separated discard
131
- // material; cipher and MAC keys occupy the remaining bytes.
131
+ // material. Cipher and MAC keys occupy the remaining bytes.
132
132
  const s_material = await hkdf(s_sharedSecret, s_salt, new Uint8Array(0), 96);
133
133
  toZero.push(s_material);
134
134
  // s_material[0:32] discarded (mirrors EphemeralKeys structure)
@@ -2,25 +2,25 @@
2
2
  * Wire Codec for Sealed Sender
3
3
  *
4
4
  * Hand-written static encoders and decoders for the sealed sender wire format,
5
- * built on the shared protobuf primitives. No code is generated at runtime, so
5
+ * built on the shared protobuf primitives. Nothing generates code at runtime, so
6
6
  * this path runs under `script-src 'self'`, in a Chrome MV3 extension, and
7
7
  * under `node --disallow-code-generation-from-strings`.
8
8
  *
9
- * Certificates are signed over their *serialized* inner bytes, so byte
9
+ * A certificate signature covers its *serialized* inner bytes, so byte
10
10
  * identity here is what keeps an already-issued certificate verifiable. Two
11
11
  * consequences run through the whole module:
12
12
  *
13
13
  * - Nothing re-encodes a signed region. Wherever the surface carries a signed
14
- * payload it carries the raw bytes the signer saw — `certificate` in either
15
- * wrapper, and `signerCertificate` inside the sender certificate — and the
16
- * decoders hand those bytes straight through.
14
+ * payload it carries the raw bytes the signer saw. That covers `certificate`
15
+ * in either wrapper, and `signerCertificate` inside the sender certificate.
16
+ * The decoders hand those bytes straight through.
17
17
  * - The encoders reproduce what this module emitted before, field for field
18
18
  * and byte for byte, including writing an explicitly-set zero. The
19
19
  * `sealed-sender` golden vectors pin every case in both directions. One
20
- * input diverges: a string holding an unpaired surrogate encodes to the
21
- * replacement character here, where reflection emitted the surrogate's own
22
- * three bytes. `senderE164` and `senderUuid` are the only string fields,
23
- * and no verification path re-encodes either.
20
+ * input diverges. A string holding an unpaired surrogate encodes to the
21
+ * replacement character here. Reflection emitted the surrogate's own three
22
+ * bytes. The `senderE164` and `senderUuid` fields are the only string
23
+ * fields, and no verification path re-encodes either.
24
24
  *
25
25
  * Field numbers are those this format has always written, and
26
26
  * `UnidentifiedDelivery.proto` alongside this file now records them.
@@ -102,8 +102,8 @@ export declare function encodeServerCertificate(cert: ServerCertificateProto): U
102
102
  /**
103
103
  * Decode server certificate outer wrapper from protobuf bytes.
104
104
  *
105
- * `certificate` is returned exactly as it arrived — it is the byte string the
106
- * signature was computed over.
105
+ * `certificate` comes back exactly as it arrived. It is the byte string that
106
+ * the signature covers.
107
107
  */
108
108
  export declare function decodeServerCertificate(bytes: Uint8Array): ServerCertificateProto;
109
109
  /**
@@ -111,7 +111,7 @@ export declare function decodeServerCertificate(bytes: Uint8Array): ServerCertif
111
111
  * Field numbers are part of the sealed-sender wire format.
112
112
  *
113
113
  * These are the bytes the issuing server signs. Fields are written in field
114
- * number order; `senderE164` is written only when the sender has one, which is
114
+ * number order. `senderE164` is written only when the sender has one, which is
115
115
  * the one field a certificate may legitimately omit.
116
116
  */
117
117
  export declare function encodeSenderCertificateData(data: SenderCertificateData): Uint8Array;
@@ -130,29 +130,31 @@ export declare function encodeSenderCertificate(cert: SenderCertificateProto): U
130
130
  /**
131
131
  * Decode sender certificate outer wrapper from protobuf bytes.
132
132
  *
133
- * `certificate` is returned exactly as it arrived — it is the byte string the
134
- * signature was computed over.
133
+ * `certificate` comes back exactly as it arrived. It is the byte string that
134
+ * the signature covers.
135
135
  */
136
136
  export declare function decodeSenderCertificate(bytes: Uint8Array): SenderCertificateProto;
137
137
  /**
138
138
  * Encode inner message data to bytes.
139
139
  *
140
- * `contentHint` is written whenever it is set, zero included — an absent hint
140
+ * `contentHint` is written whenever it is set, zero included. An absent hint
141
141
  * and a hint of zero are different statements. `groupId` follows the same rule.
142
142
  */
143
143
  export declare function encodeUnidentifiedSenderMessageData(data: UnidentifiedSenderMessageData): Uint8Array;
144
144
  /**
145
145
  * Decode inner message data from bytes.
146
146
  *
147
- * `type` is returned as it arrived — 0 when the field is absent, and any
147
+ * `type` is returned as it arrived: 0 when the field is absent, and any
148
148
  * other value the wire carried, declared by the enum or not. Reflection
149
- * clamped every undeclared value to the enum's first arm, so both an absent
150
- * type and a type from a newer peer were reported as `PREKEY_MESSAGE`, which
151
- * the sender never wrote; preserving the value is also what the protobuf spec
152
- * asks of a decoder. The return type names the enum but nothing here narrows
153
- * to it, so a caller that routes on `type` must put it through
154
- * `isSealedSenderContentType` first. Neither decrypt path does today — both
155
- * read the content type from the envelope framing, not from this decoder.
149
+ * clamped every undeclared value to the enum's first arm. Both an absent type
150
+ * and a type from a newer peer were reported as `PREKEY_MESSAGE`, which the
151
+ * sender never wrote. Preserving the value is also what the protobuf spec
152
+ * asks of a decoder.
153
+ *
154
+ * The return type names the enum but nothing here narrows to it, so a caller
155
+ * that routes on `type` must put it through `isSealedSenderContentType`
156
+ * first. Neither decrypt path does today. Both read the content type from the
157
+ * envelope framing, not from this decoder.
156
158
  */
157
159
  export declare function decodeUnidentifiedSenderMessageData(bytes: Uint8Array): UnidentifiedSenderMessageData;
158
160
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../internal/protocol/sealed-sender/proto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAsBnD;;GAEG;AACH,OAAO,EAAE,CAAC;AACV,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,UAAU,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,UAAU,CAAC;IACxB,iBAAiB,EAAE,UAAU,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,IAAI,WAAW,EAAE,CAAC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+B,CAAC,GAAG,EAAE,8BAA8B,GAAG,UAAU,CAM/F;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,UAAU,GAAG,8BAA8B,CAyBjG;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEvD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAExD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../internal/protocol/sealed-sender/proto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAsBnD;;GAEG;AACH,OAAO,EAAE,CAAC;AACV,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,UAAU,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,UAAU,CAAC;IACxB,iBAAiB,EAAE,UAAU,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,UAAU,CAAC;IACxB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,IAAI,WAAW,EAAE,CAAC;AAElD;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,uBAAuB,CAAC;IAC9B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AA+B,CAAC,KAAK,EAAE,UAAU,GAAG,8BAA8B,CAyBjG;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEvD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAExD"}
@@ -2,32 +2,32 @@
2
2
  * Wire Codec for Sealed Sender
3
3
  *
4
4
  * Hand-written static encoders and decoders for the sealed sender wire format,
5
- * built on the shared protobuf primitives. No code is generated at runtime, so
5
+ * built on the shared protobuf primitives. Nothing generates code at runtime, so
6
6
  * this path runs under `script-src 'self'`, in a Chrome MV3 extension, and
7
7
  * under `node --disallow-code-generation-from-strings`.
8
8
  *
9
- * Certificates are signed over their *serialized* inner bytes, so byte
9
+ * A certificate signature covers its *serialized* inner bytes, so byte
10
10
  * identity here is what keeps an already-issued certificate verifiable. Two
11
11
  * consequences run through the whole module:
12
12
  *
13
13
  * - Nothing re-encodes a signed region. Wherever the surface carries a signed
14
- * payload it carries the raw bytes the signer saw — `certificate` in either
15
- * wrapper, and `signerCertificate` inside the sender certificate — and the
16
- * decoders hand those bytes straight through.
14
+ * payload it carries the raw bytes the signer saw. That covers `certificate`
15
+ * in either wrapper, and `signerCertificate` inside the sender certificate.
16
+ * The decoders hand those bytes straight through.
17
17
  * - The encoders reproduce what this module emitted before, field for field
18
18
  * and byte for byte, including writing an explicitly-set zero. The
19
19
  * `sealed-sender` golden vectors pin every case in both directions. One
20
- * input diverges: a string holding an unpaired surrogate encodes to the
21
- * replacement character here, where reflection emitted the surrogate's own
22
- * three bytes. `senderE164` and `senderUuid` are the only string fields,
23
- * and no verification path re-encodes either.
20
+ * input diverges. A string holding an unpaired surrogate encodes to the
21
+ * replacement character here. Reflection emitted the surrogate's own three
22
+ * bytes. The `senderE164` and `senderUuid` fields are the only string
23
+ * fields, and no verification path re-encodes either.
24
24
  *
25
25
  * Field numbers are those this format has always written, and
26
26
  * `UnidentifiedDelivery.proto` alongside this file now records them.
27
27
  */
28
28
  import { SealedSenderContentType } from '../types.js';
29
29
  /* The encoding helpers come from their own module rather than the crypto
30
- * barrel: the relay component bundles this codec, and the barrel also exports
30
+ * barrel. The relay component bundles this codec, and the barrel also exports
31
31
  * `generateRandomBytes`, whose third-choice runtime fallback is a dynamic
32
32
  * `import('expo-crypto')`. That fallback never runs on a server, but a bundler
33
33
  * still parses what it reaches, and the Expo package pulls in React Native. */
@@ -43,17 +43,17 @@ export { SealedSenderContentType as MessageType };
43
43
  // ============================================================================
44
44
  // Field Numbers
45
45
  // ============================================================================
46
- /** `ServerCertificate.Certificate` — the signed inner server certificate. */
46
+ /** `ServerCertificate.Certificate`: the signed inner server certificate. */
47
47
  const SERVER_CERTIFICATE_DATA = {
48
48
  id: 1,
49
49
  key: 2,
50
50
  };
51
- /** `ServerCertificate` — the outer wrapper carrying the signature. */
51
+ /** `ServerCertificate`: the outer wrapper carrying the signature. */
52
52
  const SERVER_CERTIFICATE = {
53
53
  certificate: 1,
54
54
  signature: 2,
55
55
  };
56
- /** `SenderCertificate.Certificate` — the signed inner sender certificate. */
56
+ /** `SenderCertificate.Certificate`: the signed inner sender certificate. */
57
57
  const SENDER_CERTIFICATE_DATA = {
58
58
  senderE164: 1,
59
59
  senderDevice: 2,
@@ -62,12 +62,12 @@ const SENDER_CERTIFICATE_DATA = {
62
62
  signerCertificate: 5,
63
63
  senderUuid: 6,
64
64
  };
65
- /** `SenderCertificate` — the outer wrapper carrying the signature. */
65
+ /** `SenderCertificate`: the outer wrapper carrying the signature. */
66
66
  const SENDER_CERTIFICATE = {
67
67
  certificate: 1,
68
68
  signature: 2,
69
69
  };
70
- /** `UnidentifiedSenderMessage.Message` — the decrypted inner message. */
70
+ /** `UnidentifiedSenderMessage.Message`: the decrypted inner message. */
71
71
  const UNIDENTIFIED_SENDER_MESSAGE_DATA = {
72
72
  type: 1,
73
73
  senderCertificate: 2,
@@ -75,7 +75,7 @@ const UNIDENTIFIED_SENDER_MESSAGE_DATA = {
75
75
  contentHint: 4,
76
76
  groupId: 5,
77
77
  };
78
- /** `UnidentifiedSenderMessage` — the sealed envelope. */
78
+ /** `UnidentifiedSenderMessage`: the sealed envelope. */
79
79
  const UNIDENTIFIED_SENDER_MESSAGE = {
80
80
  ephemeralPublic: 1,
81
81
  encryptedStatic: 2,
@@ -128,8 +128,8 @@ export function encodeServerCertificate(cert) {
128
128
  /**
129
129
  * Decode server certificate outer wrapper from protobuf bytes.
130
130
  *
131
- * `certificate` is returned exactly as it arrived — it is the byte string the
132
- * signature was computed over.
131
+ * `certificate` comes back exactly as it arrived. It is the byte string that
132
+ * the signature covers.
133
133
  */
134
134
  export function decodeServerCertificate(bytes) {
135
135
  const reader = new ProtoReader(bytes);
@@ -159,7 +159,7 @@ export function decodeServerCertificate(bytes) {
159
159
  * Field numbers are part of the sealed-sender wire format.
160
160
  *
161
161
  * These are the bytes the issuing server signs. Fields are written in field
162
- * number order; `senderE164` is written only when the sender has one, which is
162
+ * number order. `senderE164` is written only when the sender has one, which is
163
163
  * the one field a certificate may legitimately omit.
164
164
  */
165
165
  export function encodeSenderCertificateData(data) {
@@ -236,8 +236,8 @@ export function encodeSenderCertificate(cert) {
236
236
  /**
237
237
  * Decode sender certificate outer wrapper from protobuf bytes.
238
238
  *
239
- * `certificate` is returned exactly as it arrived — it is the byte string the
240
- * signature was computed over.
239
+ * `certificate` comes back exactly as it arrived. It is the byte string that
240
+ * the signature covers.
241
241
  */
242
242
  export function decodeSenderCertificate(bytes) {
243
243
  const reader = new ProtoReader(bytes);
@@ -265,7 +265,7 @@ export function decodeSenderCertificate(bytes) {
265
265
  /**
266
266
  * Encode inner message data to bytes.
267
267
  *
268
- * `contentHint` is written whenever it is set, zero included — an absent hint
268
+ * `contentHint` is written whenever it is set, zero included. An absent hint
269
269
  * and a hint of zero are different statements. `groupId` follows the same rule.
270
270
  */
271
271
  export function encodeUnidentifiedSenderMessageData(data) {
@@ -285,15 +285,17 @@ export function encodeUnidentifiedSenderMessageData(data) {
285
285
  /**
286
286
  * Decode inner message data from bytes.
287
287
  *
288
- * `type` is returned as it arrived — 0 when the field is absent, and any
288
+ * `type` is returned as it arrived: 0 when the field is absent, and any
289
289
  * other value the wire carried, declared by the enum or not. Reflection
290
- * clamped every undeclared value to the enum's first arm, so both an absent
291
- * type and a type from a newer peer were reported as `PREKEY_MESSAGE`, which
292
- * the sender never wrote; preserving the value is also what the protobuf spec
293
- * asks of a decoder. The return type names the enum but nothing here narrows
294
- * to it, so a caller that routes on `type` must put it through
295
- * `isSealedSenderContentType` first. Neither decrypt path does today — both
296
- * read the content type from the envelope framing, not from this decoder.
290
+ * clamped every undeclared value to the enum's first arm. Both an absent type
291
+ * and a type from a newer peer were reported as `PREKEY_MESSAGE`, which the
292
+ * sender never wrote. Preserving the value is also what the protobuf spec
293
+ * asks of a decoder.
294
+ *
295
+ * The return type names the enum but nothing here narrows to it, so a caller
296
+ * that routes on `type` must put it through `isSealedSenderContentType`
297
+ * first. Neither decrypt path does today. Both read the content type from the
298
+ * envelope framing, not from this decoder.
297
299
  */
298
300
  export function decodeUnidentifiedSenderMessageData(bytes) {
299
301
  const reader = new ProtoReader(bytes);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../internal/protocol/sealed-sender/proto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD;;;;+EAI+E;AAC/E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AA2C5C;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,IAAI,WAAW,EAAE,CAAC;AAsBlD,+EAA+E;AAC/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A2B,CAAC,eAAe;gBAC9C,eAAe,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACrC,MAAM;YACR,KAAK,2BAA2B,CAAC,eAAe;gBAC9C,eAAe,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACrC,MAAM;YACR,KAAK,2BAA2B,CAAC,gBAAgB;gBAC/C,gBAAgB,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACtC,MAAM;YACR;gBACE,MAAM,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM;QACV,CAAC;IACH,CAAC;IAED,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC;AAChE,CAAC;AAED,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,OAAO,aAAa,CAAC,KAAK,CAAW,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../internal/protocol/sealed-sender/proto/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD;;;;+EAI+E;AAC/E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EACL,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AA2C5C;;;;;GAKG;AACH,OAAO,EAAE,uBAAuB,IAAI,WAAW,EAAE,CAAC;AAsBlD,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,4EAA4E;AAC5E,MAAM,uBAA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AAE,CAAC;gBACrC,MAAM;YACR,KAAK,2BAA2B,CAAC,eAAe;gBAC9C,eAAe,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACrC,MAAM;YACR,KAAK,2BAA2B,CAAC,gBAAgB;gBAC/C,gBAAgB,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;gBACtC,MAAM;YACR;gBACE,MAAM,CAAC,SAAS,EAAE,CAAC;gBACnB,MAAM;QACV,CAAC;IACH,CAAC;IAED,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,CAAC;AAChE,CAAC;AAED,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAiB;IAC7C,OAAO,aAAa,CAAC,KAAK,CAAW,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
@@ -1,17 +1,18 @@
1
1
  /**
2
2
  * Sealed-sender certificate trust root for one relay deployment.
3
3
  *
4
- * The relay signs sender certificates with an Ed25519 key pair derived from
5
- * the same 32-byte deployment secret that seeds the group server parameters,
6
- * domain-separated from the group signing key — and from each other — by
7
- * distinct KDF labels. Clients verify inbound sealed-sender certificates
4
+ * The relay signs sender certificates with an Ed25519 key pair. That key pair
5
+ * derives from the same 32-byte deployment secret that seeds the group server
6
+ * parameters. Distinct KDF labels domain-separate the derived keys from the
7
+ * group signing key, and from each other. Clients verify inbound
8
+ * sealed-sender certificates
8
9
  * against the **root** public key, which they pin at build time. It is never
9
10
  * discovered from a relay at runtime.
10
11
  *
11
12
  * This module is the single definition of that derivation. The relay backend
12
- * derives signing keys from it and the `oe-groups trust-root` command derives
13
- * the pinned public key from it, so an operator's printed root and the key the
14
- * deployment actually signs with cannot drift apart.
13
+ * derives signing keys from it, and the `oe-groups trust-root` command derives
14
+ * the pinned public key from it. An operator's printed root and the key the
15
+ * deployment actually signs with therefore cannot drift apart.
15
16
  */
16
17
  /** KDF label for the offline root key that signs the server certificate. */
17
18
  export declare const SEALED_SENDER_ROOT_LABEL = "open-e2ee:sealed-sender:root:v1";
@@ -20,8 +21,8 @@ export declare const SEALED_SENDER_SERVER_LABEL = "open-e2ee:sealed-sender:serve
20
21
  /**
21
22
  * Encode a scalar as 32 big-endian bytes.
22
23
  *
23
- * The width is fixed rather than minimal: a length-varying encoding would
24
- * make the KDF input ambiguous and leak the scalar's magnitude through the
24
+ * The width is fixed rather than minimal. A length-varying encoding would
25
+ * make the KDF input ambiguous, and leak the scalar's magnitude through the
25
26
  * derived key's provenance.
26
27
  */
27
28
  export declare function scalarBytes(value: bigint): Uint8Array;
@@ -1 +1 @@
1
- {"version":3,"file":"trust-root.d.ts","sourceRoot":"","sources":["../../../../internal/protocol/sealed-sender/trust-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,oCAAoC,CAAC;AAE1E,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAI9E;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAQrD;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,UAAU,CAAC,CAYrB;AAED;;;;;;GAMG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,UAAU,CAAC,CAUrB"}
1
+ {"version":3,"file":"trust-root.d.ts","sourceRoot":"","sources":["../../../../internal/protocol/sealed-sender/trust-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAKH,4EAA4E;AAC5E,eAAO,MAAM,wBAAwB,oCAAoC,CAAC;AAE1E,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,sCAAsC,CAAC;AAI9E;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAQrD;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,UAAU,CAAC,CAYrB;AAED;;;;;;GAMG;AACH,wBAAsB,+BAA+B,CACnD,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,UAAU,CAAC,CAUrB"}
@@ -1,17 +1,18 @@
1
1
  /**
2
2
  * Sealed-sender certificate trust root for one relay deployment.
3
3
  *
4
- * The relay signs sender certificates with an Ed25519 key pair derived from
5
- * the same 32-byte deployment secret that seeds the group server parameters,
6
- * domain-separated from the group signing key — and from each other — by
7
- * distinct KDF labels. Clients verify inbound sealed-sender certificates
4
+ * The relay signs sender certificates with an Ed25519 key pair. That key pair
5
+ * derives from the same 32-byte deployment secret that seeds the group server
6
+ * parameters. Distinct KDF labels domain-separate the derived keys from the
7
+ * group signing key, and from each other. Clients verify inbound
8
+ * sealed-sender certificates
8
9
  * against the **root** public key, which they pin at build time. It is never
9
10
  * discovered from a relay at runtime.
10
11
  *
11
12
  * This module is the single definition of that derivation. The relay backend
12
- * derives signing keys from it and the `oe-groups trust-root` command derives
13
- * the pinned public key from it, so an operator's printed root and the key the
14
- * deployment actually signs with cannot drift apart.
13
+ * derives signing keys from it, and the `oe-groups trust-root` command derives
14
+ * the pinned public key from it. An operator's printed root and the key the
15
+ * deployment actually signs with therefore cannot drift apart.
15
16
  */
16
17
  import { ed25519 } from '@noble/curves/ed25519.js';
17
18
  import { sha256 } from '../../crypto/hash/sha256.js';
@@ -23,8 +24,8 @@ const textEncoder = new TextEncoder();
23
24
  /**
24
25
  * Encode a scalar as 32 big-endian bytes.
25
26
  *
26
- * The width is fixed rather than minimal: a length-varying encoding would
27
- * make the KDF input ambiguous and leak the scalar's magnitude through the
27
+ * The width is fixed rather than minimal. A length-varying encoding would
28
+ * make the KDF input ambiguous, and leak the scalar's magnitude through the
28
29
  * derived key's provenance.
29
30
  */
30
31
  export function scalarBytes(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"trust-root.js","sourceRoot":"","sources":["../../../../internal/protocol/sealed-sender/trust-root.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,wBAAwB,GAAG,iCAAiC,CAAC;AAE1E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,0BAA0B,GAAG,mCAAmC,CAAC;AAE9E,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IAClC,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,KAAK,IAAI,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC;QACxD,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC;QAC1C,SAAS,KAAK,EAAE,CAAC;IACnB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,UAAkB,EAClB,KAAa;IAEb,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACvC,MAAM,UAAU,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;I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AGE = 7,
173
173
  /**
174
174
  * Unencrypted content. Listed to keep the enum a faithful record of the
175
- * wire values, but **not supported** — see `isSealedSenderContentType`.
175
+ * wire values, but **not supported**. See `isSealedSenderContentType`.
176
176
  */
177
177
  PLAINTEXT_CONTENT = 8
178
178
  }
@@ -181,16 +181,15 @@ export declare enum SealedSenderContentType {
181
181
  *
182
182
  * The envelope is authenticated before it is parsed, so a value outside this
183
183
  * set means a peer running a different version rather than an attacker.
184
- * Rejecting at the parse keeps the parse canonical: one byte, one meaning, and
185
- * no value that survives to be interpreted by a routing default further
186
- * downstream.
184
+ * Rejecting at the parse keeps the parse canonical: one byte, one meaning. No
185
+ * value survives to be interpreted by a routing default further downstream.
187
186
  *
188
187
  * `PLAINTEXT_CONTENT` is deliberately excluded. The reference uses it to carry
189
- * a decryption-error receipt when no session exists; this implementation
188
+ * a decryption-error receipt when no session exists. This implementation
190
189
  * delivers those over a dedicated relay channel instead (`retryRequests`), so
191
190
  * nothing here produces the type and no decrypt path consumes it. Accepting it
192
- * would mean routing an unauthenticated payload — the whole point of the type
193
- * is that it is not encrypted — through a path with no handler for it.
191
+ * would mean routing an unauthenticated payload through a path with no handler
192
+ * for it. The whole point of the type is that it is not encrypted.
194
193
  */
195
194
  export declare function isSealedSenderContentType(value: number): value is SealedSenderContentType;
196
195
  /**
@@ -209,10 +208,10 @@ export interface UnidentifiedSenderMessageContent {
209
208
  * How to decrypt `signalProtocolMessage`.
210
209
  *
211
210
  * `SENDERKEY_MESSAGE` says the payload is a framed SenderKeyMessage. It
212
- * does not say which group: the recipient reads the opaque distribution
213
- * identifier out of the frame and resolves the group against its own sender
214
- * key store, the same way it does for an unsealed group message. No group
215
- * identifier travels in a sealed envelope at all.
211
+ * does not say which group. The recipient reads the opaque distribution
212
+ * identifier out of the frame, and resolves the group against its own sender
213
+ * key store. That is the same way it does for an unsealed group message. No
214
+ * group identifier travels in a sealed envelope at all.
216
215
  */
217
216
  contentType: SealedSenderContentType;
218
217
  /**
@@ -247,7 +246,7 @@ export interface SealOptions {
247
246
  /**
248
247
  * How the recipient should decrypt `signalProtocolMessage`.
249
248
  *
250
- * Defaults to `MESSAGE`. Group traffic must pass `SENDERKEY_MESSAGE`: the
249
+ * Defaults to `MESSAGE`. Group traffic must pass `SENDERKEY_MESSAGE`. The
251
250
  * outer envelope is `unidentified_sender` for everything, so this is the
252
251
  * only thing that tells the recipient the payload is a framed
253
252
  * SenderKeyMessage.
@@ -389,7 +388,7 @@ export interface SealMultiRecipientOptions {
389
388
  /**
390
389
  * How the recipient should decrypt `signalProtocolMessage`.
391
390
  *
392
- * Defaults to `MESSAGE`. Group traffic must pass `SENDERKEY_MESSAGE`: the
391
+ * Defaults to `MESSAGE`. Group traffic must pass `SENDERKEY_MESSAGE`. The
393
392
  * outer envelope is `unidentified_sender` for everything, so this is the
394
393
  * only thing that tells the recipient the payload is a framed
395
394
  * SenderKeyMessage.
@@ -499,7 +498,7 @@ export declare const EPHEMERAL_PUBLIC_KEY_BYTES = 32;
499
498
  * MAC size (truncated HMAC-SHA256).
500
499
  *
501
500
  * Sealed-sender MACs are truncated to 10 bytes (80 bits). The Double Ratchet
502
- * specification Section 8.6 sets the floor at 64 bits;
501
+ * specification Section 8.6 sets the floor at 64 bits.
503
502
  * 80 bits is comfortably above this while saving bandwidth.
504
503
  */
505
504
  export declare const MAC_BYTES = 10;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../internal/protocol/sealed-sender/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtD;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC;AACV,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;O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eAAO,MAAM,WAAW,yBAAyB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa,gCAAgC,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,eAAe,KAAK,CAAC;AAMlC;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,KAAO,CAAC;AAC7C,eAAO,MAAM,6BAA6B,KAAO,CAAC;AAClD,eAAO,MAAM,mCAAmC,KAAO,CAAC;AAExD,iDAAiD;AACjD,eAAO,MAAM,qBAAqB,KAA2B,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,yBAAyB,QAAsB,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,KAAK,CAAC;AAE5B;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAAO,CAAC"}
@@ -25,7 +25,7 @@ export var SealedSenderContentType;
25
25
  SealedSenderContentType[SealedSenderContentType["SENDERKEY_MESSAGE"] = 7] = "SENDERKEY_MESSAGE";
26
26
  /**
27
27
  * Unencrypted content. Listed to keep the enum a faithful record of the
28
- * wire values, but **not supported** — see `isSealedSenderContentType`.
28
+ * wire values, but **not supported**. See `isSealedSenderContentType`.
29
29
  */
30
30
  SealedSenderContentType[SealedSenderContentType["PLAINTEXT_CONTENT"] = 8] = "PLAINTEXT_CONTENT";
31
31
  })(SealedSenderContentType || (SealedSenderContentType = {}));
@@ -34,16 +34,15 @@ export var SealedSenderContentType;
34
34
  *
35
35
  * The envelope is authenticated before it is parsed, so a value outside this
36
36
  * set means a peer running a different version rather than an attacker.
37
- * Rejecting at the parse keeps the parse canonical: one byte, one meaning, and
38
- * no value that survives to be interpreted by a routing default further
39
- * downstream.
37
+ * Rejecting at the parse keeps the parse canonical: one byte, one meaning. No
38
+ * value survives to be interpreted by a routing default further downstream.
40
39
  *
41
40
  * `PLAINTEXT_CONTENT` is deliberately excluded. The reference uses it to carry
42
- * a decryption-error receipt when no session exists; this implementation
41
+ * a decryption-error receipt when no session exists. This implementation
43
42
  * delivers those over a dedicated relay channel instead (`retryRequests`), so
44
43
  * nothing here produces the type and no decrypt path consumes it. Accepting it
45
- * would mean routing an unauthenticated payload — the whole point of the type
46
- * is that it is not encrypted — through a path with no handler for it.
44
+ * would mean routing an unauthenticated payload through a path with no handler
45
+ * for it. The whole point of the type is that it is not encrypted.
47
46
  */
48
47
  export function isSealedSenderContentType(value) {
49
48
  return (value === SealedSenderContentType.PREKEY_MESSAGE ||
@@ -125,7 +124,7 @@ export const EPHEMERAL_PUBLIC_KEY_BYTES = 32;
125
124
  * MAC size (truncated HMAC-SHA256).
126
125
  *
127
126
  * Sealed-sender MACs are truncated to 10 bytes (80 bits). The Double Ratchet
128
- * specification Section 8.6 sets the floor at 64 bits;
127
+ * specification Section 8.6 sets the floor at 64 bits.
129
128
  * 80 bits is comfortably above this while saving bandwidth.
130
129
  */
131
130
  export const MAC_BYTES = 10;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../internal/protocol/sealed-sender/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA0LH;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IACjC,yDAAyD;IACzD,yFAAkB,CAAA;IAClB,uCAAuC;IACvC,2EAAW,CAAA;IACX,8CAA8C;IAC9C,+FAAqB,CAAA;IACrB;;;OAGG;IACH,+FAAqB,CAAA;AACvB,CAAC,EAZW,uBAAuB,KAAvB,uBAAuB,QAYlC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAa;IAEb,OAAO,CACL,KAAK,KAAK,uBAAuB,CAAC,cAAc;QAChD,KAAK,KAAK,uBAA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ACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,CAAC,wCAAwC;AACtF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,CAAC,2BAA2B;AAC9E,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,CAAC,CAAC,oBAAoB;AAE7E,iDAAiD;AACjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,sBAAsB,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAEnC;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC;AAE5B;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB,EAAE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * V2 Multi-Recipient Sealed Sender Binary Serialization
3
3
  *
4
4
  * Implements custom binary wire format for V2 multi-recipient
5
- * sealed sender messages. This is NOT protobuf - it's a compact binary
5
+ * sealed sender messages. This is NOT protobuf - it is a compact binary
6
6
  * format designed for efficient multi-recipient fan-out.
7
7
  *
8
8
  * Wire format (sent message):
@@ -2,7 +2,7 @@
2
2
  * V2 Multi-Recipient Sealed Sender Binary Serialization
3
3
  *
4
4
  * Implements custom binary wire format for V2 multi-recipient
5
- * sealed sender messages. This is NOT protobuf - it's a compact binary
5
+ * sealed sender messages. This is NOT protobuf - it is a compact binary
6
6
  * format designed for efficient multi-recipient fan-out.
7
7
  *
8
8
  * Wire format (sent message):
@@ -171,7 +171,7 @@ export function deserializeSentMessage(data) {
171
171
  const uuidBytes = data.slice(offset, offset + UUID_BYTES);
172
172
  offset += UUID_BYTES;
173
173
  const serviceId = bytesToServiceId(uuidBytes);
174
- // First device byte — if 0x00, this is an excluded recipient
174
+ // First device byte. If 0x00, this is an excluded recipient
175
175
  if (offset >= data.length) {
176
176
  throw new Error('Truncated device list');
177
177
  }