Commit Graph

12 Commits

Author SHA1 Message Date
Ryan X. Charles 88ab38eb00 add nonce support to WebRTC and Wallet
Each person keeps track of their own nonce, and the nonces of the other
copayers. The nonce is iterated for each message. If a person ever doesn't
iterate their nonce, that message is discarded by the copayers.

The nonces are saved as networkNonce (your nonce) and networkNonces (the nonces
of your copayers) in the wallet file.

In order to support restoring old wallets, the first four bytes of the 8 byte
nonce are actually the current time in seconds. Thus you can restore an old
wallet, because certainly at least one second has passed since your last
message. Only if you try to restore an old wallet within 1 second from the time
of your last message will you have a problem (or if your system clock is
grossly inaccurate).
2014-07-08 23:03:30 -07:00
Ryan X. Charles a1155c2798 add support for 8 byte big endian nonce to Message
...network protocol is backwards incompatible with previous network protocl.
also includes a second version number for backwards-compatible changes (the
original version number was for backwards-incompatible changes).
2014-07-08 20:02:37 -07:00
Matias Alejo Garcia bbac45ee7a fixes handling networking errors and retries. Adds tests 2014-07-08 15:25:12 -03:00
Ryan X. Charles c0b95a5879 fix encoding mistake - payload should be buffer-like 2014-06-26 14:26:58 -07:00
Ryan X. Charles 08a741d880 confirm peerId matches claimed pubkey to prevent MITM attacks 2014-06-26 13:58:45 -07:00
Ryan X. Charles 543c42a6a8 add authentication via new Message core class 2014-06-26 08:50:39 -07:00
Ryan X. Charles ea2e2d4e19 run js-beautify on everything
...with two spaces. Command: js-beautify -s 2 -r [filename]
2014-06-24 08:36:32 -07:00
Ryan X. Charles 435e5c3e13 another test for WebRTC 2014-06-19 13:13:01 -07:00
Ryan X. Charles 98b864454f add some basic tests for WebRTC 2014-06-19 13:13:01 -07:00
Ryan X. Charles 2b2a807f7c remove unused "copay" dependency 2014-06-19 13:13:01 -07:00
Ryan X. Charles 8bba982978 make WebRTC tests work 2014-06-19 13:13:01 -07:00
Ryan X. Charles 434dad831d add tests for WebRTC and fix some mocha browser test problems
from now on you need to run "grunt shell --target=dev" to build the test
version of copay which you can run the mocha browser tests on, which includes
packages like sinon and soop.
2014-06-19 13:13:01 -07:00