Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Key Exchange Flow in BOLD #2 #10

Open
kilrau opened this issue Nov 23, 2019 · 2 comments
Open

Add Key Exchange Flow in BOLD #2 #10

kilrau opened this issue Nov 23, 2019 · 2 comments
Assignees
Labels
completeness Things that should be BOLD-specified, but are not yet

Comments

@kilrau
Copy link
Contributor

kilrau commented Nov 23, 2019

  1. Sita sends the first SessionInit message to Rama
  2. Rama responds with SessionAck message
  3. Rama sends SessionInit message to Sita
  4. Sita sends SessionAck message to Rama
  5. Sita calculates shared key_S based on Rama's SessionInit, Rama does the same. Rama calculates shared key_R based on Sita's session init message, Sita does the same. Sita uses shared key_S and Rama shared key_R for encyrpting messages from there on. The derived key for each "init/ack" interaction is used to encrypt traffic going to the initiator of the interaction. So the side which sent "init" is using it to decrypt incoming data, and the side which sent "ack" to encrypt outgoing data.

Details: https://github.com/bitcoin/bips/blob/master/bip-0151.mediawiki

@LePremierHomme
Copy link

Why not using Alice & Bob?

  1. Alice connects to Bob
  2. Alice creates an ephemeral ECDH key pair and sends Bob SessionInit with the public key
  3. Bob receives SessionInit, creates an ephemeral ECDH key pair and sends back to Alice SessionAck with the public key. Meanwhile he calculates the derived shared key which will be used to encrypt all future outgoing messages to Alice
  4. Alice received SessionAck and calculates the derived shared key which will be used to decrypt all future incoming messages from Bob.
  5. Steps 2-4 are repeated starting with Bob instead of Alice

@kilrau
Copy link
Contributor Author

kilrau commented Nov 28, 2019

Because Alice and Bob cause me to eye-roll by now ;) and https://www.theregister.co.uk/2012/10/01/crypto_analogies/.

Apart from that, the steps you outlined look good.

@kilrau kilrau added the completeness Things that should be BOLD-specified, but are not yet label May 25, 2020
kilrau added a commit that referenced this issue Dec 25, 2020
ghost pushed a commit that referenced this issue Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completeness Things that should be BOLD-specified, but are not yet
Projects
None yet
Development

No branches or pull requests

3 participants