Commit Graph

67 Commits

Author SHA1 Message Date
jimio-signal
4fbea5a8f8
Update README.md 2021-08-04 14:06:48 -07:00
Scott Nonnenberg
6a5805234f
Merge pull request #72 from dag0310/dag0310-patch-1
Fix typo in README.md
2021-01-12 17:33:34 -08:00
Daniel Geymayer
de6728487e
Fix typo in README.md 2020-04-25 00:39:47 +02:00
Scott Nonnenberg
f5a838f1cc
Update copyright year to 2018 on README.md (#47)
Update copyright year to 2018 on README.md
2018-05-04 10:30:18 -07:00
Nick Weingartner
af5f9653d6 Update copyright year to 2018 2018-05-04 10:04:46 -04:00
Scott Nonnenberg
d6e55c2e33
v1.3.0
Remove 1000 messageKey limit entirely, along with custom limits (#42)
Throw error if asked to jump forward in chain by over 2000 (#43)

Remove logging from verifyMAC on mismatch (#44)

Update to new signalapp github organization (#45)
Fix code example typo in Readme (#39)
2018-02-14 11:42:55 -08:00
Scott Nonnenberg
a80285cc83
Remove 1000 messageKey limit entirely, along with custom limits (#42) 2018-02-14 11:35:41 -08:00
Scott Nonnenberg
d08705329a
Throw error if asked to jump forward in chain by over 2000 (#43)
As libsignal-protocol-java has had for more than three years. This check
was present when it was first pulled out into its own repo in late 2014:

60800e1556/src/main/java/org/whispersystems/libaxolotl/SessionCipher.java (L383)
2018-02-14 11:35:16 -08:00
Scott Nonnenberg
5679fe7a49
Remove logging from verifyMAC on mismatch (#44)
We don't use it when debugging anyway.
2018-02-14 11:34:28 -08:00
Scott Nonnenberg
c95f5882a9
Update to new signalapp github organization (#45) 2018-02-14 11:34:17 -08:00
Yasin Okumus
b5514743fb Fix code example typo in Readme #38 (#39) 2017-12-18 14:33:41 -08:00
Scott Nonnenberg
cd2042f9ce
Built assets catch-up 2017-11-20 17:56:58 -08:00
Scott Nonnenberg
a39e38038a
v1.2.0
Quite a few changes to reflect new behavior around identity keys rolled
out in the Signal apps in June 2017:
  - We always trust a new identity key when receiving messages
  - We have a few requirements for trust when sending messages:
    1) it can't have changed very recently
    2) if the previous identity key had been verified by the user, the
       user needs to explicitly approve a new identity key

Expose ability to delete all existing sessions - for proper reset (#35)

Allow caller to provide fillMessageKeys limit - allowing customization
  of the maxiumum number of one-sided messages in a conversation (#29)

Dev:
  - A number of changes to make the branch build in CI, add badge, etc.

Note: we appear to have some unreliability during our Firefox 34 builds
on Sauce. A little less than half the time the test fails with an out of
memory error.
2017-11-20 17:32:46 -08:00
Scott Nonnenberg
f1e22f66a3
Expose ability to fully delete existing sessions - for resets (#35) 2017-11-20 17:19:23 -08:00
Scott Nonnenberg
6154353cd9
Merge branch 'trust-store-changes'
Catching master up with the latest updates. the trust-store-changes branch has all
recent tags, and the master branch has a few readme and project-level changes.
2017-11-20 16:55:26 -08:00
Scott Nonnenberg
dbf8c26967
Update grunt-contrib-jshint to make build succeed 2017-11-06 12:15:57 -08:00
Scott Nonnenberg
beb11f0292
Travis: Update to node 6 2017-11-06 12:07:28 -08:00
Frank Cash
70eb5c5494 Add Travis-CI badge (#20) 2017-11-06 12:01:50 -08:00
Scott Nonnenberg
5d579e93fc
Merge pull request #19 from frankcash/patch-1
Update README.md
2017-11-06 11:56:17 -08:00
Scott Nonnenberg
3d72df72c0 Merge pull request #29 from WhisperSystems/unlimited-for-yourself
fillMessageKeys: allow for SessionCipher creator to specify limit
2017-08-04 11:26:54 -07:00
Scott Nonnenberg
b6c3093945
SessionCipher: allow caller to provide fillMessageKeys limit
If options.messageKeysLimit is provided by falsey, then we don't apply
any limit at all. This can be used to set no limit for communications
from your own devices.

Why would you want that? People leave their laptops closed for weeks at
a time and get this error, since their other devices are sending
messages to it constantly:

"Too many message keys for chain"

And it seems to be really hard to fix once you're in this state. Sync
messages no longer show up from the device that got into this state.

FREEBIE
2017-08-04 10:50:31 -07:00
lilia
f308236941 Fix tests
Update in-memory storage implementation to parse full address strings in
saveIdentity. Update usage of saveIdentity, passing in the full address string.
2017-07-02 16:12:07 -10:00
lilia
1fe18c3384 Always pass the full address to saveIdentity
For consistency, and so the storage interface implementation can make descisions
about archiving sibling sessions.
2017-06-27 09:43:40 -10:00
lilia
b65f69af6e Fix direction in decrypt check 2017-06-01 15:08:37 -07:00
lilia
cee3b82317 Remove removePreviousSessions
This reverts commit b45ace4 and parts of 2657f00.

The purpose of the deletes was so that a session with a different identity key
couldn't get "resurrected" after an identity switch. But if the validate/save
action is happening for every encrypt/decrypt, then it shouldn't be possible
for an old identity to get invisibly resurrected.

Furthermore, at the application level we would clear sessions for all devices
on the affected number, but libsignal-protocol operates on a per-device basis,
so it can only perform what amounts to an incomplete removal.
2017-05-30 14:54:27 -07:00
lilia
e68e17c861 Test SessionCipher for encrypt/decrypt identity checks
In order to facilitate generation of session state in these tests, move some
helpers from SessionBuilderTest.js into global namespace of the test page
2017-05-30 14:54:27 -07:00
Scott Nonnenberg
2657f00c98 Add identity checks to encrypt/decrypt
WhisperSystems/libsignal-protocol-java@6935c70081
2017-05-26 14:27:52 -07:00
lilia
b45ace4d58 Clear old sessions for a device when its identity changes 2017-05-26 14:27:52 -07:00
lilia
ee00f080f4 Resolve true if saveIdentity overwrote a key
Reflect whether a saveIdentity operation reflects a replacement of an existing
key or not. The return value can be used by the caller to decide whether they
should clear sessions for the recipient.
2017-05-26 14:26:35 -07:00
lilia
63d2536263 Support for directional trust
Pass in a direction to isTrusted, based on constants defined by the storage
implementation. These values allow the trust store to determine whether a given
key is trusted, given the directional context.
2017-05-26 14:23:38 -07:00
lilia
b0ed2e5e4f Fix check for session equivalence
This check didn't work, which resulted in closing and then immediately
reopening the current session. Not that big a deal, since it merely
flips a flag off and back on again just before saving the session
record, but does result in spurious log statements.
2017-04-12 11:54:11 -07:00
Frank Cash
3607679e93 Update README.md 2017-04-04 22:17:49 -04:00
lilia
b77842c30e Promote old session states 2017-03-27 19:17:33 -07:00
lilia
b01ac22eb9 Fix bad mac on repeated deliveries
`MessageCounterError` is the expected result of repeated deliveries.
Error handling in decryptWithSessionList should immediately return such
an error if it occurs. Previous to this change, a Bad MAC error to be
returned instead of a MessageCounterError, if the message in question
was encrypted for a closed session.
2017-03-27 17:01:56 -07:00
lilia
3c0d6dc24b Normalize whitespace 2017-03-05 20:36:26 -08:00
lilia
963a424451 Fix test for presence of registrationId 2017-02-20 18:08:15 -08:00
lilia
17fdde0091 Remove unused argument 2017-02-20 18:08:04 -08:00
lilia
538c7aecce Fix crashes when no preKey is present
Adds a test identical to the 'basic prekey v3' test with the addition of
`delete preKeyBundle.preKey` where appropriate.
2017-02-09 10:53:53 -08:00
lilia
8334fa5699 Double the max old ratchet list length
Attempt to mitigate Bad MAC errors due to repeated ciphertext from more
than 5 exchanges ago.
2016-11-16 21:29:39 +01:00
lilia
7bc356ac15 Rename variable 2016-11-16 15:57:59 +01:00
lilia
861fc80580 Open sessions must have registrationIds 2016-10-05 21:57:01 +09:00
lilia
8df967ab64 Debug logging on migration failures 2016-10-05 21:56:15 +09:00
lilia
34eeb93470 Better debug output when JSON encoding fails 2016-10-05 21:22:25 +09:00
lilia
5043fb5fb8 Add support for migrating old SessionRecords
Attempt to upgrade old SessionRecords based on their version.
You only need this if you must support existing data.
2016-09-19 20:26:02 -07:00
lilia
7b21a4bed4 Add version field to SessionRecord
The session state format changed. Make a note of it.
2016-09-19 20:24:32 -07:00
lilia
ddba403ef5 Move registrationId from session record to session state
This was mostly used internally by SessionRecord to flag the lack of an
open session, but that can be replaced with an actual check for an open
session.
2016-09-19 20:21:53 -07:00
lilia
ffd60c7d94 Remove duplicate identityKey from SessionRecord
This is redundant to the identity key store, and only used to check
internal consistency between sessions and the 'current' remote identity,
though there's no particular reason we can't keep sessions from previous
identity keys.
2016-09-19 20:21:53 -07:00
lilia
081b27daac Remove unused constant
Also tidy up a nearby scope leak.
2016-09-19 20:17:41 -07:00
lilia
8c5c6b6bb0 Add support for numeric fingerprints 2016-08-23 16:05:53 -07:00
lilia
dd4e8375cd Include remote registrationId in encryption result
The signal service requires this field to accompany outgoing ciphertexts.
With this change we can likely remove the correspinding getter from
SessionCipher.
2016-08-11 15:52:27 -07:00