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

TLS Proposal Draft #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions beps/bep_draft.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
:BEP: XXX
:Title: TLS extension
:Version: $Revision$
:Last-Modified: $Date$
:Author: Darren Horrocks <mihael1peklar@gmail.com>
:Status: Draft
:Type: Standards Track
:Content-Type: text/x-rst
:Created: 11-Nov-2023
:Post-History: 11-Nov-2023: initial version


The TLS Extension introduces a single new command, TLS.

This is enabled by setting the third least significant bit of the
next to last reserved byte in the BitTorrent handshake:

::

reserved[6] |= 0x04

The extension is enabled only if both ends of the connection set this bit.

Command
==================

::

*TLS*: <len=0x0005> <op=0x20><port>

Sending the command is entirely optional.
Disconnecting the current connection and reconnecting via TLS is also optional should the command be sent.
No assumptions should be made about the clients ability to handle TLS based connections.

A TLS connection
==================

A serving peer should have a TLS server certificate where the CN is equal to the PeerID of the serving peer.

A client peer should validate that the PeerID matches the certificate CN.