ArticleslgStudy

computer science

Mbed TLS

Mbed TLS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Mbed TLS rather than just read about it. In short: Mbed TLS (previously PolarSSL) is an implementation of the TLS and SSL protocols and the respective cryptographic algorithms and support code required. It is distributed under the Apache License version 2.0.

Key takeaways

  • Mbed TLS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Mbed TLS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Mbed TLS from memory before moving on to harder problems.

Reference excerpt

Mbed TLS (previously PolarSSL) is an implementation of the TLS and SSL protocols and the respective cryptographic algorithms and support code required. It is distributed under the Apache License version 2.0. Stated on the website is that Mbed TLS aims to be "easy to understand, use, integrate and expand".

History The PolarSSL SSL library is the official continuation fork of the XySSL SSL library. XySSL was created by the French "white hat hacker" Christophe Devine and was first released on November 1, 2006, under GNU GPL v2 and BSD licenses. In 2008, Christophe Devine was no longer able to support XySSL and allowed Paul Bakker to create the official fork, named PolarSSL. In November 2014, PolarSSL was acquired by ARM Holdings. In 2011, the Dutch government approved an integration between OpenVPN and PolarSSL, which is named OpenVPN-NL. This version of OpenVPN has been approved for use in protecting government communications up to the level of Restricted. As of the release of version 1.3.10, PolarSSL has been rebranded to Mbed TLS to better show its fit inside the Mbed ecosystem. Starting from version 2.1.0, the library was made available under both the GPL v2 and Apache License v2.0. In 2020, Mbed TLS joined the TrustedFirmware project.

Library The core SSL library is written in the C programming language and implements the SSL module, the basic cryptographic functions and provides various utility functions. Unlike OpenSSL and other implementations of TLS, Mbed TLS is like wolfSSL in that it is designed to fit on small embedded devices, with the minimum complete TLS stack requiring under 60KB of program space and under 64 KB of RAM. It is also highly modular: each component, such as a cryptographic function, can be used independently from the rest of the framework. Versions are also available for Microsoft Windows and Linux. Because Mbed TLS is written in the C programming language, without external dependencies, it works on most operating systems and architectures. Since version 1.3.0, it has abstraction layers for memory allocation and threading to the core "to support better integration with existing embedded operating systems".

Design priorities The Mbed TLS library expresses a focus on readability of the code, documentation, automated regression tests, a loosely coupled design and portable code.

Development documentation The following documentation is available for developers:

High Level Design: a high level description of the different modules inside the library, with UML diagrams, use cases and interactions in common scenarios. API documentation: Doxygen-generated documentation from the header files of the library. Source code documentation: The source code of the library is documented to clarify structures, decisions and code constructs.

Automated testing The automated testing of Mbed TLS includes:

A test framework is included with the source code that contains over 5000 automated tests (based on the number of tests in version 1.3.2 of the library) to test for regressions and compatibility on different platforms. A compatibility script (compat.sh) that tests compatibility of SSL communication with OpenSSL and GnuTLS. A continuous integration system based on Travis CI and Jenkins.

Use Mbed TLS is used as the SSL component in large open source projects:

OpenVPN and OpenVPN-NL Hiawatha PowerDNS OpenWRT

Platforms Mbed TLS is currently available for most Operating Systems including Linux, Microsoft Windows, OS X, OpenWrt, Android, iOS, RISC OS and FreeRTOS. Chipsets supported at least include ARM, x86, PowerPC, MIPS.

Algorithms Mbed TLS supports a number of different cryptographic algorithms:

Cryptographic hash functions

MD2, MD4, MD5, RIPEMD160, SHA-1, SHA-2, SHA-3 MAC modes CMAC, HMAC Ciphers

AES, ARIA, Blowfish, Camellia, ChaCha, DES, RC4, Triple DES, XTEA Cipher modes ECB, CBC, CFB, CTR, OFB, XTS Authenticated encryption modes CCM, GCM, NIST Key Wrap, ChaCha20-Poly1305 Key derivation HKDF Key stretching PBKDF2, PKCS #5 PBE2, PKCS #12 key derivation Public-key cryptography

RSA, Diffie–Hellman key exchange, Elliptic curve cryptography (ECC), Elliptic curve Diffie–Hellman (ECDH), Elliptic Curve DSA (ECDSA), Elliptic curve J-PAKE

See also

Transport Layer Security Comparison of TLS implementations POSSE project GnuTLS Network Security Services wolfSSL (previously CyaSSL) MatrixSSL OpenSSL

References

External links Official website

Worked examples

Example 1 — a first encounter with Mbed TLS

Start with the simplest possible case. Write down what Mbed TLS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Mbed TLS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Mbed TLS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Mbed TLS

In research
Mbed TLS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Mbed TLS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Mbed TLS is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2009 software, C (programming language) libraries, Cryptographic software, so understanding it makes those chapters shorter.
In everyday life
Look for Mbed TLS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Mbed TLS” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Mbed TLS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Mbed TLS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Mbed TLS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Mbed TLS in simple terms?

Mbed TLS (previously PolarSSL) is an implementation of the TLS and SSL protocols and the respective cryptographic algorithms and support code required. It is distributed under the Apache License version 2.0.

Why does Mbed TLS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Mbed TLS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Mbed TLS.

Tags

  • 2009 software
  • C (programming language) libraries
  • Cryptographic software
  • Free security software
  • Transport Layer Security implementation

Keep exploring