Created
April 24, 2014 00:46
-
-
Save matiu/11237601 to your computer and use it in GitHub Desktop.
Copay peer handshake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alice Bob | |
================================================= | |
.generates Extended PrivKey, PubKey | |
CopayerId=pubkey | |
PeerId=hash(CopayerId) | |
PeerID is provided to the PeerJS/WebRTC | |
P2P facilitator server | |
.Connects server with PeerId. | |
.Sends CopayerId to Alice | |
using an off channel. | |
.generates Extended | |
PrivKey, PubKey | |
CopayerId=pubkey | |
PeerId=hash(CopayerId) | |
.Connects server with PeerId. | |
BobPeerId = hash(CopayerId) | |
.Asks for a Bob's p2p channel | |
to the server using BobPeerId | |
.receives connection request | |
.sign a "HELLO" | |
using HMAC / Bob's | |
pubkey. See its | |
pubkey ring. | |
.check sig of HELLO. | |
start signing messages using ECDSA | |
and checking Alice message using her | |
public key. | |
Only the HELLO message is signed/verified using HMAC. | |
Then all messages are signed using ECDSA. | |
This attemps to remove the need of trust from | |
the PeerJS server. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to Alice, so it is only the pubkey (not extended).
Encryption should be easy to implement once we have EC encryption support on bitcore (bitpay/bitcore#287), and using the same pubkeys for signing and encrypting data.