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

124 Commits

Author SHA1 Message Date
Jordan Rose
6f2c751d65 Update cpufeatures to 0.2.2, for 64-bit Android hardware crypto
Code using cpufeatures to check for hardware support for cryptographic
operations will now be able to do so on 64-bit Android as well.
2022-03-21 11:32:56 -07:00
Jordan Rose
6787408e5d Bump to version v0.14.0 2022-03-11 11:00:16 -08:00
Jordan Rose
0d8a530f60 Node: update to Neon 0.10 2022-03-08 16:16:23 -08:00
Jordan Rose
613338d54a Bump version to v0.13.0 2022-02-18 15:45:31 -08:00
Jordan Rose
4bd3778e69 Bump to version v0.12.4 2022-02-10 10:47:45 -08:00
Jordan Rose
e2f4c4542e Bump to version v0.12.3 2022-02-09 11:34:44 -08:00
Jordan Rose
71dac29e42 Bump to version v0.12.2 2022-01-31 18:02:49 -08:00
Jordan Rose
3bf583c5ae Update curve25519-dalek for faster deserialization 2022-01-31 17:41:22 -08:00
Jordan Rose
3c5c312e45 Bump to version v0.12.1 2022-01-27 14:37:36 -08:00
Jordan Rose
3da7078ffe Bump to version v0.12.0 2021-12-20 11:21:02 -08:00
Jordan Rose
5104d199d0 Bump to version v0.11.1 2021-12-03 13:37:25 -08:00
Ruben De Smet
b6d4aadf30
Update to prost 0.9 2021-11-28 17:32:32 +01:00
Jordan Rose
e4c31a62f6 Bump to version v0.11.0 2021-11-17 11:09:39 -08:00
Jordan Rose
7681db8a30 Bump to version v0.10.1 2021-11-09 09:58:20 -08:00
Jordan Rose
d2bef606d1 Bump to version v0.10.0 2021-11-08 11:45:34 -08:00
Jordan Rose
852069bdc9 bridge: Add zkgroup APIs
These APIs are designed to match the generated "simpleapi" entry
points in the original zkgroup repository, to make it easier to adapt
the existing Java, Swift, and TypeScript code to libsignal-client.

The cbindgen-generated signal_ffi.h now includes constants, so that
the fixed-size arrays used to serialize zkgroup types can use named
constants in Rust. This meant filtering out some constants that were
getting picked up but that should not be included.

Note that this commit makes references to Java exception types that
will be added in a later commit.
2021-11-08 11:04:41 -08:00
Jordan Rose
4dc3ca5e6e bridge: Add support for bincode-serialized args and results
This will be used by zkgroup. Note that in order to print the type
correctly in C, a type `Serialized<FooBar>` will be translated to
`[u8; FOO_BAR_LEN]`, where 'FOO_BAR_LEN' has to be a constant that's
in scope.
2021-11-08 11:04:41 -08:00
Jordan Rose
477838a63c zkgroup: Tidy up error handling
- Use displaydoc to stringify the errors, using the comments that were
  already there. These go into the string descriptions for errors
  exposed to the apps, which can be useful.

- Split PointDecodeError into its own type so that it's not exposed
  generally.
2021-10-28 12:48:08 -07:00
Jordan Rose
ebf804527c
Merge pull request #392 from signalapp/jrose/zkgroup
Import the non-FFI Rust sources of zkgroup
2021-10-28 12:47:18 -07:00
Jordan Rose
a9012af8e2 Bump to version v0.9.8 2021-10-27 10:36:57 -07:00
Jim Gustafson
4b9348475c Implement swift interfaces for HsmEnclave 2021-10-26 18:34:27 -07:00
Jordan Rose
729ad3e14c Add zkgroup to the Rust workspace
- Bump the version to 0.9.0, mainly so it doesn't get confused with
  the original repo.
- Use the poksho in this repo and our custom 3.0.0-lizard2 branch of
  curve25519-dalek (instead of a 2.0.0-based one).
- Bump the sha2 dependency to match curve25519-dalek 3.0.
- Remove the reference to the crate's ffi module.

With this, the tests pass and the benchmarks run.
2021-10-26 13:16:36 -07:00
Jordan Rose
c7c1abb76b
Merge pull request #376 from cosmicexplorer/thiserror-attempt-2
use thiserror to remove error.rs boilerplate
2021-10-14 17:46:18 -07:00
Jordan Rose
64ad39c54d Remove support for HKDF "versions"
Previously, we had HKDF-for-session-version-3, which matches RFC 5869,
and HKDF-for-session-version-2, which produced slightly different
results. However, nothing in the current versions of Signal uses
anything but the RFC-compliant version. Therefore, this commit removes
support for version 2 and deprecates the entry points that take a
version:

- Java: The HKDFv3 class is deprecated in favor of static methods on
  the HKDF class.
- Swift: The hkdf function that takes a 'version' parameter is
  deprecated in favor of a new overload that does not.
- TypeScript: The HKDF class is deprecated in favor of a top-level
  hkdf function.
- Rust: The libsignal-protocol implementation of HKDF has been removed
  entirely in favor of the hkdf crate.

There are no significant benchmark deltas from this change, and a
minimal code size increase that's the cost for removing our own
implementation of HKDF. The deprecations can be removed as a later
breaking change.
2021-10-14 16:02:56 -07:00
Jordan Rose
ab1963bd31 Update hmac from 0.9 to 0.11
Groundwork for removing our custom HKDF implementation
2021-10-14 16:02:56 -07:00
Jordan Rose
45fe852509 Bump to version v0.9.7 2021-10-14 15:59:42 -07:00
Danny McClanahan
c364e311be
use thiserror to remove error.rs boilerplate 2021-10-09 02:11:46 -04:00
Danny McClanahan
497ded2def
convert the Display impl to use displaydoc
- remove thiserror for now until we can derive UnwindSafe
2021-10-08 13:34:07 -04:00
Jordan Rose
d6fc73b27a Update dependencies
- cargo update
- But stay on our fork of curve25519-dalek (pinned at 3.0.0)
- Update x25519-dalek from 1.0 to 1.1 (instead of 1.2) to stay
  compatible with curve25519-dalek
- Update cpufeatures to 2.1 to match our dependencies
- Note that updating picky* resulted in more duplicate crates (rand*)
- Pin num-bigint-dig to a build that supports Cargo's -Zbuild-std,
  because xargo + autocfg has stopped working with the new toolchain
- Remove xargo in favor of -Zbuild-std
2021-10-06 10:58:44 -07:00
Jordan Rose
5896c80aaf Bump version to v0.9.6 2021-10-01 16:46:56 -07:00
Jordan Rose
f3a1dff371 Bump version to v0.9.5 2021-09-23 13:44:30 -07:00
Graeme Connell
995d65978b Switch from AESGCM to ChaChaPoly. 2021-09-22 15:07:57 -06:00
Graeme Connell
f9b03af232 Add info log for connecting successfully to code.
Fix lib comment.
2021-09-22 09:20:43 -06:00
Jordan Rose
3e776afa4e
Merge pull request #357 from signalapp/jrose/simplify-curve25519-dalek-dependency
Simplify curve25519-dalek dependency
2021-09-21 15:38:10 -07:00
Graeme Connell
9caa6615b9 JNI for HSM enclave client. 2021-09-21 16:37:07 -06:00
Jordan Rose
3318d306b3 Simplify curve25519-dalek dependency
Signal has a fork of curve25519-dalek to add some features that are
used by zkgroup. However, libsignal-protocol and poksho don't use
those features directly, and thus they don't depend on our fork
specifically. Anyone outside of Signal using libsignal-protocol can
thus use the standard curve25519-dalek and avoid building it twice.
Signal will continue using our fork thanks to the workspace patch in
the root Cargo.toml.

Additionally, remove all the passthrough features for customizing
curve25519-dalek; we don't use any of them, and clients can always
specify them directly.
2021-09-21 11:59:51 -07:00
Graeme Connell
9aa79c0c59 Client-side rust-only HSM enclave library. 2021-09-21 12:07:27 -06:00
Ehren Kret
5b1d4fb0a3 Bump version to 0.9.4 2021-09-13 16:52:24 -05:00
Ehren Kret
53ecd6e589 Bump version to 0.9.3 2021-09-13 15:21:13 -05:00
Ehren Kret
a3578fa6d4 Bump version to 0.9.2 2021-09-10 10:24:54 -05:00
Ehren Kret
35eccb94d1 Bump version to 0.9.1 2021-09-09 13:07:09 -05:00
Ehren Kret
3ed0ff84a3 Increase local JNI frame to 8192 for all JNI calls
This is overkill for most calls but multi-recipient messages require
potentially a lot of objects. The codegen is in the way of making a
surgical change at the moment so hitting it with a broad fix for
now. May return to add a conditional to the macro definition later.
2021-09-09 12:25:37 -05:00
Alan Evans
aaa24f6efa
Handle repeated (public_key, chain_id) pairs 2021-09-03 14:03:25 -03:00
Jordan Rose
6026b8474e Bump version to 0.9.0 2021-08-31 14:50:01 -07:00
Jordan Rose
72ba4e6959 Bump version to 0.8.4 2021-08-18 12:13:11 -07:00
Jordan Rose
ca37067f5a Update to Neon 0.9.0
- Drop our fork of Neon now that our changes have been integrated
- Adopt rename of EventQueue to Channel
- Add a napi-6 feature to signal-neon-futures to make it easier to test
  under the configuration we're actually shipping
2021-07-26 12:37:42 -07:00
Ruben De Smet
b25196c256
Upgrade prost to 0.8 2021-07-09 18:54:37 +02:00
Jordan Rose
6021535fb5 Bump version to 0.8.3 2021-07-06 12:57:12 -07:00
Jordan Rose
e7a0f4d424 Replace block_on and expect_ready with FutureExt::now_or_never
Both futures::executor::block_on and our own expect_ready were being
used to resolve futures that were, in practice, known to be
non-blocking. FutureExt::now_or_never handles that case more lightly
than block_on and more uniformly than expect_ready.

This lets us drop the dependency on the full 'futures' crate down to
just futures_util, which should help with compile time.
2021-07-06 10:30:42 -07:00
Jordan Rose
4519eb4803 FFI: Depend on cpufeatures 0.1.5 to ensure iOS gets optimized crypto 2021-07-01 13:48:05 -07:00