@ripnc/libsignal 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,64 @@
1
- # Temporary Holding Version
1
+ libsignal-node
2
+ ========
3
+ Signal protocol implementation for Node.js based on
4
+ [libsignal-protocol-javascript](https://github.com/WhisperSystems/libsignal-protocol-javascript).
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ [![npm](https://img.shields.io/npm/v/libsignal.svg)](https://www.npmjs.com/package/libsignal)
7
+ [![npm](https://img.shields.io/npm/l/libsignal.svg)](https://github.com/ForstaLabs/libsignal-node)
8
+
9
+
10
+ Overview
11
+ --------
12
+ A ratcheting forward secrecy protocol that works in synchronous and
13
+ asynchronous messaging environments.
14
+
15
+
16
+ PreKeys
17
+ --------
18
+ This protocol uses a concept called 'PreKeys'. A PreKey is an ECPublicKey and
19
+ an associated unique ID which are stored together by a server. PreKeys can also
20
+ be signed.
21
+
22
+ At install time, clients generate a single signed PreKey, as well as a large
23
+ list of unsigned PreKeys, and transmit all of them to the server.
24
+
25
+
26
+ Sessions
27
+ --------
28
+ Signal Protocol is session-oriented. Clients establish a "session," which is
29
+ then used for all subsequent encrypt/decrypt operations. There is no need to
30
+ ever tear down a session once one has been established.
31
+
32
+ Sessions are established in one of two ways:
33
+
34
+ 1. PreKeyBundles. A client that wishes to send a message to a recipient can
35
+ establish a session by retrieving a PreKeyBundle for that recipient from the
36
+ server.
37
+ 2. PreKeySignalMessages. A client can receive a PreKeySignalMessage from a
38
+ recipient and use it to establish a session.
39
+
40
+
41
+ State
42
+ --------
43
+ An established session encapsulates a lot of state between two clients. That
44
+ state is maintained in durable records which need to be kept for the life of
45
+ the session.
46
+
47
+ State is kept in the following places:
48
+
49
+ * Identity State. Clients will need to maintain the state of their own identity
50
+ key pair, as well as identity keys received from other clients.
51
+ * PreKey State. Clients will need to maintain the state of their generated
52
+ PreKeys.
53
+ * Signed PreKey States. Clients will need to maintain the state of their signed
54
+ PreKeys.
55
+ * Session State. Clients will need to maintain the state of the sessions they
56
+ have established.
57
+
58
+
59
+ License
60
+ --------
61
+ Licensed under the GPLv3: http://www.gnu.org/licenses/gpl-3.0.html
62
+
63
+ * Copyright 2015-2016 Open Whisper Systems
64
+ * Copyright 2017-2018 Forsta Inc
package/index.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ exports.crypto = require('./src/crypto');
4
+ exports.curve = require('./src/curve');
5
+ exports.keyhelper = require('./src/keyhelper');
6
+ exports.ProtocolAddress = require('./src/protocol_address');
7
+ exports.SessionBuilder = require('./src/session_builder');
8
+ exports.SessionCipher = require('./src/session_cipher');
9
+ exports.SessionRecord = require('./src/session_record');
10
+ Object.assign(exports, require('./src/errors'));
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "@ripnc/libsignal",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "1.0.0",
4
+ "description": "Open Whisper Systems' libsignal for Node.js",
5
+ "repository": "ripnc/libsignal",
6
+ "main": "index.js",
7
+ "keywords": [
8
+ "libsignal",
9
+ "signal",
10
+ "whispersystems",
11
+ "crypto",
12
+ "ripnc"
13
+ ],
14
+ "license": "GPL-3.0",
15
+ "dependencies": {
16
+ "curve25519-js": "^0.0.4",
17
+ "protobufjs": "6.8.8"
18
+ },
19
+ "files": [
20
+ "src/*"
21
+ ],
22
+ "devDependencies": {
23
+ "eslint": "6.0.1"
24
+ }
6
25
  }
@@ -0,0 +1,31 @@
1
+ {
2
+ "parserOptions": {
3
+ "ecmaVersion": 8
4
+ },
5
+ "env": {
6
+ "es6": true,
7
+ "node": true
8
+ },
9
+ "extends": "eslint:recommended",
10
+ "rules": {
11
+ "quotes": "off",
12
+ "semi": [
13
+ "error",
14
+ "always"
15
+ ],
16
+ "no-console": "off",
17
+ "no-debugger": "off",
18
+ "no-unused-vars": [
19
+ "error",
20
+ {
21
+ "args": "none"
22
+ }
23
+ ],
24
+ "no-constant-condition": [
25
+ "error",
26
+ {
27
+ "checkLoops": false
28
+ }
29
+ ]
30
+ }
31
+ }