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

102 Commits

Author SHA1 Message Date
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
Jordan Rose
4394d742ef crypto: Remove unused dependencies 2021-07-01 13:48:05 -07:00
Jordan Rose
6a73e5051b crypto: Use RustCrypto's GHash as well 2021-07-01 13:48:05 -07:00
Jordan Rose
92a40ce1c3 crypto: Use RustCrypto's AES and AES-CTR implementations
The signal-crypto struct Aes256Ctr32 is still useful because we use a
different nonce size than RustCrypto's "full block", and we provide a
convenience constructor to specify an initial counter value.
2021-07-01 13:48:04 -07:00
Jordan Rose
d72047a245 Bridge: expose RustCrypto's AES-GCM-SIV instead of our own
Same as before, but for the wrapper exposed to the app languages.
2021-07-01 13:46:20 -07:00
Jordan Rose
59974cf627 Update aes and block_modes crates to match aes-gcm-siv's dependencies
Also turn on the AES crate's use of ARMv8 intrinsics
2021-07-01 13:46:20 -07:00
Jordan Rose
1a05d5cb0d protocol: Use RustCrypto's AES-GCM-SIV instead of our own
Now that RustCrypto aes-gcm-siv supports runtime-detected ARMv8 and
x86_64 crypto intrinsics, we don't need our own implementation, which
will be removed from signal-crypto in a later commit.
2021-07-01 13:46:20 -07:00
Jordan Rose
348df2a268 Bump version to v0.8.2 2021-06-28 12:52:57 -07:00
Jordan Rose
b715e02aa9 Bump to version 0.8.1 2021-06-02 11:14:12 -07:00
Jordan Rose
83b0218cb1 Update to (our fork of) Neon 0.8.3
Fixes a memory leak.
2021-06-02 10:52:05 -07:00
Jordan Rose
a095f6a1fc Bump version to 0.8.0 2021-05-27 14:32:06 -07:00
Jordan Rose
0f2ae6ee53 Bump version to 0.7.0 2021-05-26 16:32:06 -07:00
Jordan Rose
a41233936f Bump version to 0.6.0 2021-05-21 15:04:27 -07:00
Jordan Rose
9748c25f40 Node: Switch to our fork of Neon with faster EventQueue operations 2021-05-19 17:49:04 -07:00
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