Opened 11 years ago
Last modified 10 years ago
#219 new enhancement
Use NaCl/Curve25519 for Tub authentication
Reported by: | str4d | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | undecided |
Component: | negotiation | Version: | 0.6.4 |
Keywords: | Cc: |
Description
The current TubID system uses the .startTLS()
method of the TCP for authenticating Tubs and securing connections. But with #203 on the horizon, foolscap will support endpoints that do not have (or need) .startTLS()
, because they have their own encryption (I2P/Tor). Attempting to use the existing SSL TubIDs over these transports will require considerable heroics. Some FURLs may also contain multiple endpoints, and these should authenticate with the same TubID / public key regardless of transport.
At RWC2014 warner suggested moving to NaCl crypto instead of SSL. This has the advantage of making Tub authentication independent of the transport used.
Legacy SSL TubIDs would still be supported, but only tcp location hints would be considered. The following table shows how location hints would be supported.
Location Hint | |||
---|---|---|---|
TubID | tcp | i2p | tor |
SSL | yes | no (unless heroics) | |
NaCl | uniform auth, aware of which transport is being used |
Change History (2)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Summary: | Use NaCl for Tub authentication → Use NaCl/Curve25519 for Tub authentication |
---|
Merging the redundant #227 into this one. The description was:
Given the frustrations of TLS (especially interacting with pyOpenSSL to override certificate validation), it might be better to bail on it and go with a Curve25519-based message-based wire protocol. The basic ideas:
Foolscap-0.6.5 (at least) accepts any tubid where the first 32 characters are all legal base32 (
a-z A-Z 2-7
), and rejects anything else (BadFURLError
). These will be treated as an old-style cert hash: the connection will be accepted ifbase32(SHA1(cert))
matches the first 32 characters of the claimed tubid. Note thatbase32()
always emits lowercase, so uppercase tubids can never match. Ignoring things past the first 32 characters was added to leave room for future extensions, although naturally making extensions of a security-critical discriminator must be done very carefully.A new kind of tubid should be easy to visually distinguish from the old ones, and guaranteed to never be mistaken for the old type. In particular it should trigger the
BadFURLError
when processed by an old implementation. Given the regexp in 0.6.5, this means one of:Note that using a capital letter is not enough to trigger
BadFURLError
, but would be safe against accidental/intentional overlap.The extensible-tubid structure was established in #60, and first released in 0.2.6.