Jordan Rose
8fc9361647
Merge pull request #335 from whisperfish/prost08
...
Upgrade prost to 0.8
2021-07-09 10:35:52 -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
3f19e0cd58
Merge pull request #332 from signalapp/jrose/now_or_never
...
Replace block_on and expect_ready with FutureExt::now_or_never
2021-07-06 11:01:28 -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
d923dd38c9
Merge pull request #333 from signalapp/jrose/aes-ctr-32-bit
...
crypto: Fix a 32-bit overflow in AES-256-CTR
2021-07-02 19:04:16 -07:00
Jordan Rose
499320a4a2
crypto: Fix a 32-bit overflow in AES-256-CTR
...
Very large initial counter values would overflow the computation of
the initial offset. Use u64 even on 32-bit platforms to avoid this.
2021-07-02 18:23:49 -07:00
Jordan Rose
b00c2e3847
Merge pull request #328 from signalapp/jrose/use-more-RustCrypto
...
Use more RustCrypto
2021-07-02 14:39:10 -07:00
Jordan Rose
405d9d7b09
Merge pull request #331 from signalapp/jrose/android-aes-gcm-fixes
...
Fix AES-256-GCM on 32-bit platforms
2021-07-02 14:35:54 -07:00
Jordan Rose
1e55bae7db
Java: Remove unused JCE-like interface for AES-256-GCM
...
Not only is it not sufficient for the streaming decryption used by
Android, but we forgot to mark it 'public'.
2021-07-02 10:29:20 -07:00
Jordan Rose
0e78c785ef
Java: expose the tag size for Aes256GcmDecryption
...
If the tag is stored appended to the data (not unusual) it's the
caller's responsibility to split it off, and they need to know how
much to split.
2021-07-02 10:29:20 -07:00
Jordan Rose
33128d5f45
GitHub: Run Rust tests for a 32-bit platform as well
...
While Desktop and iOS only support 64-bit platforms, both 32-bit and
64-bit Android are supported.
2021-07-02 10:29:20 -07:00
Jordan Rose
d51920eba2
crypto: Explicitly convert to u64 for the "lengths" in AES-GCM
...
The algorithm requires eight bytes here, but we were mistakenly only
including four on 32-bit platforms.
2021-07-01 17:54:41 -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
7905bd7a5a
FFI: remove clone capability from AES bridge objects
...
This was never exposed in Swift, so there's no effective change.
2021-07-01 13:46:20 -07:00
Jordan Rose
05da19f8b0
crypto: Remove AES-GCM-SIV implementation
2021-07-01 13:46:20 -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
9e168226f6
Docker: Fix typo in 3a3476b83
: paths are relative to the repo root
...
This COPY command never should have worked, but the macOS Docker seems
to normalize ../foo to ./foo, so it passed my local testing.
2021-06-28 14:30:38 -07:00
Jordan Rose
348df2a268
Bump version to v0.8.2
2021-06-28 12:52:57 -07:00
Jordan Rose
ccb3dea7ea
Merge pull request #329 from signalapp/jrose/docker-rust-toolchain
...
Docker: use the rust-toolchain file instead of hardcoding a version
2021-06-22 14:14:41 -07:00
Jordan Rose
3a3476b833
Docker: use the rust-toolchain file instead of hardcoding a version
2021-06-22 13:19:46 -07:00
Jordan Rose
ffd2fe1664
Merge pull request #323 from Imperiopolis-Signal/nt/m1-and-catalyst-support
...
Add support for M1 and Catalyst architectures via cocoapods
2021-06-10 17:27:12 -07:00
Nora Trapp
720d796f76
Add support for M1 and Catalyst architectures via cocoapods
2021-06-10 11:34:10 -07:00
Nora Trapp
81ffe0af51
Update toolchain to nightly-2021-06-08
2021-06-09 14:04:22 -07:00
Jordan Rose
df4ba53aed
Merge pull request #324 from cryptomilk/asn-fix-python3
...
node: Build node modules with python3
2021-06-09 09:30:30 -07:00
Andreas Schneider
a8a24f66c6
node: Build node modules with python3
...
This fixes the build on openSUSE Tumbleweed.
2021-06-09 09:19:17 +02:00
Jordan Rose
c042f16fbb
Merge pull request #320 from pierwill/fix-intra-doc-link
...
Fix intra doc link
2021-06-02 12:19:52 -07:00
Jordan Rose
b715e02aa9
Bump to version 0.8.1
2021-06-02 11:14:12 -07:00
Jordan Rose
2d8d13cf77
Merge pull request #322 from signalapp/jrose/update-neon
...
Update to (our fork of) Neon 0.8.3
2021-06-02 11:13:40 -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
6259292b20
Merge pull request #321 from signalapp/jrose/java-sealed-sender-group-id-on-success
...
Java: include the sealed sender groupId on sucessful decryption
2021-06-02 10:45:56 -07:00
Jordan Rose
08e72307ca
Java: include the sealed sender groupId on sucessful decryption
...
This is useful for PlaintextContent messages (just
DecryptionErrorMessage for now), which can't include a group ID when
sent outside of sealed sender because it would reveal group
membership.
2021-05-28 10:06:31 -07:00
pierwill
c529ce719a
Fix intra doc link
2021-05-27 21:04:20 -05:00
Jordan Rose
a095f6a1fc
Bump version to 0.8.0
2021-05-27 14:32:06 -07:00
Jordan Rose
1867f75b07
Merge pull request #318 from signalapp/jrose/DecryptionErrorMessage-deviceId
...
Add a deviceId field to DecryptionErrorMessage
2021-05-27 14:08:06 -07:00
Jordan Rose
e5cd6fcc48
Merge pull request #319 from signalapp/jrose/java-save-usmc-in-protocol-exception
...
Java: put the UnidentifiedSenderMessageContent in a ProtocolException
2021-05-27 14:07:27 -07:00
Jordan Rose
b54a830013
Java: put the UnidentifiedSenderMessageContent in a ProtocolException
...
That is, when there's an error decrypting the inner payload of a
sealed sender message, instead of just saving the sender (and more
recently the content hint and group ID), save the whole decrypted
contents of the sealed sender message. This is necessary so that the
app can make a DecryptedErrorMessage from that failed payload.
This is complicated somewhat by the fact that the app also uses the
"short" constructor for the various Protocol*Exceptions, so we have to
keep those working.
2021-05-27 12:27:48 -07:00
Jordan Rose
b780409c1b
Add a deviceId field to DecryptionErrorMessage
...
This allows a device to know whether it's the one that sent a bad
message, and take action accordingly.
We could have a slightly more typesafe API here by using
ProtocolAddress and extracting the device ID, but that doesn't match
up with getting the device ID out of a sealed sender certificate.
2021-05-26 17:23:42 -07:00
Jordan Rose
4c0141c31f
Fix merge conflict in Java and Swift tests too.
2021-05-26 16:43:11 -07:00
Jordan Rose
b17b83614c
Node: fix merge conflict in tests.
2021-05-26 16:41:48 -07:00
Jordan Rose
0f2ae6ee53
Bump version to 0.7.0
2021-05-26 16:32:06 -07:00
Jordan Rose
2491447ee7
Merge pull request #316 from signalapp/jrose/DecryptionErrorMessage-and-PlaintextContent-2
...
Add DecryptionErrorMessage and PlaintextContent (alternate)
2021-05-26 16:27:49 -07:00
Jordan Rose
0bf80c7fc3
Merge pull request #317 from signalapp/jrose/ContentHint
...
Finalize ContentHint design
2021-05-26 16:20:11 -07:00
Jordan Rose
51dd86a1db
Finalize ContentHint design
...
- Default: sender will not resend; an error should be shown
immediately
- Resendable: sender will try to resend; delay any error UI if
possible
- Implicit: don't show any error UI at all; this is something sent
implicitly like a typing message or a receipt
2021-05-26 15:57:45 -07:00
Jordan Rose
f7acf9005e
Add SessionRecord.currentRatchetKeyMatches
...
This checks if there is an active sender state using the given ratchet
key, for use with decryption error messages. In this case, the app may
choose to archive the current session, or take even stronger actions
such as fetching new prekeys for the recipient.
2021-05-26 15:41:04 -07:00