npm

@wireapp/proteus

9.13.0 • Public • Published

Wire

This repository is part of the source code of Wire. You can find more information at wire.com or by contacting opensource@wire.com.

You can find the published source code at github.com/wireapp.

For licensing information, see the attached LICENSE file and the list of third-party licenses at wire.com/legal/licenses/.

Proteus

Installation

yarn add @wireapp/proteus

Usage

import {init, keys} from '@wireapp/proteus';

await init();

const yourIdentity = keys.IdentityKeyPair.new();

Performance Benchmark

Run benchmark on main thread:

yarn start:benchmark

Run benchmark with worker threads:

yarn start:benchmark --workers [amount]

Results:

Scenario MacBook Air M1 (2020) A2337
(8C CPU, 16 GB RAM)
Node v16.0.0
Generating "4000" pre-key bundles (single-threaded) 1461ms
Initializing "4000" sessions (single-threaded) 2967ms
Encrypting "4000" texts (single-threaded) 200ms

Decryption Errors

Error Code Type/Error Reason
2 RangeError
Offset is outside the bounds of the DataView
Remote side failed to encrypt message (undefined text or similar error), thus we receive a 💣 from Cryptobox.
200 DecryptError
Unknown message type
Remote side does not follow proteus specification
201 DecryptError.InvalidMessage
Can't initialise a session from a CipherMessage.
Occurs when the remote party thinks we have an initialised session, but it does not/no longer exist locally. We must have confirmed the session with the remote party by sending them a message. Until then then they continue to send us PreKeyMessages instead of CipherMessages. We prematurely deleted the session before decrypting all events.
202 DecryptError.InvalidMessage
Unknown message format: The message is neither a "CipherMessage" nor a "PreKeyMessage".
Remote side does not follow proteus specification
203 DecryptError.PrekeyNotFound
Could not delete PreKey
204 DecryptError.RemoteIdentityChanged
Remote identity changed
Client of the user has changed without informing us (Man in the middle attack? or database conflicts on the remote side: sessions get mixed with new client)
205 DecryptError.InvalidMessage
No matching session tag.
Usually happens when we receive a message intended for another client.
206 DecryptError.InvalidSignature
Decryption of a message in sync failed
Envelope mac key verification failed
207 DecryptError.InvalidSignature
Decryption of a newer message failed
Envelope mac key verification failed. Session broken or out of sync. Reset the session and decryption is likely to work again!
208 DecryptError.OutdatedMessage
Message is out of sync
Opposite of "Too distant future" error
209 DecryptError.DuplicateMessage
Duplicate message
Happens if an encrypted message is decrypted twice
210 DecryptError.InvalidSignature
Decryption of a previous (older) message failed
Envelope mac key verification
211 DecryptError.TooDistantFuture
Message is from too distant in the future
More than 1000 messages at the beginning of the receive chain were skipped
212 DecryptError.TooDistantFuture
Message is from too distant in the future
More than 1000 messages on the receive chain were skipped
213 DecryptError.InvalidMessage
Sender failed to encrypt a message.
Error on receiver side when remote side sends a 💣
300 DecryptError.InvalidMessage
The received message was too big.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
9.13.0259latest

Version History

VersionDownloads (Last 7 Days)Published
9.13.0259
9.12.245
9.12.14
9.12.03
9.11.13
9.11.03
9.10.23
9.10.13
9.10.03
9.9.83
9.9.73
9.9.63
9.9.53
9.9.44
9.9.33
9.9.23
9.9.13
9.9.03
9.8.363
9.8.353
9.8.343
9.8.333
9.8.323
9.8.315
9.8.303
9.8.294
9.8.283
9.8.273
9.8.263
9.8.253
9.8.243
9.8.233
9.8.223
9.8.213
9.8.203
9.8.193
9.8.183
9.8.173
9.8.163
9.8.153
9.8.143
9.8.133
9.8.124
9.8.113
9.8.104
9.8.93
9.8.83
9.8.73
9.8.63
9.8.53
9.8.43
9.8.33
9.8.23
9.8.13
9.8.03
9.7.03
9.6.133
9.6.123
9.6.113
9.6.103
9.6.93
9.6.83
9.6.73
9.6.63
9.6.53
9.6.43
9.6.33
9.6.23
9.6.13
9.6.03
9.5.03
9.4.283
9.4.273
9.4.263
9.4.253
9.4.243
9.4.233
9.4.223
9.4.213
9.4.203
9.4.193
9.4.183
9.4.173
9.4.163
9.4.153
9.4.143
9.4.133
9.4.123
9.4.113
9.4.103
9.4.93
9.4.83
9.4.73
9.4.63
9.4.53
9.4.44
9.4.33
9.4.23
9.4.13
9.4.018
9.3.133
9.3.123
9.3.113
9.3.103
9.3.93
9.3.83
9.3.72
9.3.62
9.3.52
9.3.42
9.3.32
9.3.22
9.3.12
9.3.02
9.2.22
9.2.12
9.2.02
9.1.132
9.1.122
9.1.112
9.1.102
9.1.92
9.1.82
9.1.72
9.1.62
9.1.52
9.1.42
9.1.32
9.1.22
9.1.12
9.1.02
9.0.02
8.0.522
8.0.512
8.0.502
8.0.492
8.0.482
8.0.472
8.0.462
8.0.452
8.0.442
8.0.432
8.0.422
8.0.412
8.0.402
8.0.392
8.0.382
8.0.372
8.0.362
8.0.352
8.0.342
8.0.332
8.0.322
8.0.312
8.0.302
8.0.292
8.0.282
8.0.272
8.0.262
8.0.252
8.0.242
8.0.232
8.0.222
8.0.212
8.0.202
8.0.192
8.0.182
8.0.172
8.0.162
8.0.152
8.0.142
8.0.132
8.0.122
8.0.112
8.0.102
8.0.92
8.0.842
8.0.72
8.0.62
8.0.52
8.0.44
8.0.313
8.0.22
8.0.12
8.0.05
7.3.374
7.3.366
7.3.352
7.3.342
7.3.337
7.3.3211
7.3.3130
7.3.3013
7.3.2911
7.3.282
7.3.2719
7.3.2619
7.3.255
7.3.242
7.3.2315
7.3.227
7.3.2116
7.3.204
7.3.194
7.3.1867
7.3.172
7.3.168
7.3.1535
7.3.124
7.3.112
7.3.102
7.3.95
7.3.8102
7.3.74
7.3.63
7.3.514
7.3.44
7.3.32
7.3.22
7.3.12
7.3.02
7.2.107
7.2.98
7.2.82
7.2.78
7.2.62
7.2.521
7.2.42
7.2.32
7.2.211
7.2.12
7.2.010
7.1.636
7.1.6210
7.1.612
7.1.602
7.1.596
7.1.5816
7.1.572
7.1.562
7.1.559
7.1.542
7.1.532
7.1.522
7.1.512
7.1.5025
7.1.492
7.1.4822
7.1.472
7.1.4616
7.1.4527
7.1.442
7.1.432
7.1.422
7.1.412
7.1.402
7.1.392
7.1.382
7.1.375
7.1.362
7.1.352
7.1.345
7.1.332
7.1.322
7.1.3119
7.1.303
7.1.292
7.1.2866
7.1.262
7.1.253
7.1.242
7.1.232
7.1.224
7.1.212
7.1.202
7.1.193
7.1.182
7.1.172
7.1.162
7.1.154
7.1.143
7.1.132
7.1.125
7.1.112
7.1.104
7.1.95
7.1.82
7.1.73
7.1.65
7.1.56
7.1.426
7.1.34
7.1.22
7.1.110
7.1.02
7.0.62
7.0.52
7.0.42
7.0.32
7.0.28
7.0.19
7.0.02
6.0.52
6.0.42
6.0.37
6.0.22
6.0.12
6.0.02
5.3.32
5.3.25
5.3.12
5.3.02

Package Sidebar

Install

npm i @wireapp/proteus

Weekly Downloads

1,812

Version

9.13.0

License

GPL-3.0

Unpacked Size

301 kB

Total Files

134

Last publish

Collaborators

  • olafsulich_ext
  • typfel
  • immadjabbar_wire
  • virgilegirardin_wire
  • adrianweiss_wire
  • wireapp-owner
  • wireapp-member