Commit Graph

78 Commits

Author SHA1 Message Date
gram-signal
ee149c5982 Remove masking from SVR3 API. 2025-07-09 13:03:14 -07:00
gram-signal
19ca6d7e03 Resurrect necessary SVR3 protocol. 2025-07-09 10:56:16 -07:00
Jordan Rose
2f6e1cca98 jni: Explicitly keep bridge_handle objects alive while using them
As a bonus, we get a partial check for misuse of mutating APIs.
2025-06-30 15:54:24 -07:00
Jordan Rose
eade867168 Move net::keytrans to libsignal-net-chat 2025-06-25 17:22:30 -07:00
moiseev-signal
d0425f2d3f swift: Make FingerprintMismatch error more useful 2025-06-25 15:20:04 -07:00
Alex Bakon
77cd1983e1 Refactor registration as typed API trait 2025-06-25 14:08:58 -04:00
Jordan Rose
841f57c30f Move (RegistrationSessionState)RequestedInformation -> ChallengeOption 2025-06-23 10:37:55 -07:00
Alex Bakon
56c63a4838 Refactor registration errors on existing types 2025-06-20 17:14:52 -04:00
Alex Bakon
b7828f54be Move registration client into libsignal-net-chat 2025-06-17 14:28:47 -04:00
Jordan Rose
2879220e93 Require Kyber keys/ciphertexts throughout all XDH APIs 2025-06-13 16:06:07 -07:00
Alex Bakon
669e682e6c Remove more no-longer-used networking code 2025-06-05 09:25:31 -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
Alex Bakon
8a9e18b6c6 Remove unused #[allow], replace with #[expect] 2025-06-03 16:07:06 -04:00
moiseev-signal
cdd36eb2d1 keytrans: Add production configuration 2025-06-03 12:23:24 -07:00
Alex Bakon
8782d0a406 Add bridging tests for optional UUID return 2025-06-03 13:50:26 -04:00
moiseev-signal
bf096c449d keytrans: Improve errors 2025-05-30 16:00:06 -07:00
Alex Bakon
bf1e08b427 Check for cancellation of Rust task in test 2025-05-20 14:15:23 -04:00
moiseev-signal
a823fd4a14 keytrans: Remove SearchResult type 2025-05-16 11:33:31 -07:00
andrew-signal
eaa32e1b4c Bridge CompletableFuture Cancellation to Android 2025-05-16 11:23:37 -04:00
Alex Bakon
2ef1da756e Use bytes::Bytes in Chat websocket protobufs 2025-05-14 13:31:46 -04:00
Alex Bakon
840f14d2b3 Bridge register account method to Swift 2025-05-14 12:29:24 -04:00
Alex Bakon
eec9b04996 Port registration fake chat test to Swift 2025-05-14 09:54:11 -04:00
Alex Bakon
3bd9629692 Bridge returned registration values to Swift 2025-05-12 17:06:31 -04:00
Jordan Rose
26d92fb09e jni: Add a debug mode to type-tag bridged object handles
Use `./gradlew -P jniTypeTagging` to build with type tags enabled.

This has a moderate code size cost, and an unmeasured cost in run-time
performance. On 64-bit targets, the tagging relies on bits 48..56 of 
pointers produced by the default Rust memory allocator being unused
(specifically 0), which they are on all our current targets.
2025-05-12 08:37:08 -07:00
Alex Bakon
478ae16c3b Bridge registration session verification fns to Swift 2025-05-06 16:10:29 -04:00
Alex Bakon
e8698b9464 Upgrade tokio to 1.45 2025-05-06 13:52:38 -04:00
Alex Bakon
3de159b65e Bridge remaining registration errors to Swift 2025-05-06 11:30:54 -04:00
Alex Bakon
afe710164c Start bridging registration client errors to Swift 2025-05-06 10:55:37 -04:00
moiseev-signal
eac4cf58ed keytrans: Support multiple auditors 2025-05-01 13:27:04 -07:00
gram-signal
7965164aa6 New SVR2 enclaves for staging and production. 2025-05-01 09:27:56 -07:00
Alex Bakon
b95359ced8 Allow using registration client to check SVR2 credentials 2025-05-01 08:51:00 -04:00
Jordan Rose
d58f237b4a net: Require TLS 1.3 for Signal-provided services and 1.2 for Cloudflare DoH
Co-authored-by: andrew-signal <andrew@signal.org>
2025-04-30 07:08:17 -05:00
Alex Bakon
e0e79e567c Bridge register account error to Java 2025-04-25 10:33:12 -04:00
Alex Bakon
aeb2f2a561 Bump rand dependency to 0.9 2025-04-24 13:12:56 -04:00
Alex Bakon
b749afc059 Bridge RegisterAccountResponse to Java 2025-04-22 14:30:14 -04:00
Alex Bakon
a8d4849c9e Add Java type for public parts of a signed prekey 2025-04-21 16:29:56 -04:00
Alex Bakon
f0b83376e4 Don't bridge SessionRecord test-only code in real .so 2025-04-18 15:06:32 -04:00
Alex Bakon
0d916d3aa0 Bridge registration client to Java 2025-04-09 18:57:07 -04:00
Alex Bakon
0fde9a0160 Add a Node registration client fake server test 2025-04-08 13:11:51 -04:00
Jordan Rose
5563e4d277 net: Add "remote config" string-to-string map to Net/ConnectionManager
This can be set at creation time as well as updated later without
recreating the Net instance.
2025-04-03 15:16:35 -07:00
Jordan Rose
fed4a6e54a bridge: Add BridgedStringMap
This is a utility class that should not be exposed directly in
app-facing APIs.
2025-04-03 15:16:35 -07:00
andrew-signal
0a6376525f Implement ConnectionInvalidated and ConnectedElsewhere Disconnection Reasons 2025-04-02 15:06:37 -04:00
Alex Bakon
9d3f2e0f54 Add conversion tests for registration errors 2025-04-01 17:18:00 -04:00
Alex Bakon
03a739a95c Use const_str::hex instead of hex_literal::hex 2025-03-28 14:48:19 -04:00
Alex Bakon
50325dd478 Replace SignalJniError enum with boxed trait 2025-03-28 13:07:32 -04:00
Alex Bakon
9385ad2287 Expose registration service client in Node library 2025-03-25 13:23:35 -04:00
Alex Bakon
c08602eebe Enable creating a fake unauthenticated chat connection 2025-03-20 08:18:25 -04:00
Alex Bakon
5fb570f25f Use a strong type for "retry later" 2025-03-12 10:21:22 -04:00
moiseev-signal
7b293c19e0 ketrans: Update test account data 2025-03-11 14:31:18 -07:00
moiseev-signal
6c06d83618 Remove svr3 2025-03-11 13:06:37 -07:00