3 ms·
It depends on what you're trying to accomplish. Rule of thumb is: just use TLS 1.3 if you can. That includes using TLS 1.3 in mutual auth mode if you need to v
by munchbunny 7y ago
It depends on what you're trying to accomplish.
Rule of thumb is: just use TLS 1.3 if you can. That includes using TLS 1.3 in mutual auth mode if you need to validate both client and server identities. It comes with a lot of PKI for free to help address the "how do you know you can trust the other guy on the line?" problem. If you want the client/server to trust a restricted list of servers/clients, most clients and servers have that capability.
If SSL/TLS won't suffice and you just need to create an end to end "thing" with proof of identity, then libsodium is probably fine.
If you're looking for a more general purpose crypto library where you need to mix and match algorithms, I'd recommend something like Google Tink (https://github.com/google/tink https://github.com/google/tink), or the high level interface to the native API's that come with the OS. On OS X that's the native security framework (https://developer.apple.com/documentation/security https://developer.apple.com/documentation/security), and on Windows that's the .NET cryptography library (https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography?view=netframework-4.8 https://docs.microsoft.com/en-us/dotnet/api/system.security....).
If you need even more flexibility and are willing to do the research to avoid the footguns, there's always OpenSSL/LibreSSL, but that comes with a huge footgun warning.
- loup-vaillant 7y ago> It comes with a lot of PKI for free to help address the "how do you know you can trust the other guy on the line?" I would hesitate to trust a high stakes system (like, controlling a regional power grid) with TLS's default PKI. There are hundreds of certificate authorities out there, all of which can vouch for everything. Compromising one certificate authority is enough to mount a man in the middle attack. Granted, this is not a trivial attack, and TLS as it is now is mostly sufficient for your regular online shopping. More critical applications however need a dedicated PKI.
- munchbunny 7y agoAbsolutely, which is why I included the extra point: If you want the client/server to trust a restricted list of servers/clients, most clients and servers have that capability. If you are running a regional power grid, TLS as a technology is still fine, but you should absolutely not trust the default PKI.
- loup-vaillant 7y agoOops, missed that, sorry.