Commit Graph

375 Commits

Author SHA1 Message Date
Jordan Rose
d768f47020 usernames: Allow generating a new link buffer with existing entropy
This allows updating the encrypted username associated with a link
without rotating the link itself.
2023-11-02 15:02:36 -07:00
Jordan Rose
44261bb623 Use the 64-bit curve25519-dalek backend even on 32-bit Android 2023-11-01 10:11:30 -07:00
Jordan Rose
37c7b482ca Bump to version v0.33.0 2023-10-26 14:03:22 -07:00
Jordan Rose
3ac14b17a7 Fix Android tests for 9c79bc97c 2023-10-26 13:25:43 -07:00
Jessa
7af14c6b06 Add WebP sanitizer
This adds integration bits for the new webpsan, a WebP image sanitizer -- which
currently simply checks the validity of a WebP file input, so that passing a
malformed file to an unsafe parser can be avoided. The integration pretty much
just leverages the integration work that was already done for mp4san.
2023-10-26 15:16:59 -04:00
ravi-signal
9c79bc97cb zkgroup: move java BackupAuthTest to server lib
This test does base64 decoding which differs between android 21 and
non-android platforms.
2023-10-26 13:15:25 -05:00
ravi-signal
790db2383e zkgroup: add backup auth credential
Allows a client to request a credential for a backup-id without
revealing the backup-id to the issuing server. Later, the client may use
this to make requests for the backup-id without identifying themselves
to the server.
2023-10-25 17:26:58 -05:00
Jordan Rose
55a1958a15 Test various error and panic scenarios for bridge_fn and bridge_io 2023-10-12 12:23:22 -07:00
Jordan Rose
63efc8bf4d bridge_io: Add an explicit parameter for the async runtime
This will let us (a) avoid hardcoding any particular async runtime in
the libsignal-bridge macros, and (b) separate the platform-specific
stuff from the async runtime. libsignal_bridge now has an AsyncRuntime
trait whose only requirement is "run a self-contained Future".
2023-10-05 09:37:55 -07:00
Jordan Rose
e8c82fe4b7 build_jni.sh: Allow building just one Android slice at a time 2023-10-04 16:02:45 -07:00
Jordan Rose
ae47f039fa bridge: Add a bridge_io macro that expects a runtime
For now, the "runtime" is spawning a thread that then uses
now_or_never, but eventually this will be a persistent tokio runtime
of some kind.

Also for now, this is only implemented for Java. Swift and Node
support coming soon.
2023-10-02 14:08:10 -07:00
Jordan Rose
5fde77a631 Don't include the Future testing APIs when building for Android 2023-09-27 06:48:21 -07:00
Jordan Rose
a15fffd058 Java: Teach gen_java_decl about Futures for type-safety. 2023-09-27 06:48:21 -07:00
Jordan Rose
2c295f68c9 Java: Implement completing Java Futures from Rust 2023-09-27 06:48:21 -07:00
Jordan Rose
dab8a18959 Java: Add a StderrLogger for testing 2023-09-27 06:48:21 -07:00
Jordan Rose
a563c9b93d Java: Add a bare-bones Future implementation for upcoming async APIs 2023-09-27 06:48:21 -07:00
moiseev-signal
840a1906c7 Update prost to version 0.12 2023-09-20 14:00:54 -07:00
Alex Konradi
d1f9dff273 Bump to version v0.32.1 2023-09-20 14:26:31 -04:00
moiseev-signal
36363750a2 Reimplement IncrementalMacInputStream backed by directly allocated ByteBuffer 2023-09-15 11:00:50 -07:00
Max Moiseev
72f046fe19 Bump to version v0.32.0 2023-09-01 13:43:06 -07:00
moiseev-signal
9d1ab7811e java: Do not close the inner stream in IncrementalMacOutputStream 2023-09-01 13:02:17 -07:00
moiseev-signal
e26381aa3c java: Implement readBuffer missing from older Androids 2023-08-31 17:34:44 -07:00
moiseev-signal
6abe26a0c1 Improve incremental MAC API 2023-08-31 15:28:39 -07:00
Jordan Rose
3810154436 Automate the Android and Server publishing to Sonatype 2023-08-25 12:33:56 -07:00
Jordan Rose
9aad792fc6 Update all the RustCrypto crates 2023-08-25 11:28:49 -07:00
Jordan Rose
e11a825fe3 Gradle: Adopt Nexus plugin to automatically close releases on Sonatype 2023-08-24 12:21:25 -07:00
Jordan Rose
b27f5c0f2e Gradle: Set version and group info in the root project
This will be necessary to adopt the Gradle Nexus publishing plugin,
but it's also just simpler.
2023-08-24 12:21:25 -07: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
a04c4f27a6 protocol: Check expiration in hasSenderChain/hasCurrentState
And consolidate the implementations of these two separate checks; now
they both check for a valid session by looking for a sender chain
instead of just *some* current session, in addition to the new check
for an expired unacknowledged session. At the Rust level, this is now
one check named has_usable_sender_chain; at the app levels, the old
names of hasSenderChain (Java) and hasCurrentState (Swift, TypeScript)
have been preserved.

Tests to come in the next commit.
2023-08-22 17:00:35 -07:00
Jordan Rose
9ca91fe2c0 protocol: Record the timestamp when a pre-key bundle is processed 2023-08-22 17:00:35 -07:00
Jordan Rose
02e1c45fed protocol: Remove SessionRecord.fromSingleSessionState
This was only used to migrate from an old Android session format
(pre-2018)...and it's been broken for years on the Android side. Just
remove it.
2023-08-22 10:26:46 -07:00
moiseev-signal
f9471c9c68 Set up and apply code formatting for Java 2023-08-22 09:15:23 -07:00
Sebastian
81a8360606 Add Automatic-Module-Name attribute to jar manifest
This allows using the libraries from java modules.

https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_modular_auto
2023-08-15 18:08:00 -07:00
moiseev-signal
1e9492ef60 java: Piggyback on base.clean Gradle task 2023-08-14 15:22:57 -07:00
moiseev-signal
62853d7d99 Address javadoc warnings 2023-08-10 15:13:32 -07:00
Max Moiseev
32f53a7894 Bump to version v0.31.0 2023-08-09 15:26:47 -07:00
moiseev-signal
716e683324 Update dependencies following curve25519-dalek 4.0.0 release
Co-authored-by: Jordan Rose <jrose@signal.org>
2023-08-09 15:04:41 -07:00
Jordan Rose
24f6c6bc20 Bump to version v0.30.2 2023-08-03 10:50:59 -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
Jordan Rose
45fb135880 Add {Aci,Pni}.parseFromServiceId{String,Binary}
These work the same as the equivalent factory methods on ServiceId,
but throw if the resulting parsed ServiceId doesn't match the specific
type you were trying to parse.
2023-08-02 17:51:23 -07:00
moiseev-signal
2938b65ffa java: Prefer checked exceptions for ServiceId parsing methods 2023-07-27 15:40:44 -07:00
Jordan Rose
761c8080ee java: Reorganize tests 2023-07-27 15:40:44 -07:00
Jordan Rose
008fad966e protocol: Rip "Context" out of the Rust layer
Only the iOS client ever used this extra parameter, and it's one
that's easily stored alongside the reference to a store. This is
massively simpler than having it threaded down to the Rust
libsignal_protocol and back up through the bridging layer.
2023-07-27 15:40:44 -07:00
Jordan Rose
dea887e94c Bump to version v0.30.1 2023-07-27 15:40:01 -07:00
Jordan Rose
3b7f3173cc Bump to version v0.30.0 2023-07-20 14:02:10 -07:00
Jordan Rose
231aa16510 Give AuthCredentialWithPni "PniAsServiceId" and "PniAsAci" variants
The former is what we want going forward; the latter is equivalent to
the old format for compatibility with previous client builds.
2023-07-20 12:28:19 -07:00
Jordan Rose
6a547bf3f2 zkgroup: Use ServiceId and Aci in public APIs instead of UidBytes
Some of these APIs have to match up with UuidCiphertexts, and so we
convert them all for consistency.
2023-07-20 12:26:46 -07:00
Jordan Rose
af34c38c03 zkgroup: Convert UuidCiphertext operations to use ServiceId
Eventually all of zkgroup will use ServiceId, but this part will
actually behave differently.
2023-07-20 12:23:10 -07:00
Sergey Skrobotov
28fea98c1b Bump to version v0.29.0 2023-07-19 18:24:46 -07:00
Jordan Rose
bc19fb33df java: Use our own mirror to reproducibly build for Android and Server
Co-authored-by: Greyson Parrelli <greyson@signal.org>
2023-07-19 15:51:07 -07:00