Commit Graph

218 Commits

Author SHA1 Message Date
Franck Royer 1d4137e2c4
Rename so that it does make dev thinks it's for asymmetric enc only 2021-07-16 10:24:29 +10:00
Franck Royer addf9543a2
Export `generatePrivateKey` and `getPublicKey` directly from the root 2021-07-16 09:43:10 +10:00
Franck Royer f3738b1eac
doc: Fix keep alive default value 2021-07-15 14:00:24 +10:00
Franck Royer 0b3f1a33c2
test: Symmetric encryption with waku store 2021-07-15 12:26:05 +10:00
Franck Royer 44efd28ac1
Update terminology and docs to cater for both sym and asym encryption 2021-07-15 12:25:47 +10:00
Franck Royer b74acd73dc
Remove unknown type 2021-07-15 12:16:21 +10:00
Franck Royer 75d1b3834c
Simplify expression 2021-07-15 12:16:03 +10:00
Franck Royer 13c8a0527b
Test symmetric encryption with nim-waku using relay 2021-07-15 12:12:43 +10:00
Franck Royer 302fc20243
Remove dupe tests 2021-07-15 10:36:24 +10:00
Franck Royer 9374de1931
Karma: Remove tests folder and use in place files & update contrib guide
*.browser.spec.ts files will be tested on both node and browser.
Other files only tested on node.
2021-07-15 10:36:24 +10:00
Franck Royer 25fccb4c9a
Add symmetric encryption support to Waku Message 2021-07-15 10:23:40 +10:00
Franck Royer 56c30059b2
Add comments on Waku Message Options 2021-07-15 10:23:34 +10:00
Franck Royer 57f65267c2
Implement and test symmetric encryption in the browser 2021-07-14 16:31:11 +10:00
Franck Royer 06ee0ac1d8
Symmetric encryption for node 2021-07-14 15:34:48 +10:00
Franck Royer ac4f0aab98
Only include lib files, segregate browser tests 2021-07-14 13:04:11 +10:00
Franck Royer a9c83dac13
Do not use same key value for both constants 2021-07-14 13:03:22 +10:00
Franck Royer e443237a81
Remove local type definitions for Karma to not return "not found" 2021-07-14 12:25:23 +10:00
Franck Royer 70058f0e36
Split browser and node tests 2021-07-14 11:56:48 +10:00
Franck Royer a0d3a21762
Improve importing of Muxed Stream type 2021-07-14 11:38:59 +10:00
Franck Royer c2cef05c2d
Use protobuf instead of JSON for direct messages 2021-07-12 17:29:52 +10:00
Franck Royer 48bdb0b3f2
Use WakuMessage version 1 instead of eth-crypto 2021-07-12 17:09:44 +10:00
Franck Royer 0e9c482a19
Enable decryption of messages retrieve via `WakuStore.queryHistory` 2021-07-12 13:15:19 +10:00
Franck Royer d68ee3fb74
New `peers` and `randomPeer` methods to return available peers 2021-07-12 13:15:19 +10:00
Franck Royer 4fe0116039
Use ecies library that provide right ECIES parameters 2021-07-12 11:30:19 +10:00
Franck Royer 63923f4368
Prefer usage of utils 2021-07-09 16:06:49 +10:00
Franck Royer b70f7c5a95
Use DOM random generator if available 2021-07-09 16:06:49 +10:00
Franck Royer 1f6ed9b525
Prefer secp256k1 lib over ecies 2021-07-09 15:50:17 +10:00
Franck Royer 2b1a6dafea
Skip nim-waku interop tests
ecies-parity does not provide the same ECIES that waku:
ecies-parity uses a shared hmac of `[0,0]` whereas waku uses `[]`.

Work is needed to find or create a new library.
2021-07-09 15:50:17 +10:00
Franck Royer 8cd5a52eba
Provide hex/bytes utils as part of js-waku 2021-07-09 15:50:17 +10:00
Franck Royer 22c716e0e6
Add API to generate keys 2021-07-09 15:50:16 +10:00
Franck Royer f123cd7e62
Test asymmetric encryption against nim-waku 2021-07-09 15:50:16 +10:00
Franck Royer f95d9aec3c
Add version 1 support to waku relay, test decryption against nim-waku 2021-07-09 15:50:16 +10:00
Franck Royer acdc032253
Simplify code 2021-07-09 15:50:16 +10:00
Franck Royer 34e6ac5247
Add version 1 support to WakuMessage 2021-07-09 15:50:15 +10:00
Franck Royer 2266f31d30
Move optional parameters to a single `Options` object. 2021-07-09 15:50:15 +10:00
Franck Royer 381333347e
Remove dupe code 2021-07-09 15:50:15 +10:00
Franck Royer f2a2233c77
Add encrypt/decrypt asymmetric 2021-07-09 15:50:15 +10:00
Franck Royer f97dc4de81
Implement Waku Message Version 1 encoding and signature 2021-07-09 14:49:09 +10:00
Franck Royer 7b5c8d6094
Move waku_message to dedicated folder 2021-07-09 14:49:09 +10:00
Franck Royer c3b726cb99
Remove deprecated call 2021-07-09 14:49:08 +10:00
Franck Royer aaf3b1867e
Disable keep alive by default as latest nim-waku release does not
support ping protocol.
2021-07-05 09:40:07 +10:00
Franck Royer 354dcd66a5
Constructor is more appropriate when comparing function signatures 2021-07-02 13:52:50 +10:00
Franck Royer 370a347ff2
Actually disable keep alive if set to 0 2021-07-02 10:51:58 +10:00
Franck Royer 8cecfc205b
Use plain websocket in tests
Thanks to the libp2p upgrade, waku actually tries to listen to a
secure websocket. Using plain websocket for now, testing secure
websocket is tracked with #50.
2021-06-22 14:11:38 +10:00
Franck Royer 6cb92dd4b9
Upgrade to latest libp2p versions
And few other packages
2021-06-22 13:21:23 +10:00
Franck Royer dbab0cc582
Unnecessary and create conflicts due to disparity of version
Between libp2p-interfaces from libp2p and libp2p-gossipsub.
2021-06-22 10:08:02 +10:00
Franck Royer 381fc8b82c
Add keep alive feature
Using libp2p ping protocol.
2021-06-21 09:46:41 +10:00
Franck Royer e3b4a42822
Add keep alive feature
Using libp2p ping protocol.
2021-06-21 09:46:29 +10:00
Franck Royer 939b5fb20a
Auto select peer if none provided for store and light push protocols 2021-06-16 23:51:20 +10:00
Franck Royer 60eb473047
Add `WakuRelay.deleteObserver` to allow removal of observers
Useful when a React component add observers when mounting and needs to
delete it when unmounting.
2021-06-16 16:37:04 +10:00