Commit Graph

307 Commits

Author SHA1 Message Date
Max Moiseev
0e2f87f39a Bump to version v0.24.0 2023-05-09 17:19:28 -07:00
Rolfe Schmidt
ff09619432 Add Kyber KEM and implement PQXDH protocol
Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Max Moiseev <moiseev@signal.org>
2023-05-09 16:44:40 -07:00
moiseev-signal
2b46ae1e85 Implement incremental MAC 2023-05-09 12:29:25 -07:00
Jordan Rose
0e74a41eb9 bridge: Put signal-media behind a feature flag, off for iOS by default
The JNI tests have also been conditionalized in case we want to take
this out for Android as well. (Node still unconditionally depends on
it being present.) I've given it a separate feature flag from just
ffi/jni/node so that we can preserve the tests Jessa wrote for each
platform.
2023-05-09 11:02:31 -07:00
Jordan Rose
a27fc0c557 java: Allow Unicode characters in javadocs 2023-05-01 12:01:08 -07:00
Jessa
9eb3483938 Add MP4 format sanitizer
This MP4 format "sanitizer" currently only transforms (when necessary) outgoing media on iOS, Android, or Desktop to
make it suitable for streaming playback by the recepient. In the future, it will validate and be able to either repair
or reject outbound AND inbound media, to prevent malformed media from being fed to third party or OS media players.

An generic io module was added to the libsignal rust bridge containing the InputStream trait, modeled loosely after
Java's InputStream, which calls back into the client language to perform reads or skips. This infrastructure could
potentially also be for any other future large data inputs to libsignal functions.
2023-05-01 12:01:08 -07:00
Jordan Rose
d3e38b9e5c Bump version to v0.23.0 2023-05-01 12:01:08 -07:00
Jordan Rose
c433d1e34c Expose ProfileKey.deriveAccessKey()
Client apps will be able to switch over to this at their leisure.
2023-04-25 18:42:51 -07:00
Jordan Rose
e588fa5450 zkgroup: Add CallLinkAuthCredential
This is very similar to the AuthCredential used by the group server,
but using CallLinkParams to encrypt the user ID rather than
GroupParams (and using GenericServerParams to issue the credential
rather than the group server's ServerParams).
2023-04-25 17:18:05 -07:00
Jordan Rose
1b5449e777 zkgroup: Add a "Create Call Link" credential
This will allow a user to request to create a call link from the chat
server without revealing anything about the room, and then later
actually create it by giving the room ID to the calling server without
identifying themself.

This involves a new, stripped-down GenericServer{Secret,Public}Params,
which currently only contains a generic "zkcredential" key. Apart from
the calling server not needing to handle all the credentials that the
group storage server supports, the structure of zkcredential means it
is safe to use the same key for multiple kinds of credentials. 
Similarly, CallLink{Secret,Public}Params plays the same role as
Group{Secret,Public}Params for encrypting user IDs when talking to the
calling server.

Following from that, the APIs for CreateCallLinkCredentials are
located on the individual types (RequestContext, Request, Response,
Credential, Presentation) rather than all being on the Server*Params
types; adding a new credential type won't change the API of the
Server*Params types at all.

The main Server*Params may make use of zkcredential in the future as
well, but for now it's only for new Signal servers that want to use
zero-knowledge credentials.
2023-04-25 16:53:42 -07:00
Jonathan Klabunde Tomer
1712d708e7 declare checked exceptions thrown by EC*Key methods 2023-04-24 13:43:49 -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
bf984c7b54 Remove deprecated PniCredential 2023-04-18 17:47:49 -07:00
Jordan Rose
64f0b5e782 java: Allow building only for desktop+server with -PskipAndroid 2023-04-18 14:25:38 -07:00
Ravi Khadiwala
1f8c279622 pin: Add pin hashing and an svr2 client
- Add a new SGX client that can be used for testing svr2
- Add pin hashing that can be used with svr1 and svr2
2023-03-29 13:59:28 -05:00
Max Moiseev
0bd497d5e8 Make tests more deterministic 2023-02-13 11:06:49 -08:00
Max Moiseev
58ebf5f06d Bump NDK version to match the Github runner update 2023-02-13 10:03:45 -08:00
Max Moiseev
39293fa906 Bump to version v0.22.2 2023-02-10 12:07:18 -08:00
Max Moiseev
90c02f3b69 Bump to version v0.22.1 2023-02-09 11:45:09 -08:00
Max Moiseev
f1b6c63e34 Make Java API for username hashing more idiomatic 2023-02-09 11:18:24 -08:00
Max Moiseev
c98ed9cb6d Bump to version v0.22.0 2023-02-03 17:57:44 -08:00
Max Moiseev
33d8421ca9 Bridge username hashing APIs to all client platforms 2023-02-03 17:44:29 -08:00
Jordan Rose
5b3d8bb731 Remove Android 19 support 2023-01-26 12:59:06 -08:00
Jordan Rose
3c5f00fffe java: Fix host build / server testing on Windows
- We weren't loading the native library as "signal_jni.dll"
- The Gradle build commands, though still requiring a shell environment,
  shouldn't rely on Unix-style #! lines to execute shell scripts
2022-12-05 11:42:06 -08:00
Jordan Rose
bce62c7bfd Android: Build on platforms other than Linux
Right now the Android SDK never contains more than one prebuilt
toolchain, so we can glob to find the one that's installed.
2022-12-05 10:02:54 -08:00
Jordan Rose
b8ac70227d Android: no need to set ANDROID_NDK_HOME when using Gradle
The Android Gradle plugin already allows you to specify which NDK to
use; we should let the plugin find it for us.
2022-12-05 10:02:54 -08:00
Jordan Rose
98fd87ee9b Android: Add very basic Curve25519 benchmarks 2022-12-02 17:14:06 -08:00
Jordan Rose
572ba1e38b Update Rust to nightly-2022-11-03, and the Android NDK to r25b
These are intertwined: older versions of Rust don't support the newer
NDK, but the newer Rust can't successfully compile BoringSSL against
the older NDK.

This requires a boring-sys update to find the Android NDK sysroot in
the right place.
2022-12-01 12:23:57 -08:00
Jordan Rose
dd0315ad26 Bump to version v0.21.1 2022-10-20 13:04:57 -07:00
Sebastian
ad1fabbbf2 Change getSender method of SenderCertificate to always return UUID
Currently the only user of this method is the ProtcolException constructor,
when a UnidentifiedSenderMessageContent is present.
All other instances of ProtocolException use the sender's UUID as sender.
So it would be good to have this consistent.

Also brings this in line with similar methods, like `getSourceIdentifier` on
SignalServiceEnvelope.
2022-10-17 12:13:53 -07:00
Jordan Rose
d94f1b3d70 Bump version to v0.21.0 2022-10-14 13:53:57 -07:00
Jordan Rose
26e7fa5559 zkgroup: Remove v1 presentations
Removes AuthCredentialPresentationV1 and PniCredentialPresentationV1
entirely. For ProfileKeyCredentialPresentationV1, there are still
situations where we want to extract the UUID and profile key, so we
continue to support parsing only.
2022-10-13 15:46:36 -07:00
Jordan Rose
d270e06127 Docker: Use -it and --init to handle SIGTERM (^C) properly
-i (interactive) and -t (allocate a tty) allow the shell running
inside Docker to handle Ctrl-C (^C) and other shell commands, so you
can stop a command in the interactive process you ran it. However,
they only work if the containing shell (the one where you ran `docker
run`) is also interactive with a tty hooked up, so we test for that
first in both scripts that invoke `docker run`, using `test -t`.

--init passes signals from *outside* Docker down to its subprocesses,
so that cancellation from *another* context works for our Docker
images. This includes the Cancel button in GitHub Actions.
2022-08-23 13:31:30 -07:00
Jordan Rose
ab29fed4db Bump version to v0.20.0 2022-08-22 15:21:40 -07:00
Jordan Rose
f2f6188593 Android: fix connectedAndroidTests
- Include the same resources that the 'client' project uses
- Desugar newer JDK APIs so we can test on the oldest devices (KitKat)
2022-08-22 12:16:47 -07:00
Jordan Rose
e8d73665b4 zkgroup: Move AuthCredential redemption time checking down to Rust
This was previously in the Java layer because it only really affects
the server, but it's more consistent to have all verification in the
Rust layer. We do lose the separate exception type for it, though.
2022-08-09 13:47:17 -07:00
Jordan Rose
13b60197a9 Bump version to v0.19.3 2022-08-04 11:04:31 -07:00
Ravi Khadiwala
93cdd47a30 cds2: add jni binding for attestation metrics
Adds a java method for libsignal-server that enables extracting
attestation metrics from serialized evidence and endorsements.
Certificate and endorsement validity periods are exposed, so servers
can track if any attestation material is overly stale.
2022-08-04 10:26:47 -07:00
Jordan Rose
3c365ab1da Bump to version v0.19.2 2022-08-01 16:04:37 -07:00
Jordan Rose
2f07edaa02 Bump to version v0.19.1 2022-07-25 17:13:19 -07:00
Jordan Rose
f456227f17 Java: drop cargo-ndk for building for Android
We can provide the necessary information in environment variables and
save a host dependency.
2022-07-25 17:11:36 -07:00
Jordan Rose
cd40df36e7 Update Dockerfile for the reproducible Java/Android build
- Use the headless variant of the JDK.
- Put most apt-get requirements at the end of the file, so that
  tweaking them can make use of Docker's per-RUN line caching.
- Added 'clang' as a build dependency for BoringSSL.
- Drop unnecessary packages:
  - apt-transport-https - we're using plain http sources at this time
  - build-essential - overkill, we just need 'make'
  - gcc-multilib - was used to build OpenSSL for testing,
    no longer necessary with the switch to BoringSSL
  - openssh-client - was used to clone from GitHub, now unused because
    all dependencies are public

And note that the "slow tests" should also be passing before a
release.
2022-07-25 16:36:36 -07:00
Jordan Rose
c02cb26018 Bump version to 0.19.0 2022-07-22 15:36:22 -07:00
Chris Eager
8035a70509 [feature] CDS2 attestation
Implements (a subset of) Intel's DCAP attestation,
making heavy use of 'boring' for X509 and ECDSA.
Cds2Client is now ready for use!

Co-authored-by: Jordan Rose <jrose@signal.org>
Co-authored-by: Ravi Khadiwala <ravi@signal.org>
2022-07-22 12:23:57 -07:00
Jordan Rose
e54685b281 Bump to version v0.18.1 2022-06-29 12:01:17 -07:00
Jordan Rose
e6f149c93d zkgroup: Deprecate PniCredential operations
...but not the types at this time, because that produces extra
warnings that need silencing.
2022-06-28 17:21:41 -07:00
Jordan Rose
8135419d30 Java: Lint for deprecation, fallthroughs, and unchecked generics
And disable the deprecation lint for overriding 'finalize', which we
use for bridged object management.
2022-06-28 17:21:41 -07:00
Jordan Rose
366b030841 Re-apply "device transfer: replace picky with boring"
This reverts commit 09c043c54a.
2022-06-22 16:33:21 -07:00
Jordan Rose
2a46a5b294 Update code size for the *real* v0.18.0 2022-06-22 15:58:44 -07:00
Jordan Rose
09c043c54a Revert "device transfer: replace picky with boring"
We need to work out more kinks cross-compiling boring-sys, so revert
this for now. (But keep the fix to use the correct Android NDK.)
2022-06-22 15:56:21 -07:00