@open-e2ee/signal-protocol-sdk 0.2.3 → 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.
- package/ADAPTERS.md +4 -4
- package/ARCHITECTURE.md +17 -16
- package/CHANGELOG.md +39 -0
- package/COMMERCIAL.md +6 -6
- package/NOTICE +1 -1
- package/README.md +44 -34
- package/SECURITY.md +16 -13
- package/TROUBLESHOOTING.md +5 -5
- package/blocking/README.md +6 -5
- package/client/README.md +5 -5
- package/device/README.md +8 -8
- package/dist/blocking/types.d.ts +2 -2
- package/dist/blocking/types.js +2 -2
- package/dist/client/client.d.ts +46 -45
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +61 -60
- package/dist/client/client.js.map +1 -1
- package/dist/client/config.d.ts +32 -32
- package/dist/client/constants.d.ts +7 -6
- package/dist/client/constants.d.ts.map +1 -1
- package/dist/client/constants.js +5 -4
- package/dist/client/constants.js.map +1 -1
- package/dist/client/dual-store.d.ts +2 -2
- package/dist/client/dual-store.js +2 -2
- package/dist/client/endorsement-manager.d.ts +14 -14
- package/dist/client/endorsement-manager.d.ts.map +1 -1
- package/dist/client/endorsement-manager.js +15 -15
- package/dist/client/endorsement-manager.js.map +1 -1
- package/dist/client/event-hooks.d.ts +16 -16
- package/dist/client/event-hooks.d.ts.map +1 -1
- package/dist/client/event-hooks.js +1 -1
- package/dist/client/event-hooks.js.map +1 -1
- package/dist/client/files.js +4 -4
- package/dist/client/files.js.map +1 -1
- package/dist/client/headless.d.ts +7 -7
- package/dist/client/headless.d.ts.map +1 -1
- package/dist/client/headless.js +4 -4
- package/dist/client/key-rotation-core.d.ts +19 -17
- package/dist/client/key-rotation-core.d.ts.map +1 -1
- package/dist/client/key-rotation-core.js +35 -31
- package/dist/client/key-rotation-core.js.map +1 -1
- package/dist/client/key-rotation.d.ts +8 -8
- package/dist/client/key-rotation.js +8 -8
- package/dist/client/media.d.ts +1 -1
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +13 -11
- package/dist/client/messages.js.map +1 -1
- package/dist/client/multi-device.d.ts +5 -4
- package/dist/client/multi-device.d.ts.map +1 -1
- package/dist/client/multi-device.js.map +1 -1
- package/dist/client/prekeys.d.ts +7 -7
- package/dist/client/prekeys.js +10 -10
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/relay-subscription.d.ts +3 -0
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +7 -4
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/retry-utils.d.ts +5 -6
- package/dist/client/retry-utils.d.ts.map +1 -1
- package/dist/client/retry-utils.js +5 -12
- package/dist/client/retry-utils.js.map +1 -1
- package/dist/client/retry.js +7 -7
- package/dist/client/retry.js.map +1 -1
- package/dist/client/sealed-sender-ops.d.ts +3 -3
- package/dist/client/sealed-sender-ops.js +5 -5
- package/dist/client/sealed-sender-ops.js.map +1 -1
- package/dist/client/sessions.d.ts +2 -2
- package/dist/client/sessions.js +2 -2
- package/dist/client/signal-service-cipher.d.ts +9 -9
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +41 -40
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/client/state.d.ts +1 -1
- package/dist/client/state.js +1 -1
- package/dist/client/types.d.ts +19 -19
- package/dist/client/types.d.ts.map +1 -1
- package/dist/device/connection.d.ts +1 -1
- package/dist/device/connection.js +2 -2
- package/dist/device/connection.js.map +1 -1
- package/dist/device/constants.d.ts +4 -4
- package/dist/device/constants.js +3 -3
- package/dist/device/device-id.d.ts +4 -4
- package/dist/device/device-id.js +4 -4
- package/dist/device/expo-metadata.d.ts +13 -11
- package/dist/device/expo-metadata.d.ts.map +1 -1
- package/dist/device/expo-metadata.js +13 -11
- package/dist/device/expo-metadata.js.map +1 -1
- package/dist/device/lifecycle/manager.d.ts +6 -6
- package/dist/device/lifecycle/manager.js +7 -7
- package/dist/device/lifecycle/types.d.ts +13 -13
- package/dist/device/lifecycle/types.d.ts.map +1 -1
- package/dist/device/lifecycle/utils.d.ts +2 -2
- package/dist/device/lifecycle/utils.js +5 -5
- package/dist/device/lifecycle/utils.js.map +1 -1
- package/dist/device/provisioning.d.ts +5 -4
- package/dist/device/provisioning.d.ts.map +1 -1
- package/dist/device/provisioning.js +5 -4
- package/dist/device/provisioning.js.map +1 -1
- package/dist/device/transfer.d.ts +2 -2
- package/dist/device/transfer.js +3 -3
- package/dist/device/transfer.js.map +1 -1
- package/dist/encoding/index.d.ts +3 -4
- package/dist/encoding/index.d.ts.map +1 -1
- package/dist/encoding/index.js.map +1 -1
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +1 -1
- package/dist/hooks/use-connection-presence.d.ts +1 -1
- package/dist/hooks/use-connection-presence.js +7 -7
- package/dist/hooks/use-connection-presence.js.map +1 -1
- package/dist/hooks/use-group-membership.d.ts +2 -2
- package/dist/hooks/use-group-membership.d.ts.map +1 -1
- package/dist/hooks/use-group-membership.js +6 -6
- package/dist/hooks/use-group-membership.js.map +1 -1
- package/dist/hooks/use-key-rotation.js +3 -3
- package/dist/hooks/use-key-rotation.js.map +1 -1
- package/dist/hooks/use-single-flight.d.ts +2 -2
- package/dist/hooks/use-single-flight.js +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/internal/crypto/ec/ed25519.d.ts +6 -6
- package/dist/internal/crypto/ec/ed25519.js +6 -6
- package/dist/internal/crypto/ec/x25519-validation.d.ts.map +1 -1
- package/dist/internal/crypto/ec/x25519-validation.js +4 -2
- package/dist/internal/crypto/ec/x25519-validation.js.map +1 -1
- package/dist/internal/crypto/index.d.ts +2 -0
- package/dist/internal/crypto/index.d.ts.map +1 -1
- package/dist/internal/crypto/index.js +2 -0
- package/dist/internal/crypto/index.js.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.d.ts +9 -8
- package/dist/internal/crypto/kdf/hkdf.d.ts.map +1 -1
- package/dist/internal/crypto/kdf/hkdf.js +11 -10
- package/dist/internal/crypto/kdf/hkdf.js.map +1 -1
- package/dist/internal/crypto/key-prefix.d.ts +3 -3
- package/dist/internal/crypto/key-prefix.js +3 -3
- package/dist/internal/crypto/pq/kyber.d.ts +7 -7
- package/dist/internal/crypto/pq/kyber.js +10 -10
- package/dist/internal/crypto/pq/kyber.js.map +1 -1
- package/dist/internal/crypto/random.d.ts +1 -1
- package/dist/internal/crypto/random.js +1 -1
- package/dist/internal/crypto/symmetric/aes-gcm-siv.js +1 -1
- package/dist/internal/crypto/symmetric/aes.js +4 -4
- package/dist/internal/crypto/symmetric/aes.js.map +1 -1
- package/dist/internal/crypto/symmetric/mac.d.ts +1 -1
- package/dist/internal/crypto/symmetric/mac.js +3 -3
- package/dist/internal/crypto/symmetric/padding.js +1 -1
- package/dist/internal/crypto/symmetric/padding.js.map +1 -1
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts +7 -1
- package/dist/internal/crypto/symmetric/streaming-aead.d.ts.map +1 -1
- package/dist/internal/crypto/symmetric/streaming-aead.js +10 -4
- package/dist/internal/crypto/symmetric/streaming-aead.js.map +1 -1
- package/dist/internal/crypto/utils.d.ts +2 -2
- package/dist/internal/crypto/utils.d.ts.map +1 -1
- package/dist/internal/crypto/utils.js +16 -14
- package/dist/internal/crypto/utils.js.map +1 -1
- package/dist/internal/crypto/validation.d.ts +4 -4
- package/dist/internal/crypto/validation.js +2 -2
- package/dist/internal/encoding/proto/envelope.d.ts +1 -1
- package/dist/internal/encoding/proto/envelope.js +1 -1
- package/dist/internal/encoding/proto/index.d.ts +4 -4
- package/dist/internal/encoding/proto/index.js +4 -4
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts +28 -16
- package/dist/internal/encoding/proto/pq-ratchet-serialize.d.ts.map +1 -1
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js +30 -18
- package/dist/internal/encoding/proto/pq-ratchet-serialize.js.map +1 -1
- package/dist/internal/encoding/proto/primitives.d.ts +45 -35
- package/dist/internal/encoding/proto/primitives.d.ts.map +1 -1
- package/dist/internal/encoding/proto/primitives.js +54 -43
- package/dist/internal/encoding/proto/primitives.js.map +1 -1
- package/dist/internal/encoding/proto/sender-key-message.d.ts +2 -2
- package/dist/internal/encoding/proto/sender-key-message.js +2 -2
- package/dist/internal/encoding/proto/signal-message.d.ts +13 -13
- package/dist/internal/encoding/proto/signal-message.d.ts.map +1 -1
- package/dist/internal/encoding/proto/signal-message.js +13 -13
- package/dist/internal/encoding/proto/signal-message.js.map +1 -1
- package/dist/internal/groups/access-control.d.ts +5 -5
- package/dist/internal/groups/access-control.js +6 -6
- package/dist/internal/groups/access-control.js.map +1 -1
- package/dist/internal/groups/change-actions.d.ts +4 -4
- package/dist/internal/groups/change-actions.js +3 -3
- package/dist/internal/groups/encrypted-state.js +1 -1
- package/dist/internal/groups/encrypted-state.js.map +1 -1
- package/dist/internal/groups/group-id.d.ts +1 -1
- package/dist/internal/groups/manager.d.ts +24 -23
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +40 -36
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/groups/server-engine.d.ts +29 -21
- package/dist/internal/groups/server-engine.d.ts.map +1 -1
- package/dist/internal/groups/server-engine.js +55 -50
- package/dist/internal/groups/server-engine.js.map +1 -1
- package/dist/internal/groups/trust-root.d.ts +2 -2
- package/dist/internal/groups/trust-root.js +2 -2
- package/dist/internal/groups/types.d.ts +4 -4
- package/dist/internal/groups/types.d.ts.map +1 -1
- package/dist/internal/groups/wire.d.ts +6 -7
- package/dist/internal/groups/wire.d.ts.map +1 -1
- package/dist/internal/groups/wire.js +6 -7
- package/dist/internal/groups/wire.js.map +1 -1
- package/dist/internal/manager/manager.d.ts +14 -12
- package/dist/internal/manager/manager.d.ts.map +1 -1
- package/dist/internal/manager/manager.js +47 -41
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.d.ts +8 -6
- package/dist/internal/protocol/double-ratchet/chains.d.ts.map +1 -1
- package/dist/internal/protocol/double-ratchet/chains.js +10 -8
- package/dist/internal/protocol/double-ratchet/chains.js.map +1 -1
- package/dist/internal/protocol/double-ratchet/index.d.ts +2 -2
- package/dist/internal/protocol/double-ratchet/index.js +2 -2
- package/dist/internal/protocol/double-ratchet/ratchet.d.ts +4 -4
- package/dist/internal/protocol/double-ratchet/ratchet.js +6 -6
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts +21 -18
- package/dist/internal/protocol/pqxdh/pqxdh.d.ts.map +1 -1
- package/dist/internal/protocol/pqxdh/pqxdh.js +48 -42
- package/dist/internal/protocol/pqxdh/pqxdh.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption-v2.js +5 -5
- package/dist/internal/protocol/sealed-sender/decryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/decryption.js +11 -8
- package/dist/internal/protocol/sealed-sender/decryption.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/delivery-token.d.ts +2 -2
- package/dist/internal/protocol/sealed-sender/delivery-token.js +2 -2
- package/dist/internal/protocol/sealed-sender/encryption-v2.js +1 -1
- package/dist/internal/protocol/sealed-sender/encryption-v2.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/encryption.d.ts +2 -2
- package/dist/internal/protocol/sealed-sender/encryption.js +2 -2
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts +25 -23
- package/dist/internal/protocol/sealed-sender/proto/index.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/proto/index.js +32 -30
- package/dist/internal/protocol/sealed-sender/proto/index.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts +10 -9
- package/dist/internal/protocol/sealed-sender/trust-root.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/trust-root.js +10 -9
- package/dist/internal/protocol/sealed-sender/trust-root.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.d.ts +13 -14
- package/dist/internal/protocol/sealed-sender/types.d.ts.map +1 -1
- package/dist/internal/protocol/sealed-sender/types.js +7 -8
- package/dist/internal/protocol/sealed-sender/types.js.map +1 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.d.ts +1 -1
- package/dist/internal/protocol/sealed-sender/v2-binary.js +2 -2
- package/dist/internal/protocol/sealed-sender/v2-binary.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +16 -14
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +37 -34
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/protocol/spqr/braid-serialize.d.ts +6 -6
- package/dist/internal/protocol/spqr/braid-serialize.js +5 -5
- package/dist/internal/protocol/spqr/braid-serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/braid.d.ts +3 -3
- package/dist/internal/protocol/spqr/braid.js +7 -7
- package/dist/internal/protocol/spqr/braid.js.map +1 -1
- package/dist/internal/protocol/spqr/index.js +1 -1
- package/dist/internal/protocol/spqr/index.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.d.ts +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/chunk-domain.js +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/incremental-kem.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/kdf.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts +4 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js +4 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/arithmetic.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/noble-pq/index.js +2 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/progress.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts +15 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js +15 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/codec.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/galois/field.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.d.ts +3 -3
- package/dist/internal/protocol/spqr/ml-kem-braid/rs/polynomial.js +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.d.ts +7 -7
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js +11 -11
- package/dist/internal/protocol/spqr/ml-kem-braid/serialize.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.d.ts +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js +6 -6
- package/dist/internal/protocol/spqr/ml-kem-braid/state-machine.js.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts +2 -2
- package/dist/internal/protocol/spqr/ml-kem-braid/types.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/ml-kem-braid/types.js.map +1 -1
- package/dist/internal/protocol/spqr/serialize.d.ts +12 -12
- package/dist/internal/protocol/spqr/serialize.js +5 -5
- package/dist/internal/protocol/spqr/spqr.d.ts +6 -6
- package/dist/internal/protocol/spqr/spqr.d.ts.map +1 -1
- package/dist/internal/protocol/spqr/spqr.js +47 -42
- package/dist/internal/protocol/spqr/spqr.js.map +1 -1
- package/dist/internal/protocol/spqr/validate.d.ts +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts +12 -12
- package/dist/internal/protocol/triple-ratchet/ratchet.d.ts.map +1 -1
- package/dist/internal/protocol/triple-ratchet/ratchet.js +11 -11
- package/dist/internal/protocol/triple-ratchet/ratchet.js.map +1 -1
- package/dist/internal/protocol/username/hash.d.ts.map +1 -1
- package/dist/internal/protocol/username/hash.js +6 -4
- package/dist/internal/protocol/username/hash.js.map +1 -1
- package/dist/internal/protocol/version.d.ts +3 -3
- package/dist/internal/protocol/version.js +1 -1
- package/dist/internal/protocol/x3dh/x3dh.d.ts +16 -16
- package/dist/internal/protocol/x3dh/x3dh.d.ts.map +1 -1
- package/dist/internal/protocol/x3dh/x3dh.js +15 -15
- package/dist/internal/protocol/x3dh/x3dh.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/attributes.d.ts +7 -7
- package/dist/internal/protocol/zk/credentials/attributes.js +7 -7
- package/dist/internal/protocol/zk/credentials/credentials.d.ts +1 -1
- package/dist/internal/protocol/zk/credentials/credentials.js +1 -1
- package/dist/internal/protocol/zk/credentials/endorsements.d.ts +11 -11
- package/dist/internal/protocol/zk/credentials/endorsements.js +14 -14
- package/dist/internal/protocol/zk/credentials/issuance.d.ts +5 -1
- package/dist/internal/protocol/zk/credentials/issuance.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/issuance.js +5 -1
- package/dist/internal/protocol/zk/credentials/issuance.js.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.d.ts +16 -16
- package/dist/internal/protocol/zk/credentials/presentation.d.ts.map +1 -1
- package/dist/internal/protocol/zk/credentials/presentation.js +18 -18
- package/dist/internal/protocol/zk/credentials/presentation.js.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts +22 -16
- package/dist/internal/protocol/zk/groups/auth-credential.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/auth-credential.js +19 -14
- package/dist/internal/protocol/zk/groups/auth-credential.js.map +1 -1
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.d.ts +4 -4
- package/dist/internal/protocol/zk/groups/client-zk-group-cipher.js +4 -4
- package/dist/internal/protocol/zk/groups/group-params.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/group-params.js +2 -2
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts +10 -9
- package/dist/internal/protocol/zk/groups/group-send-endorsement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js +9 -8
- package/dist/internal/protocol/zk/groups/group-send-endorsement.js.map +1 -1
- package/dist/internal/protocol/zk/groups/lizard.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/lizard.js +4 -4
- package/dist/internal/protocol/zk/groups/lizard.js.map +1 -1
- package/dist/internal/protocol/zk/groups/profile-key-commitment.d.ts +3 -3
- package/dist/internal/protocol/zk/groups/profile-key-commitment.js +3 -3
- package/dist/internal/protocol/zk/groups/profile-key-credential.d.ts +11 -11
- package/dist/internal/protocol/zk/groups/profile-key-credential.js +7 -7
- package/dist/internal/protocol/zk/groups/profile-key-encryption.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-encryption.js +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-struct.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-struct.js +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-version.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/profile-key-version.js +2 -2
- package/dist/internal/protocol/zk/groups/server-params.d.ts +1 -1
- package/dist/internal/protocol/zk/groups/server-params.js +1 -1
- package/dist/internal/protocol/zk/groups/uid-encryption.d.ts +4 -4
- package/dist/internal/protocol/zk/groups/uid-encryption.js +4 -4
- package/dist/internal/protocol/zk/groups/uid-struct.d.ts +2 -2
- package/dist/internal/protocol/zk/groups/uid-struct.js +3 -3
- package/dist/internal/protocol/zk/groups/uid-struct.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/args.d.ts +3 -3
- package/dist/internal/protocol/zk/proofs/args.js +3 -3
- package/dist/internal/protocol/zk/proofs/sho-sha256.d.ts +3 -3
- package/dist/internal/protocol/zk/proofs/sho-sha256.js +3 -3
- package/dist/internal/protocol/zk/proofs/sho.d.ts +8 -7
- package/dist/internal/protocol/zk/proofs/sho.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/sho.js +8 -7
- package/dist/internal/protocol/zk/proofs/sho.js.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.d.ts +8 -6
- package/dist/internal/protocol/zk/proofs/statement.d.ts.map +1 -1
- package/dist/internal/protocol/zk/proofs/statement.js +8 -6
- package/dist/internal/protocol/zk/proofs/statement.js.map +1 -1
- package/dist/internal/sesame/manager.d.ts +23 -19
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +64 -54
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/sesame/types.d.ts +28 -25
- package/dist/internal/sesame/types.d.ts.map +1 -1
- package/dist/internal/sesame/types.js +2 -2
- package/dist/internal/sesame/types.js.map +1 -1
- package/dist/internal/sesame/validation.d.ts +2 -2
- package/dist/internal/sesame/validation.js +3 -3
- package/dist/internal/sesame/validation.js.map +1 -1
- package/dist/internal/session/builder.d.ts +8 -8
- package/dist/internal/session/builder.js +22 -22
- package/dist/internal/session/builder.js.map +1 -1
- package/dist/internal/session/cipher.d.ts +3 -3
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +51 -40
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/internal/session/decryption.js +11 -9
- package/dist/internal/session/decryption.js.map +1 -1
- package/dist/internal/session/factory.js +1 -1
- package/dist/internal/session/factory.js.map +1 -1
- package/dist/internal/session/handshake.d.ts +4 -4
- package/dist/internal/session/handshake.js +4 -4
- package/dist/internal/session/keys.d.ts +3 -4
- package/dist/internal/session/keys.d.ts.map +1 -1
- package/dist/internal/session/keys.js.map +1 -1
- package/dist/internal/session/ratchet.d.ts +8 -8
- package/dist/internal/session/ratchet.js +10 -10
- package/dist/internal/session/ratchet.js.map +1 -1
- package/dist/internal/session/session-resolver.d.ts +6 -6
- package/dist/internal/session/session-resolver.js +6 -6
- package/dist/internal/session/state.d.ts +12 -12
- package/dist/internal/session/state.d.ts.map +1 -1
- package/dist/internal/session/state.js +7 -7
- package/dist/internal/session/types.d.ts +20 -20
- package/dist/internal/session/types.d.ts.map +1 -1
- package/dist/internal/session/types.js +3 -3
- package/dist/internal/session/validation.d.ts +1 -1
- package/dist/internal/session/validation.js +4 -4
- package/dist/internal/session/validation.js.map +1 -1
- package/dist/keys/branded.d.ts +12 -12
- package/dist/keys/branded.js +3 -3
- package/dist/keys/generation.d.ts +4 -4
- package/dist/keys/generation.js +4 -4
- package/dist/keys/identity.d.ts +7 -7
- package/dist/keys/identity.d.ts.map +1 -1
- package/dist/keys/identity.js +7 -7
- package/dist/keys/identity.js.map +1 -1
- package/dist/keys/types.d.ts +16 -16
- package/dist/keys/types.d.ts.map +1 -1
- package/dist/layers.d.ts +1 -1
- package/dist/layers.js +1 -1
- package/dist/local/store/expo/adapter.d.ts +8 -8
- package/dist/local/store/expo/adapter.js +10 -10
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/database-key.d.ts +7 -7
- package/dist/local/store/expo/database-key.js +7 -7
- package/dist/local/store/expo/key-storage.d.ts +1 -1
- package/dist/local/store/expo/key-storage.js +4 -4
- package/dist/local/store/expo/key-storage.js.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts +6 -6
- package/dist/local/store/expo/models/kyber-prekey-used.js +3 -3
- package/dist/local/store/expo/models/kyber-prekey.d.ts +1 -1
- package/dist/local/store/expo/models/kyber-prekey.js +1 -1
- package/dist/local/store/expo/models/message-record.d.ts +2 -2
- package/dist/local/store/expo/models/message-record.d.ts.map +1 -1
- package/dist/local/store/expo/models/message-record.js +1 -1
- package/dist/local/store/expo/models/message-record.js.map +1 -1
- package/dist/local/store/expo/models/sender-key.d.ts +11 -10
- package/dist/local/store/expo/models/sender-key.d.ts.map +1 -1
- package/dist/local/store/expo/models/sender-key.js +11 -10
- package/dist/local/store/expo/models/sender-key.js.map +1 -1
- package/dist/local/store/expo/schema.d.ts +2 -2
- package/dist/local/store/expo/schema.js +2 -2
- package/dist/local/store/expo/secure-store-options.d.ts +1 -1
- package/dist/local/store/memory/adapter.d.ts +2 -2
- package/dist/local/store/memory/adapter.js +12 -12
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +5 -4
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/database-key.d.ts +8 -8
- package/dist/local/store/node/database-key.js +10 -10
- package/dist/local/store/node/database-key.js.map +1 -1
- package/dist/local/store/node/database.d.ts +5 -5
- package/dist/local/store/node/database.js +11 -11
- package/dist/local/store/node/database.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +6 -6
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +35 -32
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/react-native/backend-conformance.d.ts +11 -10
- package/dist/local/store/react-native/backend-conformance.d.ts.map +1 -1
- package/dist/local/store/react-native/backend-conformance.js +13 -12
- package/dist/local/store/react-native/backend-conformance.js.map +1 -1
- package/dist/local/store/react-native/index.d.ts +1 -1
- package/dist/local/store/react-native/reference-backend.d.ts +14 -13
- package/dist/local/store/react-native/reference-backend.d.ts.map +1 -1
- package/dist/local/store/react-native/reference-backend.js +15 -14
- package/dist/local/store/react-native/reference-backend.js.map +1 -1
- package/dist/local/store/react-native/storage.d.ts +3 -3
- package/dist/local/store/web/adapter.d.ts +3 -3
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +30 -31
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/local/store/web/index.d.ts +1 -1
- package/dist/local/vault/index.d.ts +2 -2
- package/dist/media/index.d.ts +11 -11
- package/dist/media/index.js +9 -9
- package/dist/profile/contact-state.d.ts +1 -1
- package/dist/profile/contact-state.js +1 -1
- package/dist/profile/profile-key.d.ts +2 -2
- package/dist/profile/profile-key.js +7 -6
- package/dist/profile/profile-key.js.map +1 -1
- package/dist/remote/object-store/index.d.ts +1 -1
- package/dist/remote/object-store/s3/storage.d.ts +1 -1
- package/dist/remote/object-store/types.d.ts +4 -4
- package/dist/remote/object-store/types.d.ts.map +1 -1
- package/dist/remote/relay/convex/backend.d.ts +4 -4
- package/dist/remote/relay/convex/backend.js +3 -3
- package/dist/remote/relay/convex/backend.js.map +1 -1
- package/dist/remote/relay/convex/component/accounts.d.ts +15 -13
- package/dist/remote/relay/convex/component/accounts.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/accounts.js +31 -28
- package/dist/remote/relay/convex/component/accounts.js.map +1 -1
- package/dist/remote/relay/convex/component/certificates.js +1 -1
- package/dist/remote/relay/convex/component/cleanup.js +7 -7
- package/dist/remote/relay/convex/component/cleanup.js.map +1 -1
- package/dist/remote/relay/convex/component/convex.config.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/convex.config.js +10 -8
- package/dist/remote/relay/convex/component/convex.config.js.map +1 -1
- package/dist/remote/relay/convex/component/devices.d.ts +21 -20
- package/dist/remote/relay/convex/component/devices.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/devices.js +24 -23
- package/dist/remote/relay/convex/component/devices.js.map +1 -1
- package/dist/remote/relay/convex/component/groups.js +6 -6
- package/dist/remote/relay/convex/component/groups.js.map +1 -1
- package/dist/remote/relay/convex/component/messages.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/messages.js +89 -82
- package/dist/remote/relay/convex/component/messages.js.map +1 -1
- package/dist/remote/relay/convex/component/provisioning.d.ts +3 -3
- package/dist/remote/relay/convex/component/provisioning.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/provisioning.js +17 -16
- package/dist/remote/relay/convex/component/provisioning.js.map +1 -1
- package/dist/remote/relay/convex/component/runtime.d.ts.map +1 -1
- package/dist/remote/relay/convex/component/runtime.js +4 -2
- package/dist/remote/relay/convex/component/runtime.js.map +1 -1
- package/dist/remote/relay/convex/component/schema.js +25 -24
- package/dist/remote/relay/convex/component/schema.js.map +1 -1
- package/dist/remote/relay/convex/group-server.d.ts +3 -3
- package/dist/remote/relay/convex/group-server.js +3 -3
- package/dist/remote/relay/convex/relay.d.ts +3 -3
- package/dist/remote/relay/convex/relay.d.ts.map +1 -1
- package/dist/remote/relay/convex/relay.js +18 -17
- package/dist/remote/relay/convex/relay.js.map +1 -1
- package/dist/remote/relay/convex/types.d.ts +7 -7
- package/dist/remote/relay/convex/types.js +4 -4
- package/dist/remote/relay/memory/adapter.js +9 -9
- package/dist/remote/relay/memory/adapter.js.map +1 -1
- package/dist/remote/relay/types.d.ts +27 -27
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/safety/fingerprint.d.ts +7 -6
- package/dist/safety/fingerprint.d.ts.map +1 -1
- package/dist/safety/fingerprint.js +5 -4
- package/dist/safety/fingerprint.js.map +1 -1
- package/dist/safety/index.d.ts +6 -5
- package/dist/safety/index.d.ts.map +1 -1
- package/dist/safety/index.js +7 -6
- package/dist/safety/index.js.map +1 -1
- package/dist/safety/protobuf.js +2 -2
- package/dist/safety/protobuf.js.map +1 -1
- package/dist/safety/url.d.ts +5 -5
- package/dist/safety/url.js +6 -6
- package/dist/types/address.d.ts +2 -2
- package/dist/types/address.js +2 -2
- package/dist/types/api.d.ts +78 -73
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/errors.d.ts +63 -403
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +62 -537
- package/dist/types/errors.js.map +1 -1
- package/dist/types/messages.d.ts +16 -16
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/messages.js +7 -7
- package/dist/types/messages.js.map +1 -1
- package/dist/types/protocol-config.d.ts +52 -49
- package/dist/types/protocol-config.d.ts.map +1 -1
- package/dist/types/protocol-config.js +36 -34
- package/dist/types/protocol-config.js.map +1 -1
- package/dist/types/protocol-constants.d.ts +2 -2
- package/dist/types/protocol-constants.js +2 -2
- package/dist/types/session.d.ts +62 -61
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js +13 -14
- package/dist/types/session.js.map +1 -1
- package/dist/types/trust.d.ts +8 -8
- package/dist/types/trust.js +3 -3
- package/dist/utils/retry.d.ts.map +1 -1
- package/dist/utils/retry.js +2 -4
- package/dist/utils/retry.js.map +1 -1
- package/docs/ASSURANCE.md +82 -74
- package/docs/CLIENT_COMPOSITION.md +19 -15
- package/docs/DEVIATIONS.md +507 -425
- package/docs/DOCUMENTATION_STANDARDS.md +24 -24
- package/docs/E2EE.md +45 -42
- package/docs/ERROR_HANDLING.md +29 -105
- package/docs/GETTING_STARTED.md +24 -25
- package/docs/INTERFACES.md +27 -18
- package/docs/PACKAGE_SURFACE.md +23 -21
- package/docs/PROTOCOL_POLICY.md +19 -13
- package/docs/RECIPES.md +4 -4
- package/docs/SECURITY.md +72 -60
- package/encoding/README.md +2 -2
- package/files/README.md +1 -1
- package/groups/README.md +4 -3
- package/hooks/README.md +2 -2
- package/keys/README.md +15 -14
- package/local/store/README.md +82 -67
- package/local/store/expo/README.md +17 -12
- package/local/store/memory/README.md +4 -3
- package/local/store/node/README.md +8 -6
- package/local/store/react-native/README.md +14 -12
- package/local/store/web/README.md +31 -26
- package/local/vault/README.md +4 -4
- package/media/README.md +6 -5
- package/package.json +1 -1
- package/profile/README.md +7 -7
- package/remote/README.md +20 -18
- package/remote/object-store/README.md +8 -4
- package/remote/object-store/convex-r2/README.md +3 -3
- package/remote/object-store/s3/README.md +10 -5
- package/remote/relay/convex/README.md +5 -5
- package/remote/relay/convex/component/README.md +145 -124
- package/remote/relay/memory/README.md +6 -5
- package/safety/README.md +1 -1
- package/sealed-sender/README.md +3 -2
- package/types/README.md +1 -1
- package/utils/README.md +4 -4
package/docs/INTERFACES.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
> [Adapters](../ADAPTERS.md)
|
|
5
5
|
|
|
6
6
|
The Signal Protocol SDK keeps platform and backend infrastructure behind
|
|
7
|
-
explicit TypeScript interfaces. The client owns protocol coordination
|
|
7
|
+
explicit TypeScript interfaces. The client owns protocol coordination. The host
|
|
8
8
|
application owns persistence, authentication, authorization, and product
|
|
9
9
|
policy.
|
|
10
10
|
|
|
@@ -46,15 +46,15 @@ const client = await createSignalProtocolClient({
|
|
|
46
46
|
A production implementation must:
|
|
47
47
|
|
|
48
48
|
- preserve compare-and-swap and transaction semantics for trust and session
|
|
49
|
-
transitions
|
|
50
|
-
- consume one-time prekeys atomically with the corresponding session commit
|
|
51
|
-
- persist exact device/session ownership metadata
|
|
49
|
+
transitions.
|
|
50
|
+
- consume one-time prekeys atomically with the corresponding session commit.
|
|
51
|
+
- persist exact device/session ownership metadata.
|
|
52
52
|
- treat account reset as a coordinated lifecycle across protocol records,
|
|
53
|
-
bootstrap secrets, backups, and application state
|
|
53
|
+
bootstrap secrets, backups, and application state.
|
|
54
54
|
- avoid placing decrypted application messages in the protocol store.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
The [local-store guide](../local/store/README.md) lists the available adapters
|
|
57
|
+
and their status.
|
|
58
58
|
|
|
59
59
|
## `ISignalProtocolLocalSecretVault`
|
|
60
60
|
|
|
@@ -100,11 +100,16 @@ const relay: ISignalProtocolRelayServer = convexRelay({
|
|
|
100
100
|
});
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
The application backend must
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
103
|
+
The application backend must:
|
|
104
|
+
|
|
105
|
+
- authenticate every caller
|
|
106
|
+
- derive ownership from trusted server context
|
|
107
|
+
- authorize reads and writes
|
|
108
|
+
- atomically consume one-time prekeys
|
|
109
|
+
- allocate linked-device identifiers
|
|
110
|
+
- apply retention and abuse controls
|
|
111
|
+
|
|
112
|
+
A client-supplied user identifier is a routing input, not proof of identity.
|
|
108
113
|
|
|
109
114
|
The relay stores public protocol material, ciphertext, and required routing
|
|
110
115
|
metadata. It must not require device private keys or decrypted message content.
|
|
@@ -136,10 +141,14 @@ authenticated principal + retry requestId
|
|
|
136
141
|
-> private provider key
|
|
137
142
|
```
|
|
138
143
|
|
|
139
|
-
It must
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
144
|
+
It must:
|
|
145
|
+
|
|
146
|
+
- keep provider credentials and keys off the client
|
|
147
|
+
- enforce ciphertext size and content-type policy
|
|
148
|
+
- make upload completion idempotent
|
|
149
|
+
- authorize every download and deletion
|
|
150
|
+
|
|
151
|
+
See the [remote object-store guide](../remote/object-store/README.md).
|
|
143
152
|
|
|
144
153
|
## Application callbacks
|
|
145
154
|
|
|
@@ -169,8 +178,8 @@ const client = await createSignalProtocolClient({
|
|
|
169
178
|
```
|
|
170
179
|
|
|
171
180
|
Callbacks may update application databases, caches, UI state, and telemetry.
|
|
172
|
-
|
|
173
|
-
|
|
181
|
+
Never treat them as a transactional extension of a completed protocol state
|
|
182
|
+
update, unless the specific API says so.
|
|
174
183
|
|
|
175
184
|
## Choosing an integration
|
|
176
185
|
|
package/docs/PACKAGE_SURFACE.md
CHANGED
|
@@ -5,28 +5,29 @@
|
|
|
5
5
|
> [Security Model](./SECURITY.md) | [API Reference](./api/README.md)
|
|
6
6
|
|
|
7
7
|
This document is the complete public surface of
|
|
8
|
-
`@open-e2ee/signal-protocol-sdk
|
|
9
|
-
supported subpath, the adapter implementations that ship with the package
|
|
10
|
-
the vocabulary the rest of the documentation assumes.
|
|
8
|
+
`@open-e2ee/signal-protocol-sdk`. It lists what the root package exports, every
|
|
9
|
+
supported subpath, and the adapter implementations that ship with the package.
|
|
10
|
+
It also defines the vocabulary the rest of the documentation assumes.
|
|
11
11
|
|
|
12
12
|
## Core model
|
|
13
13
|
|
|
14
14
|
- `createSignalProtocolClient()` is the recommended app-facing entry point.
|
|
15
15
|
- `SignalProtocolClient` is the primary class returned by the factory.
|
|
16
|
-
- `storage
|
|
17
|
-
|
|
16
|
+
- Every client requires `storage`, which owns local encryption state for one
|
|
17
|
+
user/device.
|
|
18
|
+
- `relay` is optional for local development. Real messaging apps use it for
|
|
18
19
|
key sync, message delivery, device fanout, and linked-device workflows.
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
per `(userId, identityType)
|
|
20
|
+
- The client enables secure post-quantum defaults without extra configuration.
|
|
21
|
+
- The SDK pins identity trust to one versioned X25519 + Ed25519 composite tuple
|
|
22
|
+
per `(userId, identityType)`. First contact remains unverified TOFU.
|
|
22
23
|
- The root package is intentionally core-only. Platform and backend adapters
|
|
23
24
|
live on explicit subpaths.
|
|
24
25
|
|
|
25
|
-
OpenE2EE is the project and package namespace
|
|
26
|
+
OpenE2EE is the project and package namespace. It is not the name of a single
|
|
26
27
|
protocol client. The protocol-specific package and client names leave that
|
|
27
28
|
namespace clear for other E2EE protocol implementations, such as a future
|
|
28
29
|
[Messaging Layer Security (MLS)](https://www.rfc-editor.org/rfc/rfc9420.html)
|
|
29
|
-
package
|
|
30
|
+
package. They do not imply that one client spans multiple protocols.
|
|
30
31
|
|
|
31
32
|
## Setup sequence
|
|
32
33
|
|
|
@@ -131,7 +132,7 @@ Expo storage or Convex helpers.
|
|
|
131
132
|
|
|
132
133
|
- **Client**: one running app instance for one account and one device.
|
|
133
134
|
- **User ID**: your app's stable account identifier.
|
|
134
|
-
- **Device ID**: `1` for the primary device
|
|
135
|
+
- **Device ID**: `1` for the primary device. Linked devices use `2-5`.
|
|
135
136
|
- **Storage**: local encrypted state needed to keep conversations working across
|
|
136
137
|
restarts.
|
|
137
138
|
- **Relay**: server-side public keys, device lists, encrypted envelope delivery,
|
|
@@ -169,7 +170,7 @@ Expo storage or Convex helpers.
|
|
|
169
170
|
- `InMemorySignalProtocolStore` / `inMemoryStore()` for local development
|
|
170
171
|
- custom implementations via `ISignalProtocolLocalStore`
|
|
171
172
|
|
|
172
|
-
### Remote object
|
|
173
|
+
### Remote object store
|
|
173
174
|
|
|
174
175
|
- `ConvexR2ObjectStore` via
|
|
175
176
|
`@open-e2ee/signal-protocol-sdk/remote/object-store/convex-r2`
|
|
@@ -182,13 +183,13 @@ Expo storage or Convex helpers.
|
|
|
182
183
|
- custom implementations via `SignalProtocolRemoteObjectStore`
|
|
183
184
|
|
|
184
185
|
`ConvexR2ObjectStore` is a client adapter for authenticated app-owned Convex
|
|
185
|
-
functions that wrap `@convex-dev/r2
|
|
186
|
+
functions that wrap `@convex-dev/r2`. It is not the Convex component itself.
|
|
186
187
|
The application continues to own component installation, mounting,
|
|
187
188
|
configuration, authentication, authorization, persistence, credentials, and
|
|
188
189
|
the R2 bucket. The optional server helper owns only generic broker mechanics.
|
|
189
190
|
Both concrete adapters keep provider credentials in the application backend.
|
|
190
191
|
|
|
191
|
-
|
|
192
|
+
The remote object store is a normal integration point for encrypted
|
|
192
193
|
attachments and files, not a niche or internal-only adapter. Use
|
|
193
194
|
`attachment.transfer` when your app has a foreground, background, resumable, or
|
|
194
195
|
platform-native byte transfer implementation. The Signal Protocol package still
|
|
@@ -198,12 +199,13 @@ Object stores can return signed upload headers, and stores that return
|
|
|
198
199
|
`protocol: 'tus'` automatically use the built-in resumable TUS transfer helper.
|
|
199
200
|
You can also pass `media.createTusMediaAttachmentTransfer()` explicitly when
|
|
200
201
|
your app wants to tune the TUS fetch implementation or chunk size. Download
|
|
201
|
-
credentials can also return signed headers.
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
credentials can also return signed headers.
|
|
203
|
+
|
|
204
|
+
For JavaScript runtimes that need resumable downloads, use `media.createByteRangeMediaAttachmentTransfer()`. It
|
|
205
|
+
makes strict HTTP range requests, validates `Content-Range`, and persists
|
|
206
|
+
checkpoints. It resumes only when your app provides a partial-byte store for the
|
|
207
|
+
previous ciphertext prefix. Native background download integrations should
|
|
208
|
+
implement the same `MediaAttachmentTransfer` seam.
|
|
207
209
|
|
|
208
210
|
## Design notes
|
|
209
211
|
|
|
@@ -228,7 +230,7 @@ same `MediaAttachmentTransfer` seam.
|
|
|
228
230
|
- [Keys and identity](../keys/README.md)
|
|
229
231
|
- [Local stores](../local/store/README.md)
|
|
230
232
|
- [Local secret vault](../local/vault/README.md)
|
|
231
|
-
- [
|
|
233
|
+
- [Relay and remote object store](../remote/README.md)
|
|
232
234
|
- [Encrypted media](../media/README.md)
|
|
233
235
|
- [Encrypted files](../files/README.md)
|
|
234
236
|
- [Groups](../groups/README.md)
|
package/docs/PROTOCOL_POLICY.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> Navigation: [README](../README.md) | [ARCHITECTURE](../ARCHITECTURE.md) | [Security](./SECURITY.md) | [Getting Started](./GETTING_STARTED.md) | **Protocol Policy** | [Deviations](./DEVIATIONS.md)
|
|
4
4
|
|
|
5
|
-
This document covers **which protocol modes run** and which fail closed.
|
|
6
|
-
**how the profile differs from the
|
|
7
|
-
`libsignal
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
This document covers **which protocol modes run** and which fail closed.
|
|
6
|
+
[Deviations](./DEVIATIONS.md) covers **how the profile differs from the
|
|
7
|
+
published specifications and from `libsignal`**. That includes the composite
|
|
8
|
+
identity, the Ed25519-instead-of-XEdDSA signature scheme, the ML-KEM Braid
|
|
9
|
+
`hek` operand order, and every other difference.
|
|
10
10
|
|
|
11
11
|
The public Signal Protocol client policy is:
|
|
12
12
|
|
|
@@ -70,11 +70,13 @@ await createSignalProtocolClient({
|
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
`braid: 'required'` uses the specification-defined ML-KEM Braid SPQR profile
|
|
73
|
-
and is the default. HEK is `SHA3-256(ek_seed || ek_vector)
|
|
73
|
+
and is the default. HEK is `SHA3-256(ek_seed || ek_vector)`. That operand order
|
|
74
74
|
is part of the public compatibility boundary. It follows the ML-KEM Braid
|
|
75
|
-
specification text and
|
|
76
|
-
|
|
77
|
-
stock FIPS 203
|
|
75
|
+
specification text and reverses `libsignal`'s implementation. Braid sessions
|
|
76
|
+
therefore do not interoperate with `libsignal`'s, and the KEM in this mode is
|
|
77
|
+
not stock FIPS 203.
|
|
78
|
+
|
|
79
|
+
See [Deviations §4.1](./DEVIATIONS.md#41-the-hek-operand-order-diverges).
|
|
78
80
|
|
|
79
81
|
```ts
|
|
80
82
|
await createSignalProtocolClient({
|
|
@@ -115,10 +117,14 @@ compatibility fallback. Do not set `protocolStrategy.allowClassicalFallback`
|
|
|
115
117
|
when `protocol.postQuantum` is present.
|
|
116
118
|
|
|
117
119
|
The advanced `protocolStrategy.onBraidProgress` callback reports ML-KEM Braid
|
|
118
|
-
chunk progress after every braid-mode send and receive:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
chunk progress after every braid-mode send and receive:
|
|
121
|
+
|
|
122
|
+
- the chunks this side carried in the current epoch
|
|
123
|
+
- the chunks the open transfers account for
|
|
124
|
+
- the epoch
|
|
125
|
+
- whether the operation produced the epoch secret
|
|
126
|
+
|
|
127
|
+
A direct-mode session never raises it.
|
|
122
128
|
|
|
123
129
|
Do not set `protocolStrategy.sckaMode` when `protocol` is present. Use
|
|
124
130
|
`protocol.braid` so the public product policy owns the direct-vs-Braid choice.
|
package/docs/RECIPES.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> [Client Composition](./CLIENT_COMPOSITION.md) |
|
|
6
6
|
> [Protocol Policy](./PROTOCOL_POLICY.md)
|
|
7
7
|
|
|
8
|
-
Working shapes for the
|
|
8
|
+
Working shapes for the tasks applications do most often. Each example
|
|
9
9
|
uses public exports only.
|
|
10
10
|
|
|
11
11
|
## Two local clients
|
|
@@ -90,8 +90,8 @@ bob decrypted: alice: hello
|
|
|
90
90
|
|
|
91
91
|
The first message usually uses a `prekey_bundle` envelope because it establishes
|
|
92
92
|
the session. Later messages on the same session use `ciphertext`. In both cases
|
|
93
|
-
the relay sees encrypted envelope bytes
|
|
94
|
-
|
|
93
|
+
the relay sees encrypted envelope bytes. Bob receives decrypted content only
|
|
94
|
+
through the `onMessageDecrypted` hook.
|
|
95
95
|
|
|
96
96
|
## Production composition with Convex + Expo
|
|
97
97
|
|
|
@@ -389,5 +389,5 @@ await signal.media.cleanup(
|
|
|
389
389
|
```
|
|
390
390
|
|
|
391
391
|
See the [encrypted media guide](../media/README.md) and
|
|
392
|
-
[remote object
|
|
392
|
+
[remote object store](../remote/README.md) for the transfer and object-store
|
|
393
393
|
contracts these examples compose.
|
package/docs/SECURITY.md
CHANGED
|
@@ -28,15 +28,16 @@ compatibility boundary.
|
|
|
28
28
|
- The SDK selects SESAME's per-user identity-key model and provisions that tuple
|
|
29
29
|
unchanged across linked devices. Registration IDs, prekeys, and sessions are
|
|
30
30
|
device-specific. Generic SESAME still supports both identity-key models.
|
|
31
|
-
- Trust storage persists the tuple and trust metadata.
|
|
32
|
-
locally and a redundant supplied commitment must match before
|
|
31
|
+
- Trust storage persists the tuple and trust metadata. The SDK derives
|
|
32
|
+
commitments locally, and a redundant supplied commitment must match before
|
|
33
|
+
mutation.
|
|
33
34
|
- First contact is `UNVERIFIED_TOFU`, not authenticated identity.
|
|
34
35
|
- Replacing either component of a pinned tuple fails closed until rotation is
|
|
35
36
|
explicitly accepted. A retired tuple cannot silently regain trust.
|
|
36
37
|
- Authenticated safety-number comparison covers both peers' complete composite
|
|
37
38
|
tuples and only promotes the exact current tuple to `VERIFIED`.
|
|
38
39
|
|
|
39
|
-
The Ed25519 component
|
|
40
|
+
The Ed25519 component creates ordinary RFC 8032 signatures. It does not
|
|
40
41
|
implement XEdDSA and cannot consume or produce XEdDSA identity signatures.
|
|
41
42
|
|
|
42
43
|
### PQXDH and ML-KEM-1024
|
|
@@ -46,9 +47,9 @@ implement XEdDSA and cannot consume or produce XEdDSA identity signatures.
|
|
|
46
47
|
- Public keys and ciphertexts require exactly `0x0A || raw ML-KEM-1024 bytes`.
|
|
47
48
|
Untagged values, the deployed Kyber1024 `0x08` tag, unknown tags, and wrong
|
|
48
49
|
lengths fail before secret derivation or state commit.
|
|
49
|
-
- Prekey signatures cover a domain-separated context
|
|
50
|
-
derived composite identity commitment, algorithm tag, key ID, and
|
|
51
|
-
tagged public key.
|
|
50
|
+
- Prekey signatures cover a domain-separated context. That context contains the
|
|
51
|
+
locally derived composite identity commitment, algorithm tag, key ID, and
|
|
52
|
+
complete tagged public key.
|
|
52
53
|
- `protocol.postQuantum: 'compatible'` is an explicit opt-in. It permits a
|
|
53
54
|
classical session only when a peer advertises no PQ material. Malformed or
|
|
54
55
|
failed PQ processing does not trigger fallback.
|
|
@@ -63,19 +64,20 @@ round-3 Kyber1024 tagged `0x08`.
|
|
|
63
64
|
using ML-KEM-768 and bounded Reed-Solomon decoding.
|
|
64
65
|
- HEK follows the ML-KEM Braid specification:
|
|
65
66
|
`SHA3-256(ek_seed || ek_vector)`.
|
|
66
|
-
- `KDF_OK`
|
|
67
|
-
Braid output is already an epoch secret and is not derived a second
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
- The SDK applies `KDF_OK` once when raw ML-KEM output enters the epoch
|
|
68
|
+
boundary. Braid output is already an epoch secret and is not derived a second
|
|
69
|
+
time.
|
|
70
|
+
- The SDK rejects malformed epoch secrets, roots, chain state, chunks, indexes,
|
|
71
|
+
and wire values before it commits live state.
|
|
70
72
|
- Direct ML-KEM-768 SCKA remains an explicit SDK mode for product-reviewed
|
|
71
|
-
constraints
|
|
73
|
+
constraints. It is not the default.
|
|
72
74
|
|
|
73
75
|
## Forward and Post-Compromise Security
|
|
74
76
|
|
|
75
77
|
The Double Ratchet derives a new message key for each chain step and advances
|
|
76
|
-
chain state after successful use.
|
|
77
|
-
|
|
78
|
-
an uncompromised ratchet step
|
|
78
|
+
chain state after successful use. The SDK bounds skipped receive keys, and
|
|
79
|
+
removes each one after use or expiry. Fresh DH ratchet inputs provide break-in
|
|
80
|
+
recovery once an uncompromised ratchet step completes. SPQR adds post-quantum
|
|
79
81
|
epoch material to the Triple Ratchet hybrid derivation.
|
|
80
82
|
|
|
81
83
|
These properties depend on authenticated session establishment, uncompromised
|
|
@@ -86,7 +88,7 @@ source.
|
|
|
86
88
|
|
|
87
89
|
Best-effort typed-array overwrites reduce the lifetime of some owned temporary
|
|
88
90
|
buffers. They do not make old secrets physically unrecoverable from JavaScript
|
|
89
|
-
memory
|
|
91
|
+
memory. Copies, strings, engine internals, CPU registers, and garbage-collected
|
|
90
92
|
heap pages remain outside the SDK's control.
|
|
91
93
|
|
|
92
94
|
## JavaScript Timing Boundary
|
|
@@ -95,10 +97,10 @@ Browser, Node, and Expo/React Native JavaScript engines provide no machine-level
|
|
|
95
97
|
constant-time contract. The implementation uses best-effort source patterns on
|
|
96
98
|
selected paths:
|
|
97
99
|
|
|
98
|
-
- full-scan comparison for equal-length MACs and identity bytes
|
|
99
|
-
- fixed
|
|
100
|
-
|
|
101
|
-
- equal-work rejection padding on selected replay and authentication paths
|
|
100
|
+
- full-scan comparison for equal-length MACs and identity bytes.
|
|
101
|
+
- fixed work on both decapsulation candidates, then a masked choice between
|
|
102
|
+
them.
|
|
103
|
+
- equal-work rejection padding on selected replay and authentication paths.
|
|
102
104
|
- fixed-work rejection handling on selected authentication paths.
|
|
103
105
|
|
|
104
106
|
These patterns do not prove timing equivalence. Secret-influenced remainder and
|
|
@@ -112,41 +114,50 @@ high-assurance co-resident timing adversary.
|
|
|
112
114
|
`secureZeroBytes()` and related cleanup calls overwrite only the exact mutable
|
|
113
115
|
typed array owned by the caller. They cannot guarantee erasure of:
|
|
114
116
|
|
|
115
|
-
- earlier or implicit copies
|
|
116
|
-
- immutable Base64 or UTF-8 strings
|
|
117
|
-
- engine temporaries, registers, JIT artifacts, or garbage-collected pages
|
|
117
|
+
- earlier or implicit copies.
|
|
118
|
+
- immutable Base64 or UTF-8 strings.
|
|
119
|
+
- engine temporaries, registers, JIT artifacts, or garbage-collected pages.
|
|
118
120
|
- persisted copies held by an adapter or operating system.
|
|
119
121
|
|
|
120
|
-
Applications should
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
Applications should:
|
|
123
|
+
|
|
124
|
+
- keep long-lived private material in the strongest platform-backed storage
|
|
125
|
+
available.
|
|
126
|
+
- minimize plaintext/key lifetimes.
|
|
127
|
+
- avoid logging secrets.
|
|
128
|
+
- treat a compromised JavaScript runtime as a key compromise.
|
|
129
|
+
|
|
130
|
+
A qualified native/WASM/Rust/Swift backend is roadmap work when a deployment
|
|
131
|
+
requires stronger timing or erasure assurance.
|
|
125
132
|
|
|
126
133
|
## Storage Boundary
|
|
127
134
|
|
|
128
135
|
Local adapters own identity keys, contact trust metadata, prekeys, session
|
|
129
136
|
records, retry records, and group state. The package requires:
|
|
130
137
|
|
|
131
|
-
- atomic composite-identity writes and explicit rotation acceptance
|
|
132
|
-
- current session-record format version 4
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
- no authoritative cached identity commitment
|
|
138
|
+
- atomic composite-identity writes and explicit rotation acceptance.
|
|
139
|
+
- current session-record format version 4.
|
|
140
|
+
- that an adapter reject stale-format writes before it replaces current state.
|
|
141
|
+
- that an adapter remove or reject stale persisted session records on read.
|
|
142
|
+
- no authoritative cached identity commitment.
|
|
136
143
|
- authenticated encryption for adapters that persist encrypted records.
|
|
137
144
|
|
|
138
|
-
Adapter encryption does not compensate for
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
Adapter encryption does not compensate for:
|
|
146
|
+
|
|
147
|
+
- XSS, malicious dependencies, or compromised application code.
|
|
148
|
+
- a stolen unlocked device.
|
|
149
|
+
- an attacker who also holds the adapter encryption key.
|
|
150
|
+
|
|
151
|
+
Browser IndexedDB and caller-provided React Native storage inherit their host
|
|
152
|
+
application's security boundary.
|
|
142
153
|
|
|
143
154
|
Group sender key state never leaves the device. A sender key record holds the
|
|
144
|
-
chain key every message key on that chain derives from and the sender's
|
|
145
|
-
signature key
|
|
146
|
-
forge new ones
|
|
147
|
-
The same rule covers the message keys held for
|
|
148
|
-
Local adapters bound that skipped-key store so a
|
|
149
|
-
limit by skipping ever further ahead.
|
|
155
|
+
chain key that every message key on that chain derives from, and the sender's
|
|
156
|
+
private signature key. Together they are enough to read a sender's group
|
|
157
|
+
messages and to forge new ones. No adapter transmits them, and no relay
|
|
158
|
+
contract accepts them. The same rule covers the message keys held for
|
|
159
|
+
out-of-order group messages. Local adapters bound that skipped-key store so a
|
|
160
|
+
peer cannot grow it without limit by skipping ever further ahead.
|
|
150
161
|
|
|
151
162
|
Relay and remote object-store adapters receive public key material, routing
|
|
152
163
|
metadata, and opaque ciphertext required by their contracts. TLS,
|
|
@@ -154,11 +165,12 @@ authorization, abuse controls, atomic prekey consumption, and access logging
|
|
|
154
165
|
remain deployment responsibilities. The relay is not an identity trust anchor.
|
|
155
166
|
|
|
156
167
|
Remote object-store upload requests use a retry identifier, not a storage key.
|
|
157
|
-
Applications must scope that identifier to the authenticated principal
|
|
158
|
-
the durable mapping from it to a canonical object identifier and
|
|
159
|
-
provider key. Applications must also enforce object access, upload
|
|
160
|
-
encrypted-object content type on the backend. Presigned URLs are
|
|
161
|
-
|
|
168
|
+
Applications must scope that identifier to the authenticated principal. They
|
|
169
|
+
must also own the durable mapping from it to a canonical object identifier and
|
|
170
|
+
a private provider key. Applications must also enforce object access, upload
|
|
171
|
+
size, and encrypted-object content type on the backend. Presigned URLs are
|
|
172
|
+
short-lived
|
|
173
|
+
bearer credentials. Never log one, and never expose one beyond the authorized
|
|
162
174
|
operation.
|
|
163
175
|
|
|
164
176
|
## Resource and DoS Controls
|
|
@@ -170,7 +182,7 @@ chunk indexes, shard counts, and allocation before decoding. Retry processing
|
|
|
170
182
|
limits attempts and requires an existing sent-message record unless a narrowly
|
|
171
183
|
scoped lifecycle path explicitly bypasses message validation.
|
|
172
184
|
|
|
173
|
-
These controls reduce amplification and unbounded allocation
|
|
185
|
+
These controls reduce amplification and unbounded allocation. They do not
|
|
174
186
|
replace application-level request size limits, rate limiting, authentication,
|
|
175
187
|
or transport abuse prevention.
|
|
176
188
|
|
|
@@ -178,25 +190,25 @@ or transport abuse prevention.
|
|
|
178
190
|
|
|
179
191
|
In scope:
|
|
180
192
|
|
|
181
|
-
- passive network observation
|
|
182
|
-
- active message tampering, replay, reordering, duplication, and truncation
|
|
183
|
-
- malicious or stale relay responses within the adapter contract
|
|
184
|
-
- identity component substitution after
|
|
193
|
+
- passive network observation.
|
|
194
|
+
- active message tampering, replay, reordering, duplication, and truncation.
|
|
195
|
+
- malicious or stale relay responses within the adapter contract.
|
|
196
|
+
- identity component substitution after the SDK pins trust.
|
|
185
197
|
- malformed prekeys, KEM keys/ciphertexts, protocol messages, restored state,
|
|
186
|
-
Braid traces, and Reed-Solomon chunks
|
|
187
|
-
- loss and out-of-order delivery within configured protocol bounds
|
|
198
|
+
Braid traces, and Reed-Solomon chunks.
|
|
199
|
+
- loss and out-of-order delivery within configured protocol bounds.
|
|
188
200
|
- later compromise followed by an uncompromised ratchet recovery step.
|
|
189
201
|
|
|
190
202
|
Out of scope or only partially mitigated:
|
|
191
203
|
|
|
192
|
-
- compromised endpoints, JavaScript engines, dependencies, or build pipeline
|
|
193
|
-
- hostile same-process code and high-assurance local timing attackers
|
|
194
|
-
- guaranteed secret erasure from managed memory
|
|
195
|
-
- hardware, physical, speculative-execution, and microarchitectural attacks
|
|
204
|
+
- compromised endpoints, JavaScript engines, dependencies, or build pipeline.
|
|
205
|
+
- hostile same-process code and high-assurance local timing attackers.
|
|
206
|
+
- guaranteed secret erasure from managed memory.
|
|
207
|
+
- hardware, physical, speculative-execution, and microarchitectural attacks.
|
|
196
208
|
- traffic-analysis resistance beyond the metadata/padding behavior explicitly
|
|
197
|
-
implemented
|
|
209
|
+
implemented.
|
|
198
210
|
- Signal Messenger interoperability outside the exact
|
|
199
|
-
alignments stated in this security model
|
|
211
|
+
alignments stated in this security model.
|
|
200
212
|
- recovery of authenticity on unauthenticated first contact without an
|
|
201
213
|
authenticated safety-number or configured trust mechanism.
|
|
202
214
|
|
package/encoding/README.md
CHANGED
|
@@ -26,7 +26,7 @@ const urlToken = bytesToUrlSafeBase64(bytes);
|
|
|
26
26
|
const roundTrip = hexToBytes(bytesToHex(bytes));
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
Treat encoded cryptographic values as opaque. Encoding changes representation
|
|
30
|
-
|
|
29
|
+
Treat encoded cryptographic values as opaque. Encoding changes representation. It
|
|
30
|
+
does not encrypt, authenticate, or validate the meaning of the bytes.
|
|
31
31
|
|
|
32
32
|
See the [API reference](../docs/api/namespaces/encoding/README.md).
|
package/files/README.md
CHANGED
|
@@ -5,7 +5,7 @@ files and attachments.
|
|
|
5
5
|
|
|
6
6
|
## Why it exists
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Do not embed large payloads directly in Signal Protocol messages.
|
|
9
9
|
The application encrypts bytes locally, uploads only ciphertext, and sends the
|
|
10
10
|
decryption key plus integrity metadata inside an end-to-end encrypted message.
|
|
11
11
|
|
package/groups/README.md
CHANGED
|
@@ -42,11 +42,12 @@ The server must enforce authenticated access and version sequencing without
|
|
|
42
42
|
receiving plaintext group attributes or group master keys. Membership removal
|
|
43
43
|
must also invalidate or rotate group messaging state through the callbacks
|
|
44
44
|
required by `GroupManagerOptions`. Every `getGroup()` response must include a
|
|
45
|
-
baseline signature over the group ID, version, and exact encrypted-state bytes
|
|
46
|
-
|
|
45
|
+
baseline signature over the group ID, version, and exact encrypted-state bytes.
|
|
46
|
+
The client verifies that signature before installing a first or post-revocation
|
|
47
|
+
baseline.
|
|
47
48
|
|
|
48
49
|
Deployments whose server does not yet sign group changes must opt in explicitly
|
|
49
|
-
with `allowUnauthenticatedGroupHistory: true
|
|
50
|
+
with `allowUnauthenticatedGroupHistory: true`. The SDK emits a security warning
|
|
50
51
|
because that mode has no authenticated group history.
|
|
51
52
|
|
|
52
53
|
See the [API reference](../docs/api/README.md) and
|
package/hooks/README.md
CHANGED
|
@@ -7,8 +7,8 @@ and single-flight helpers.
|
|
|
7
7
|
## Why it exists
|
|
8
8
|
|
|
9
9
|
The core SDK is framework-neutral. React hooks live on a separate package
|
|
10
|
-
subpath
|
|
11
|
-
SDK state without duplicating effect cleanup.
|
|
10
|
+
subpath. Non-React consumers therefore do not load React, and UI code can
|
|
11
|
+
subscribe to SDK state without duplicating effect cleanup.
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
package/keys/README.md
CHANGED
|
@@ -28,8 +28,8 @@ const signedPreKey = await generateEcSignedPreKey(identity);
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
Ordinary application code usually lets `SignalProtocolClient` generate and
|
|
31
|
-
persist this material. Direct key APIs
|
|
32
|
-
|
|
31
|
+
persist this material. Direct key APIs serve adapter, provisioning, and
|
|
32
|
+
advanced lifecycle integrations.
|
|
33
33
|
|
|
34
34
|
## Composite identity
|
|
35
35
|
|
|
@@ -47,7 +47,7 @@ The SDK provisions one tuple per `(userId, identityType)` across linked devices.
|
|
|
47
47
|
ACI and PNI are independent identity types. Device registration IDs, prekeys,
|
|
48
48
|
and sessions remain device-specific.
|
|
49
49
|
|
|
50
|
-
The tuple
|
|
50
|
+
The tuple encodes to exactly 67 bytes:
|
|
51
51
|
|
|
52
52
|
```text
|
|
53
53
|
0x01 || 0x01 || X25519 public key || 0x02 || Ed25519 public key
|
|
@@ -72,7 +72,7 @@ not make this profile interoperable with XEdDSA identity signatures.
|
|
|
72
72
|
ML-KEM-1024 public keys use the mandatory `0x0A || raw` representation: one tag
|
|
73
73
|
byte plus 1,568 raw bytes. The corresponding serialized ciphertext has the same
|
|
74
74
|
1,569-byte size. A value with the deployed round-3 Kyber1024 `0x08` tag is a
|
|
75
|
-
different profile and
|
|
75
|
+
different profile, and the SDK rejects it.
|
|
76
76
|
|
|
77
77
|
Prekey signatures cover a domain-separated context, not only the raw key:
|
|
78
78
|
|
|
@@ -91,11 +91,12 @@ For ML-KEM-1024, `serialized public key` includes the `0x0A` tag.
|
|
|
91
91
|
`PreKeyBundle` carries one composite identity and the device-specific material
|
|
92
92
|
needed for X3DH/PQXDH session establishment:
|
|
93
93
|
|
|
94
|
-
- registration ID and device ID
|
|
95
|
-
- composite identity tuple
|
|
96
|
-
- required signed EC prekey
|
|
97
|
-
- optional EC one-time prekey
|
|
98
|
-
- either a one-time or last-resort signed ML-KEM-1024 prekey when
|
|
94
|
+
- registration ID and device ID.
|
|
95
|
+
- composite identity tuple.
|
|
96
|
+
- required signed EC prekey.
|
|
97
|
+
- optional EC one-time prekey.
|
|
98
|
+
- either a one-time or last-resort signed ML-KEM-1024 prekey when the session
|
|
99
|
+
uses PQXDH.
|
|
99
100
|
|
|
100
101
|
Relay and storage adapters carry the same canonical tuple. Consumers must reject
|
|
101
102
|
an identity mismatch before consuming a one-time prekey or committing a session.
|
|
@@ -103,11 +104,11 @@ an identity mismatch before consuming a one-time prekey or committing a session.
|
|
|
103
104
|
## Secret ownership
|
|
104
105
|
|
|
105
106
|
Private keys are Base64 strings in the current public types and therefore cannot
|
|
106
|
-
be reliably erased by the SDK.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
107
|
+
be reliably erased by the SDK. Generation and crypto functions overwrite their
|
|
108
|
+
temporary mutable byte arrays after use, where practical. JavaScript still does
|
|
109
|
+
not guarantee physical zeroization, freedom from copies, or hard constant-time
|
|
110
|
+
execution. The strongest platform-backed storage available to the application
|
|
111
|
+
should hold long-lived keys.
|
|
111
112
|
|
|
112
113
|
## Module boundaries
|
|
113
114
|
|