Mbed-TLS / mbedtls
git clone https://github.com/Mbed-TLS/mbedtls.git
mbedtls-4.2.0 · 3mo ago
🔥 on GitHub Trending today
A C library implementing X.509 certificate handling and the TLS and DTLS protocols, with a small footprint for embedded systems.
Why you might care
Suited to embedded and resource-constrained devices that need TLS without a large dependency. Configurable at compile time via config files and includes TF-PSA-Crypto, a reference implementation of the PSA Cryptography API.
+2
stars, 24h · #13,359
+~19
stars, 7 days · #8,762
+~80
stars, 30 days · #8,761
7.0k
★ total · +0% this week
3.0k
forks · 1.7k open issues
Star history (as recorded here)
LanguageC
License—
Created2012-11-14 (13y ago)
Last push2d ago
Watchers204
OwnerOrganization
Seen on GitHub Trending
- 2026-10-23 — #10 daily in c · +5 ★
GitHub topics
Links
- GitHub: github.com/Mbed-TLS/mbedtls
- Homepage: https://www.trustedfirmware.org/projects/mbed-tls/
- Releases · Issues · Hacker News mentions
README excerpt
README for Mbed TLS =================== Mbed TLS is a C library that implements X.509 certificate manipulation and the TLS and DTLS protocols. Its small code footprint makes it suitable for embedded systems. Mbed TLS includes the TF-PSA-Crypto repository that provides an implementation of the PSA Cryptography API. Configuration ------------- Configuration options related to X.509 and TLS are available in `include/mbedtls/mbedtls_config.h`, while cryptography and platform options are located in the TF-PSA-Crypto configuration file `tf-psa-crypto/include/psa/crypto_config.h`. With the default platform options, Mbed TLS should build out of the box on most systems. These configuration files can be edited manually, or programmatically using the Python script `scripts/config.py` (run with --help for usage instructions). We provide some non-standard configurations focused on specific use cases in the `configs/` directory. You can read more about those in `configs/README.txt`. Documentation ------------- The main Mbed TLS documentation is available via ReadTheDocs. To generate a local copy of the library documentation in HTML format, tailored to your compile-time configuration: 1. Make sure that Doxygen is installed. 1. Run `cmake -B /path/to/build_dir /path/to/mbedtls/source` 1. Run `cmake --build /path/to/build_dir --target mbedtls-apidoc` 1. Open one of the main generated HTML files: * `apidoc/index.html` * `apidoc/modules.html` or `apidoc/topics.html` For other sources of documentation, see the SUPPORT document. Compiling --------- We use CMake to configure and drive our build process. Three libraries are built: `libtfpsacrypto`, `libmbedx509`, and `libmbedtls`. Note that `libmbedtls` depends on `libmbedx509` and `libtfpsacrypto`, and `libmbedx509` depends on `libtfpsacrypto`. As a result, some linkers will expect flags to be in a specific order, for example the GNU linker wants `-lmbedtls -lmbedx509 -ltfpsacrypto`. The cryptographic library `libtfpsacrypto` is also provided under its legacy name, `libmbedcrypto`. ### Tool versions You need the following tools to build the library from the main branch with the provided CMake files. Mbed TLS minimum tool version requirements are set based on the versions shipped in the latest or penultimate (depending on the release cadence) long-term support releases of major Linux distributions, namely at time of writing: Ubuntu 22.04, RHEL 9, and SLES 15 SP4. * CMake 3.20.2 or later. * A build system like Make or Ninja for which CMake can generate build files. * A C99 toolchain (compiler, linker, archiver). We actively test with GCC 5.4, Clang 3.8, Arm Compiler 6, and Visual Studio 2017 Compiler. More recent versions should work. Slightly older versions may work. * Python 3.8 or later to generate the test code. Python is also needed to build the development branch (see next section). * Perl to run the tests, and to generate some source files in the development branch. * Doxygen 1.8.14 or later (if building the do
Blurb generated by claude-haiku-5-5 today. Star deltas marked ~ are extrapolated from partial history.