Commit Graph

21 Commits

Author SHA1 Message Date
Rolfe Schmidt
81afdfe2fa MAC sender ID 2026-04-01 11:22:54 -06:00
Rolfe Schmidt
98794de745 1:1 decryption takes local address 2026-03-27 16:45:07 -06:00
gram-signal
533d11dd7c Remove usePqRatchet from client-facing code, defaulting to always use. 2025-10-02 11:32:36 -07:00
Jordan Rose
15af92c93d protocol: Record signed prekey and base key used with a Kyber prekey 2025-09-16 15:33:59 -07:00
andrew-signal
01d3d4ed30 Future-proof sealed sender trust root handling.
Co-authored-by: Jordan Rose <jrose@signal.org>
2025-08-27 12:03:28 -04:00
Jordan Rose
9e13263581 Switch to swift-format for formatting instead of swiftformat
swift-format is owned by the Swift project and is generally less
opinionated than swiftformat (but better at formatting to a limited
line length).
2025-06-25 11:24:57 -07:00
Alex Bakon
8e950c4691 Port Swift args, return types from [UInt8] to Data 2025-06-13 15:15:04 -04:00
gram-signal
b7b8040e3a Integrate post-quantum ratchet SPQR.
This PR integrates a post-quantum ratchet (SPQR) into libsignal, using an API that maintains its own internal chain and provides per-message keys.  In doing so, it also aims to be fully backwards-compatible with current clients and stored session state.

## Backwards compatibility with current clients

Remote clients that connect to us or that we connect to may not have this integration.  If they don't, their SignalMessage wire format should still deserialize, and in doing so we'll receive an empty pq_ratchet field.  SQPR handles this internally, by downgrading the protocol version to "version 0" or "don't do anything".  Note that should we eventually want to disallow this, we can do so via increasing the `min_version` field passed into the SQPR init functions to V1.  This is also the method by which we would upgrade SQPR from v1 to a future v2, etc.

## Opt-in

The publicly facing API calls for this now expose an explicit opt-in via a passed-in `use_pq_ratchet` bool (and associated enums in language-specific APIs).  If false, they default to SQPR `v0`, IE: none.  If true, they try to set up SPQR on new sessions, but will downgrade if the remote party cannot or will not do the same.
2025-06-04 11:18:12 -07:00
Jordan Rose
0e1ec3909b bridge: Require that PreKeyBundles have Kyber pre-keys
Support for starting sessions with pre-quantum X3DH has been removed
from Swift, Java, and TypeScript. PQXDH will be required going
forward.
2025-05-19 12:25:53 -07:00
Jordan Rose
1458b6ffa2 swift: Remove sealedSenderEncrypt/Decrypt convenience functions
...in favor of the more general functions using
UnidentifiedSenderMessageContent, which the iOS app is already using.
(sealedSenderDecrypt in particular was never updated to support
PQXDH.)
2025-05-06 07:56:23 -07:00
Jordan Rose
41dd135238 swift: Add USMC deserialize constructor
Co-authored-by: saman koushki <saman.koushki79@gmail.com>
2025-04-08 10:43:05 -07:00
Jordan Rose
f536bf74c8 swift: Add USMC constructor from content and type
Co-authored-by: saman koushki <saman.koushki79@gmail.com>
2025-03-21 09:52:00 -07:00
moiseev-signal
58f43107ab Enforce Swift code formatting 2024-02-23 09:56:38 -08:00
Jordan Rose
16653ffea1 SSv2: Add send support for excluded recipients 2023-12-11 12:36:54 -08:00
Jordan Rose
0e7963f787 swift: Fix SenderKeyDistributionMessage.distributionId
Had the same problem as the Java version!
2023-12-08 12:11:25 -08:00
Jordan Rose
024c618f20 protocol: Throw SessionNotFound for an expired unacknowledged session
For the most part this should happen transparently without any
explicit adoption, like the previous change, but for Java code the
NoSessionException is now properly declared on SessionCipher.encrypt.
(This was always technically possible, but clients were expected to
have previously checked for session validity before using
SessionCipher; now that there's an expiration involved, that's not
strictly possible.)
2023-08-22 17:00:35 -07:00
Jordan Rose
ff81905fc6 Add senderAci() to SenderCertificate and DecryptionResult
Like ProtocolAddresses in 88a2d5c, these APIs will eventually only
support ACIs, so introducing strong types now helps move in that
direction. However, the existing APIs that produce strings have not
been removed yet.
2023-08-02 17:51:23 -07:00
moiseev-signal
30ce471b2b swift: Add PQXDH support 2023-06-08 17:30:11 -07:00
Jordan Rose
4175751cbe Remove the non-expiring ProfileKeyCredential
Keep support for deserializing ProfileKeyCredentialPresentationV2
because that may be in some group history.
2023-04-18 17:47:49 -07:00
Jordan Rose
f1825c4892 Revert "Expose SessionRecord.needsPniSignature/.setNeedsPniSignature"
This reverts commit 71fdd6566e.
2022-05-25 10:38:32 -07:00
Jordan Rose
0542686e70 Update artifact/package/module names across all three app languages
- Java: org.whispersystems:signal-client-java ->
    org.signal:libsignal-client
- Java: org.whispersystems:signal-client-android ->
    org.signal:libsignal-android
- Java: org.whispersystems:libsignal-server ->
    org.signal:libsignal-server
- Swift: SignalClient -> LibSignalClient
- NPM: @signalapp/signal-client -> @signalapp/libsignal-client
- Repository: github.com/signalapp/libsignal-client ->
    github.com/signalapp/libsignal
2022-03-23 10:49:09 -07:00