Synss / python-mbedtls

Cryptographic library with an mbed TLS back end
MIT License
79 stars 28 forks source link

RFE: “When to use this” in documentation #54

Closed FGasper closed 2 years ago

FGasper commented 2 years ago

I am submitting a …

Description

It would be nice to have a section of the main documentation that outlines the intended uses of this module versus ssl. mbedTLS is quite a bit slower than OpenSSL, and on any device that needs mbedTLS’s lightness it’s probably advantageous to use a compiled language rather than python. The notion of “alternative” TLS libraries intrigues me, but the performance hit makes it seem hard to justify.

The number of GitHub forks & stars here, though, suggests that someone finds it of use, so I’m curious what those use cases are. Having them in the docs would probably help potential users to know “sooner-rather-than-later” that python-mbedtls is right for them.

Thanks for reading!

Synss commented 2 years ago

Hi Felipe,

Thank you for your interest. This is a strange question I cannot answer better than you. I do not know why people use this library or star it. All I know about its users are the stars, forks, and issues you can find here as well. This is FOSS! 😊

I think some people just read the code in order to understand (upstream/C) mbedTLS. Then, some users need DTLS and a few other features this library proposes and that are not commonly available in alternative Python libraries, or at least they were not the last time I checked.

You are very welcome to write a blog post and publish benchmarks elsewhere. The same goes with patches that would increase the performance of this library.

Do you know why Python is such a popular programming language when C++ and other compiled languages are so much faster? 😉

Best, Mathias

FGasper commented 2 years ago

@Synss Python is, of course, popular for the same reason as node.js: it’s easier than C++ et al. Python ssl versus this library doesn’t seem to have the same distinction, AFAICT, though I would agree that OpenSSL’s enormous C API is more imposing than mbedTLS’s.

I’d love to make your library faster, but mbedTLS itself seems to be the bottleneck.

I’m sorry if this was an awkward question/RFE. There are other language bindings to mbedTLS around (e.g., Lua), so clearly a critical mass of folks out there does find this useful; I really am just wondering what those use cases are.

Anyhow, thanks.