Commit Graph

812 Commits

Author SHA1 Message Date
moiseev-signal
ca28564e0b java: Address deprecation warning in Curve25519Test 2025-07-16 11:26:31 -07:00
Jordan Rose
d3a54c3c19 java: Fix deprecated ENV syntax in Dockerfile 2025-07-15 18:20:13 -07:00
Jordan Rose
7489feaca4 java: Don't apply Kotlin plugins in the top-level project
Otherwise, IDEs can get confused, since our top-level project has no
'repositories' section.
2025-07-15 18:14:56 -07:00
Jordan Rose
bff304625f java: Only verify dependencies strictly in CI+Docker
Some IDEs download additional artifacts that a plain command-line
Gradle build won't use, which means Gradle won't automatically manage
them in verification-metadata.xml either. Compromise by only strictly
checking dependencies at certain boundaries, rather than on every
build action.
2025-07-15 16:34:29 -07:00
Jordan Rose
a410849578 crypto: Add a stripped-down HPKE API for our Curve25519 keys 2025-07-15 16:17:23 -07:00
andrew-signal
a323900858 Refactor so tests generate legacy key format encrypted file; client tests can use that. 2025-07-15 13:16:06 -04:00
Andrew
c91d44a873 Reset for version v0.76.5 2025-07-14 12:42:28 -04:00
andrew-signal
36797e6eca Update MessageBackupKey derivation logic to use nonce if provided 2025-07-09 13:57:09 -04:00
Jordan Rose
25613c488a android: Add a sealed-sender encrypt benchmark 2025-07-03 11:07:01 -07:00
Jordan Rose
c904fc88bd Set CXXFLAGS in addition to CFLAGS 2025-07-02 13:37:25 -07:00
moiseev-signal
4d187d2452 ci: Run proxy tests in Slow Tests workflow 2025-07-02 13:25:57 -07:00
andrew-signal
7167436147 Expand InvalidSessionException to take a cause 2025-07-02 04:55:16 -04:00
Andrew
3ae165add7 Reset for version v0.76.4 2025-07-01 13:57:06 -04:00
andrew-signal
4a7758e378 Update Sonatype destination URLs as old ones have been deprecated
See: https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/
2025-07-01 13:01:42 -04:00
Andrew
a400a0078c Reset for version v0.76.3 2025-07-01 04:38:10 -04:00
moiseev-signal
71c44d47e1 java: Fix incremental mac finalization. Again. 2025-06-30 18:54:21 -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
Alex Bakon
a7f823771f Combine CreateSession push_token, push_token_type
These fields should always be present or absent together.
2025-06-26 17:19:05 -07:00
Max Moiseev
f60748b4aa Reset for version v0.76.2 2025-06-26 12:20:27 -07:00
moiseev-signal
f395e1cb7d java: Make CertificateValidator inheritable for tests 2025-06-25 15:19:36 -07:00
Jordan Rose
8070d6a4e6 Send Accept-Language when connecting a chat socket 2025-06-25 13:16:37 -07:00
Max Moiseev
4f0d39c334 Reset for version v0.76.1 2025-06-24 13:52:50 -07:00
Jordan Rose
9a468837b8 java: Clean up javadoc issues 2025-06-24 09:56:18 -07:00
andrew-signal
54a302d3bc Add short allowlist of CRL Distribution Point URLs for CRL fetching on Android 2025-06-23 17:48:48 -05:00
Jordan Rose
47eae0d153 Don't strip libraries for the Android benchmarks
Otherwise, the Android Studio "profile" option is much less useful.
2025-06-23 14:10:27 -07:00
Jordan Rose
cfa7bb8d45 java: Move CompletableFuture test to the right directory 2025-06-23 14:10:16 -07:00
Jordan Rose
841f57c30f Move (RegistrationSessionState)RequestedInformation -> ChallengeOption 2025-06-23 10:37:55 -07:00
Jordan Rose
333d2be846 java: Fix CalledFromNative target annotations
"TYPE" is for type *uses*, not type *definitions*.
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
Jordan Rose
4e304bf167 javadoc-isms -> KDoc 2025-06-20 10:15:51 -07:00
Alex Bakon
8f671bd2d0 Make BackupLevel.value public 2025-06-18 14:22:14 -04:00
Jordan Rose
b2c2537277 java: Switch from javadoc to Dokka to include our Kotlin sources
The Maven publication will still contain a -javadoc jar for
consistency, but the -dokka jar is likely to have superior rendering
in practice, particularly for Kotlin-only APIs!
2025-06-18 10:57:50 -07:00
Andrew
c276f445f7 Reset for version v0.75.2 2025-06-18 12:27:34 -04:00
Alex Bakon
f59204538e Reset for version v0.75.1 2025-06-16 14:04:01 -04:00
Jordan Rose
2879220e93 Require Kyber keys/ciphertexts throughout all XDH APIs 2025-06-13 16:06:07 -07:00
Alex Bakon
2b01021d7e Add offset/length constructor for Java ECPublicKey and KEMPublicKey 2025-06-13 16:26:26 -04:00
Alex Bakon
02b786b07e Limit device ID to the range 1-127
This is already required for sealed sender messages and enforced by the server.
2025-06-13 14:18:16 -04:00
Jordan Rose
5001df1ee4 Kotlin: use explicitApi() mode 2025-06-13 10:27:37 -07:00
Jordan Rose
1b469bb6c7 Make acknowledgments platform-specific 2025-06-12 16:01:33 -07:00
Alex Bakon
881b3a4c8e Port some Java classes to Kotlin 2025-06-12 18:24:15 -04:00
Alex Bakon
a32aca9bce Remove Java Curve class 2025-06-12 17:24:31 -04:00
moiseev-signal
44c470f388 java: Synchronize close for incremental mac streams 2025-06-12 14:14:45 -07:00
Alex Bakon
3c89a5fa07 Colocate Kotlin sources with Java 2025-06-12 16:00:05 -04:00
moiseev-signal
beebd1cd20 keytrans: Add example usage for Java bridge 2025-06-11 16:35:42 -07:00
Jordan Rose
a280bc6555 Resolve an age-old X3DH test inconsistency
This known-answer test was originally ported over from
libsignal-protocol-java, but did not produce the same results. Why?
Because one of the private keys chosen by libsignal-protocol-java for
its test was unclamped, while libsignal-the-Rust-implementation always
clamps private keys as part of deserialization, not just generation.
Consequently, the public key didn't actually correspond to the private
key according to our modern libsignal.

Rather than try to line up exactly with what libsignal-protocol-java
was coincidentally doing, this commit clamps the private key, computes
the resulting public key, and verifies a new
consistent-between-both-sides outcome.
2025-06-10 16:20:08 -07:00
Andrew
82861a11e7 Reset for version v0.74.2 2025-06-10 16:59:56 -04:00
Jordan Rose
f40d20a72f Add CompletableFuture.await() helper for Kotlin clients
Test it by porting several tests from FutureTest.java to Kotlin and
using Kotlin idioms for awaiting and cancellation.
2025-06-05 12:34:15 -07:00
Max Moiseev
0410cb017a Reset for version v0.74.1 2025-06-04 14:39:48 -07: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
Max Moiseev
40e9e89f1e Reset for version v0.73.4 2025-06-03 16:19:26 -07:00