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

Handshake refactor #190

Closed
whyrusleeping opened this issue Oct 20, 2014 · 1 comment
Closed

Handshake refactor #190

whyrusleeping opened this issue Oct 20, 2014 · 1 comment

Comments

@whyrusleeping
Copy link
Member

I think the handshake method needs to be refactored and modularized. The default "handshake" should initially do nothing, but the program should register items to be negotiated. The rough algorithm im thinking is something like:

connect
swap peerIDs (tenative, maybe should be done after crypto)
send items to be negotiated (crypto, compression, services, etc)
for each item that both sides want, in order of hash or alphabetical order:
    send preferences
    select best or select compatible (depends on whats being communicated)
construct peer and conn objects
return

Im sure im leaving things out and not thinking of other things, but thats why im opening this discussion, i would like to openly collaborate and decide upon a good procedure for the handshake.

@jbenet
Copy link
Member

jbenet commented Oct 20, 2014

Yeah, this needs work. Notes:

  • "the other" handshake already happens first: protocol version checking (before secure channel)
  • secure channel should happen on its own (maybe its first message embedded in the global handshake message, but this will be its own protocol, so separation of state)
  • +1 on preferences, etc. we should build protocol suites/sets (like TLS does)

@aschmahmann aschmahmann mentioned this issue Aug 23, 2021
62 tasks
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this issue Oct 23, 2021
Some key-value is missing in the log
@aschmahmann aschmahmann mentioned this issue Dec 1, 2021
80 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants