Commit Graph

24 Commits (f7581cf4ebee13edb51e6372e9903c5e8745d0e9)

Author SHA1 Message Date
Audric Ackermann f7581cf4eb
increase prettier maxWidth to 100 3 years ago
Audric Ackermann 46dfb3489b
remove mock sockets and websockets unused resources 3 years ago
Scott Nonnenberg 3851bf351f Throttle typing events, fix profile logging, fix group typing 6 years ago
Scott Nonnenberg 0774ba2903 Eslintify all of libtextsecure 6 years ago
Scott Nonnenberg 754d65ae2e Let's make it all pretty, shall we?
We missed a couple directories with previous attempts to turn this on
globally: app/ and libtextsecure/

Not to mention files in places we didn't expect: ts files that weren't
in the ts directory!

This turns prettier on for every file we care about (js, ts, tsx, md)
everywhere in the project but for a few key parts.
6 years ago
Daniel Gasienica 95321e5d3e Remove Vim mode lines 6 years ago
Daniel Gasienica 32911002d4 Verify `makeAttachmentPointer` and `encryptAttachment` arguments
The underlying `crypto.subtle.encrypt` API requires it.
6 years ago
Lilia ae190fed44
Profiles (#1453)
* Add AES-GCM encryption for profiles

With tests.

* Add profileKey to DataMessage protobuf

// FREEBIE

* Decrypt and save profile names

// FREEBIE

* Save incoming profile keys

* Move pad/unpad to crypto module

// FREEBIE

* Support fetching avatars from the cdn

// FREEBIE

* Translate failed authentication errors

When AES-GCM authentication fails, webcrypto returns a very generic error. The
same error is thrown for invalid length inputs, but our earlier checks in
decryptProfile should rule out those failure modes and leave us safe to assume
that we either had bad ciphertext or the wrong key.

// FREEBIE

* Handle profile avatars (wip) and log decrypt errors

// FREEBIE

* Display profile avatars

Synced contact avatars will still override profile avatars.

* Display profile names in convo list

Only if we don't have a synced contact name.

// FREEBIE

* Make cdn url an environment config

Use different ones for staging and production

// FREEBIE

* Display profile name in conversation header

* Display profile name in group messages

* Update conversation header if profile avatar changes

// FREEBIE

* Style profile names small with ~

* Save profileKeys from contact sync messages

// FREEBIE

* Save profile keys from provisioning messages

For standalone accounts, generate a random profile key.

// FREEBIE

* Special case for one-time sync of our profile key

Android will use a contact sync message to sync a profile key from Android
clients who have just upgraded and generated their profile key. Normally we
should receive this data in a provisioning message.

// FREEBIE

* Infer profile sharing from synced data messages

* Populate profile keys on outgoing messages

Requires that `profileSharing` be set on the conversation.

// FREEBIE

* Support for the profile key update flag

When receiving a message with this flag, don't init a message record, just
process the profile key and move on.

// FREEBIE

* Display profile names in group member list

* Refresh contact's profile on profile key changes

// FREEBIE

* Catch errors on profile save

// FREEBIE

* Save our own synced contact info

Don't return early if we get a contact sync for our own number

// FREEBIE
7 years ago
lilia a256f17e19 Cleanup attachment attributes
Convert attachment ids from longs to strings, and byte buffers to
arrays.

// FREEBIE
7 years ago
lilia 43de0cc2ec Add attachment digests
// FREEBIE
7 years ago
lilia f8e176fd40 Dedupe methods
Define textsecure.crypto in terms of libsignal.crypto.

// FREEBIE
8 years ago
lilia 63cd3b2788 Use constant time mac comparison
In libtextsecure and in libaxolotl.

// FREEBIE
9 years ago
lilia ac7c95fed0 Validate argument lengths in crypto.js
These functions accept an array buffer and extract an AES and MAC key
from it without verifying it has the appropriate length. Ciphertext
messages are similarly dissected. The slice function does not raise an
error on out of bounds accesses but instead returns an empty or
partially-filled array. Empty or short arrays will be passed through to
the window.crypto.subtle API, where they will raise an error. We should
not rely on the Web Crypto API to validate key lengths or for MAC checks
to fail. Instead, validate the lengths of given parameters before
extracting their components.

// FREEBIE
9 years ago
lilia 7d9cf0c167 Pass the signaling key into decryptWebSocketMessage
De-couple this file from dependency on storage.
9 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
9 years ago
lilia 704c6ce779 Signaling key is now an array buffer 9 years ago
Matt Corallo 00cb420d37 Merge (un)encrypted storage layers 9 years ago
Matt Corallo e2e06b2d3c Remove axolotl.storage usage from libtextsecure 9 years ago
Matt Corallo 870e5dc9dc Remove all external non-test deps on libaxolotl/crypto 9 years ago
Matt Corallo 7d2d2d92fc Copy getRandomBytes from libaxolotl to libtextsecure 9 years ago
Matt Corallo 403ae4376d Move attachment/websocket [en|de]cryption to libtextsecure 9 years ago
Matt Corallo 83c6fe9008 Moveish the first files to libaxolotl/ 9 years ago
Matt Corallo e7f3e52b6c Remove NaCL! 10 years ago
Matt Corallo 8ad1a38b5b Move js files around for libtextsecure split 10 years ago