sdmp / sdmp.github.io

The main front-page and docs for the sdmp project.
https://sdmp.io
2 stars 2 forks source link

Diffie-Helman & self-signing #13

Closed jmhobbs closed 8 years ago

jmhobbs commented 9 years ago

So, Diffie-Helman is there to establish a shared secret for the session key, however the spec says...

Because the two communicating nodes must have each others public keys before communicating, the keys are self signed. If Alice and Bob have previously exchanged and validated each others public keys, they will be able to validate each others cryptographic signatures. Instead of relying on some third party to assure key ownership, each party can validate the other party’s signature.

If the nodes have each others public keys before communicating, why not just use asymmetric encryption with those keys to exchange the session secret? Is there a cryptographic benefit to using DH here?

Additionally, that section mentions signing the public key in the DH exchange,

To verify an exchanged key, Alice would sign and transmit the hash of the value A, and then Bob would verify the accuracy of the signature. Likewise Bob would sign and transmit the hash of the value B, and then Alice would verify the accuracy of that signature.

But the connection message section doesn't have a place for that signature, and states:

Placing any additional information or metadata in the connection message–in particular information which could identify the node creating the message–is considered an error.

saibotsivad commented 8 years ago

I tried to make the session key handshake more clear in https://github.com/sdmp/sdmp.github.io/pull/22 so if this is still unclear after the merge, please re-open this pull request and I'll see about writing up some more/better details.