0
0
mirror of https://github.com/signalapp/libsignal.git synced 2024-09-20 03:52:17 +02:00
Commit Graph

224 Commits

Author SHA1 Message Date
Jordan Rose
24f6c6bc20 Bump to version v0.30.2 2023-08-03 10:50:59 -07:00
Jordan Rose
602a21c17d Node: Tweak TypeScript tricks for producing subclass-typed values
The compiler will actually check these, which unfortunately does lead
to a case where the compiler *cannot* check them and we have to use
'as'.
2023-08-02 17:51:23 -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
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
6b86969113 node: Explicitly specify minimum macOS version to build for 2023-07-27 15:38:56 -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
Sergey Skrobotov
1d1a335df1 node: username links API refactoring 2023-07-19 16:42:29 -07:00
Jordan Rose
8a2bdc758d node: Use Debian Bullseye (base of Ubuntu 20.04) for Docker prebuilds
Signal Desktop only supports Ubuntu 20.04 and newer, so we no longer
need to build against Ubuntu 16.04 to ensure compatibility. And
bullseye-slim is a smaller base image than the Ubuntu images, so if we
don't specifically need an Ubuntu package this should be an easy
improvement.
2023-07-19 14:18:15 -07:00
Jordan Rose
88a2d5c740 Add convenience APIs to ProtocolAddress for using ServiceIds
In a future release ProtocolAddresses will *only* support ServiceIds,
so these APIs are designed to be the nullable version of the signature
they'll eventually have. Since ProtocolAddresses are created by the
client app in nearly all cases, they should be able to ignore the null
case if they only use ServiceIds in their input.
2023-07-19 14:12:05 -07:00
Jordan Rose
86b2fcc427 Bump to version v0.28.1 2023-07-14 13:45:10 -07:00
Sergey Skrobotov
68f851e1ca Bump to version v0.28.0 2023-07-13 17:26:49 -07:00
Sergey Skrobotov
43a3a31179 making UsernameLink fields accessible in javascript 2023-07-13 16:54:01 -07:00
Jordan Rose
89f34af1c6 node: Force nominal typing, not structural, for Aci and Pni 2023-07-13 16:47:43 -07:00
Jordan Rose
6800244a53
protocol: Add the ServiceId, Aci, and Pni types
Co-authored-by: Max Moiseev <moiseev@signal.org>
2023-07-13 13:54:53 -07:00
Sergey Skrobotov
ca262db5ec bridge for username links 2023-07-06 15:51:52 -07:00
Jordan Rose
af7bb8567c Bump to version v0.27.0 2023-06-09 11:49:48 -07:00
moiseev-signal
19d9e9f0f4
node: Add PQXDH support 2023-06-02 10:42:39 -07:00
Jordan Rose
8abeeeb4ef Bump to version v0.26.0 2023-05-31 13:58:46 -07:00
Ravi Khadiwala
a196fb8ecd Bump to version v0.25.0 2023-05-17 13:31:29 -05:00
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
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
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
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
Jordan Rose
3f3f404be6 Node: add some more ESLint TypeScript checks 2023-03-06 15:30:08 -08:00
Jordan Rose
f3e0f61667 bridge: Remove bridge_fn_buffer
At this point, the only special behavior of bridge_fn_buffer is to
support multiple return values for the C bridge (a pointer/length
pair), and that doesn't pull its weight. Remove it in favor of a plain
bridge_fn.

This did reveal that Username_Hash was using bridge_fn_buffer and now
produces a fixed-size array, imported into Swift as a tuple, so this
commit also factors out a new helper invokeFnReturningFixedLengthArray.
2023-02-21 16:41:03 -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
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
019e60498d Node: Update TypeScript, eslint, and prettier to match Desktop 2023-02-01 16:11:08 -08:00
Jordan Rose
f9dededc4c Node: On Windows in GitHub CI, *always* use $TMP as the build dir
Follow-up to ec4faf26 where we tried to guess if the build directory
path was short enough for non-long-path-aware build tools. Give up on
that and just always use $RUNNER_TEMP if that's shorter.
2022-12-01 10:31:56 -08:00
Jordan Rose
dd0315ad26 Bump to version v0.21.1 2022-10-20 13:04:57 -07:00
Jordan Rose
d94f1b3d70 Bump version to v0.21.0 2022-10-14 13:53:57 -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
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