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

61 Commits

Author SHA1 Message Date
Siva Mahadevan
a97b1bd0ad rust/crypto: bump libc to support getauxval on musl 2021-05-02 13:29:41 -04:00
Jordan Rose
b5f6d50b53 Bump version to 0.5.1 2021-04-28 17:05:25 -07:00
Jordan Rose
113e849d76 Bump version to 0.5.0 2021-04-21 19:07:56 -07:00
Jordan Rose
7d62e674b5 Bump version to v0.4.0 across all languages 2021-04-05 13:13:09 -07:00
Jordan Rose
871209e4db Use uuid crate instead of our own Uuid type
This lets us parse UUIDs as well (needed in next commit)
2021-04-05 11:46:52 -07:00
Jordan Rose
d339d5a072 Expose Sealed Sender v2 to clients
- Add a new "multi-recipient encrypt" entry point
- Add an "encrypt v1 sealed sender from UnidentifiedSenderMessage-
  Content" entry point
- Add a public constructor for UnidentifiedSenderMessageContent
- Change group_encrypt to return a CiphertextMessage instead of bytes,
  so it can be used with the above
- Java: add SenderKeyStore to SignalProtocolStore requirements
2021-04-05 11:31:27 -07:00
Jordan Rose
29b7be5429 Add multi-recipient sealed sender support
Also known as "sealed sender v2".
2021-04-05 11:31:27 -07:00
Jordan Rose
df3e01f909 Node: update to Neon 0.8.0
And remove the FinalizableOption workaround.
2021-03-23 11:39:04 -07:00
Jack Lloyd
ad495ccab9 Move AES-GCM-SIV implementation into rust/crypto 2021-03-15 13:33:33 -04:00
Jack Lloyd
f8648c21cd Add hashes and HMAC for Java 2021-03-15 13:30:39 -04:00
Jordan Rose
56afeb885c By default, skip Rust tests that take over 10s in debug builds
We'll still run them in CI, but we don't need to run them locally.
2021-03-10 09:54:49 -08:00
Jack Lloyd
7bd9c5f987 Switch to using picky crate for forming PKCS8 and X.509 data 2021-03-08 16:46:19 -05:00
Jack Lloyd
1944d16dec Device Sender Utilities - Generate Key + Self-Signed Certificate 2021-03-08 16:46:19 -05:00
Jack Lloyd
5f5687ed74 Update libsignal-node version in Cargo.lock 2021-03-08 16:44:37 -05:00
Jack Lloyd
a005082984 Bump Cargo.lock 2021-03-03 17:28:26 -05:00
Jordan Rose
5ac206dbb0 Log panics in all three bridges 2021-03-03 09:58:01 -08:00
Jack Lloyd
9c28adb0b7 Update Cargo.lock 2021-02-25 12:24:28 -05:00
Jordan Rose
a983a564ac CocoaPods: Tag 0.3.1 after curve25519-dalek branch update
The mistakes with the curve25519-dalek update means that 0.3.0 no
longer builds correctly. Use 0.3.1 instead.

Changes from 0.1.2 (the version before 0.3.0):
- Reject SenderCertificates without UUIDs
- Fix IdentityKeyPair.init(bytes:)
- Add logging to match SignalProtocolKit
- Update Cargo dependencies to newer versions
2021-02-24 16:34:50 -08:00
Jack Lloyd
147b4738c3 Use a new branch for the 3.0.0 fork of curve25519-dalek
As reusing the old branch breaks building zkgroup
2021-02-24 15:10:45 -05:00
Jack Lloyd
b2bdf6e052 Update dependencies
This is `cargo update` along with manually upgrading jni to 0.19 and prost to 0.7

This isn't a complete cargo update as it avoids updating polyval as there is
a duplicate dependency issue there in cpuid-bool between the newest version of
polyval crate and the current latest version of the sha2 crate.

The bytes dependency in protocol that was causing duplicate dependencies was a
red herring - actually bytes was not used with the protocol crate!

Supplants #164 update prost
Fixes #221 update jni
2021-02-24 11:13:47 -05:00
Jordan Rose
67f01e851f CocoaPod: tag v0.3.0
This skips the v0.2 series to bring it in line with the Java bridge.
2021-02-23 12:16:15 -08:00
Jordan Rose
c86ce1d8d2 Bridge: break up bridge_fn implementation by FFI/JNI/Node
Also, revert back to the simpler unzip3 crate instead of unzip-n.
2021-02-22 18:37:13 -08:00
Jordan Rose
25c7b19891 Port SenderKeyStore to async bridge_fn 2021-02-19 14:55:26 -08:00
Jordan Rose
7b48b7d673 Bridge: initial support for async bridge_fns
For FFI and JNI, these use expect_ready to force the function to
completion, since all FFI and JNI callbacks are (currently)
synchronous. For Node, this uses the newly-landed signal-neon-futures
support crate to return a JavaScript Promise. A new AsyncArgTypeInfo
trait is added for Node types as well.
2021-02-19 14:50:34 -08:00
Jack Lloyd
001936a723 Use [patch] so that x25519-dalek picks up our fork 2021-02-19 16:06:35 -05:00
Jack Lloyd
6436b9513a Update both poksho and protocol to use lizard2 3.0.0 2021-02-19 15:37:35 -05:00
Jack Lloyd
41ae2adbf8 Update hash traits 2021-02-19 13:36:16 -05:00
Jack Lloyd
3072591341 Update Cargo.lock 2021-02-19 11:58:23 -05:00
Jack Lloyd
4e75eda3dd Add support for SenderKeyStore in TypeScript API 2021-02-12 15:41:38 -05:00
Jack Lloyd
598fc9af15 Log the SignalClient version when the logger is initialized 2021-02-10 11:08:07 -05:00
Jordan Rose
7d56ff6a5a
Merge pull request #65 from signalapp/jrose/signal-neon-futures
Node: Implement a library that allows Rust `async` blocks to be used to wait on JavaScript futures
2021-02-08 11:39:36 -08:00
Jordan Rose
ddee172811
Merge pull request #180 from signalapp/jrose/libsignal-protocol-logging
Add logging that matches SignalProtocolKit (the ObjC library)
2021-02-08 11:04:16 -08:00
Jordan Rose
d72113ee8c Add logging that matches SignalProtocolKit (the ObjC library) 2021-02-08 10:46:23 -08:00
Jordan Rose
da1d0937c5 Fix our duplicate crate checking, then resolve duplicate crates
Updated the following crates to resolve duplication of cfg-if,
which is a macro-only crate anyway.

- backtrace
- getrandom
- log (relaxed the version on it as well)
- polyval (still not at latest because it uses a newer cpuid-bool than
  sha2 does)
- sha2
2021-02-04 17:31:47 -08:00
Jordan Rose
6633761939 Drop the "-rust" from the "libsignal-protocol" crate
The project corresponds to libsignal-protocol-java and the others, but
/within/ the language we don't need to tag with the language name.
2021-02-04 10:26:36 -08:00
Jordan Rose
2d059643e1 Node: allow Rust async blocks to wait on JavaScript futures
Neon provides a way to expose *synchronous* JavaScript functions from
Rust. This means that if Rust wants to wait for the result of a
JavaScript promise, it can at best return a callback to continue its
work when the promise resolves. This does not naturally compose with
Rust's `async`, which works in terms of Futures.

This commit adds a new crate, signal-neon-futures, that provides
functionality for (1) wrapping JavaScript futures so they can be
awaited on in Rust, and (2) producing a JavaScript promise that wraps
a Rust future. It does so by synchronously resuming execution of the
Rust future whenever an awaited JavaScript promise is resolved.
2021-02-04 10:22:58 -08:00
Jordan Rose
9add3ec440 Move remaining FFI accessors into bridge/shared 2021-02-03 16:57:26 -08:00
Jordan Rose
4a476eb52a Node: Add an entry point for logging 2021-01-26 10:53:53 -08:00
Jordan Rose
448923ff43 Use the linkme crate to avoid registering Node functions manually
This only works on functions using the macros in libsignal-bridge; for
anything else we'll keep using neon::ModuleContext::export_function
manually, at least for now.
2021-01-21 18:06:41 -08:00
Jordan Rose
d3c2b3c9d4 Begin adding Node support to libsignal-bridge with bridge_deserialize 2021-01-21 18:06:40 -08:00
Jordan Rose
f7234958b5
Merge pull request #150 from signalapp/jrose/jni-logging
Java: Hook up the 'log' crate to SignalProtocolLogger
2021-01-21 14:09:16 -08:00
Jordan Rose
c3b14f0a44 Java: Hook up the 'log' crate to SignalProtocolLogger 2021-01-21 13:57:28 -08:00
Jack Lloyd
6688428ae5 Bump Neon to 0.7.0 and use feature napi-1
Neon by default requires N-API 6 and the version of Electron that is
used in Desktop only supports N-API 5. Without this feature, some
weird hacks are required to build on Windows.
2021-01-21 13:09:07 -05:00
Jordan Rose
a0b45740af Bridge: Migrate simple PrivateKey operations to shared 2021-01-15 14:46:44 -08:00
Jordan Rose
ad3c270cae Speed up libsignal-bridge-macros by not parsing the function bodies
syn-mid is a syn-author-endorsed crate that allows parsing a function
signature while treating the body as opaque. This is faster as an action
/and/ faster to build because we don't need all of syn.
2021-01-14 13:34:59 -08:00
Jordan Rose
3c94525ec7 Use Java names for bridge_fns
The Java names can usually be mapped to the C names but not vice
versa, since the C names use snake case for both the type and the
operation.
2021-01-14 13:34:58 -08:00
Jordan Rose
1c897b232d Use a proc_macro to generate arbitrary FFI/JNI bridging 2021-01-14 13:33:34 -08:00
Jordan Rose
fe89cb76de Move expect_ready into libsignal-bridge 2021-01-14 13:31:47 -08:00
Jordan Rose
8fa2f4a73f JNI: Rethrow callback exceptions instead of wrapping them 2021-01-12 11:54:19 -08:00
Jordan Rose
baba4519de Swift: Generate signal_ffi.h offline, like Native.java
- Verify its correctness with build_ffi.sh --verify-ffi
- Regenerate with build_ffi.sh --generate-ffi

This simplifies the header search logic for both SwiftPM and
CocoaPods, as well as saving on build time by avoiding cbindgen.

The tweak to cbindgen.toml to prefer typedef-based structs and enums
is sidestepping an incompatibility between cbindgen 0.15.0 (which
GitHub has installed) and 0.16.0 (which allows reusing a release build
directory as well as a debug one).
2021-01-04 13:41:07 -08:00