-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[BOUNTY] Explore OpenSSL support in the TLS security transport #7150
Comments
One might argue, that OpenSSL is quite a 'fat' library with a lot of code for compability reasons and without a good security record. Libsodum might be a better alternative to look into. It's well maintained, actively developed by cryptographers, is portable but also highly optimized and is one order of magnitude smaller than OpenSSL. It's also the reference implementation of Curve25519, ChaCha and Salsa20 - which we both probably ending up using anyway. |
OpenSSL has wide support on many platforms and has now received quite a bit of attention from the security community. Libsodium support would also be welcome but should be tackled independently. |
I think the most compelling argument for using libsodium is, the ability to use salsa2012 (salsa with just 12 rounds instead of 20). This allows getting quite decent performance even on embedded systems - like routers. Just a number off my head - A 74K MIPS32 with ~540 MHz does around 22 MBit/s with salsa2012 and umac - while aes128 with gcm does 4 MBit/s. |
@RubenKelevra please open a new issue for new feature requests. |
@Stebalien Just to confirm, a small amount of work if any is required on go-ipfs itself, but libp2p/go-libp2p-tls needs to be worked on? All I could imagine changing in go-ipfs is in the Makefile by adding the "openssl" tag. |
Nothing is required in go-ipfs, as far as I know. As long as building go-ipfs with |
Alrighty. Here's a bit of a status update. I've taken over libp2p/go-libp2p-tls#67 and currently have a draft PR opened (libp2p/go-libp2p-tls#71) appending to @balajijinnah's work. Before that can get merged, libp2p/go-openssl#13 needs to get merged to conform to the libp2p spec. I'm also working on adding tests in libp2p/go-libp2p-tls#71, but it's hard to tell if tests fail due to not using TLS 1.3 or if there are bugs in the PR itself. |
The need in brief
Currently, the SECIO transport supports using OpenSSL for the RSA . This can significantly improve performance as OpenSSL is highly optimized.
Now that we're switching to TLS, it would be nice to explore OpenSSL support in go-libp2p-tls.
Deliverable
Requirements
Non-requirement: While the described feature should be as fast as possible, it may not have higher overall throughput than go's built in TLS implementation, due to CGO overhead. If that turns out to be the case, but it looks like OpenSSL's handshake throughput is significantly higher than Go's, we may create an additional bounty to use OpenSSL for the handshake only.
Guidelines
The text was updated successfully, but these errors were encountered: