Skip to content

Muxer selection in TLS handshake #1751

Closed
@julian88110

Description

@julian88110

This enhancement is the go/TLS implementation of the spec#446; which is tracked by #426.

The core idea is to perform muxer selection in the security protocol handshake process, rather than selecting muxer in a separate multistream-selection round.

In order to implement this enhancement, I am planning to do the following:

  1. Extend the ConnSecurity interface by adding a method for retrieving early data negotiated by the security protocol. This interface is implemented by several security layer data types, including TLS, Noise, and Insecure.
    type ConnSecurity interface {
	// LocalPeer returns our peer ID
	LocalPeer() peer.ID

    type ConnSecurity interface {
	// LocalPeer returns our peer ID
	LocalPeer() peer.ID

	// LocalPrivateKey returns our private key
	LocalPrivateKey() ic.PrivKey

	// RemotePeer returns the peer ID of the remote peer.
	RemotePeer() peer.ID

	// RemotePublicKey returns the public key of the remote peer.
	RemotePublicKey() ic.PubKey

	**// Early data negotiated by the security protocol. Empty if not supported.
	EarlyData() string**
}
  1. Extend the Transport data type of multistream-muxer and add method to expose the muxer strings that are stored here.
  2. Introduce some coupling between the Multistream-muxer and security layer in the upgrader-code, to pass the supported muxers into security protocols.
  3. After security handshake is down, the early data result will be available by the method added in step 1.
  4. Upgrader logic is revised to use the early data, if available, to select muxer.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

🎉 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions