What do you give a bear that wants to fork SSL? Whatever it wants!

'BearSSL' strips crypto back to the bare metal


Into a world already crowded with big name alternatives to OpenSSL, an indy project could look like “yet another SSL implementation,” but Vulture South suspects there are good reasons to take a close look at the just-launched BearSSL.

One is that its author, Thomas Pornin, has ignored the kinds of legacy protocols that occupy too much of the OpenSSL developers' time. Hence, TLS from version 1.0 onwards is supported, but Pornin doesn't need to sweep out old SSL code, because there's none in there.

Another is that he's noticed the atrocious security problems that exist in the Internet of Things. Unlike LibreSSL or Google's BoringSSL, this is a BearSSL of very little brain.

It's been argued repeatedly that “things” aren't going to get decent security in their own right, because they're small and stupid.

BearSSL offers a counter-argument: while it's early days, one of Pornin's design targets is that the server implementation fits in 20 KB of compiled code and 25 KB of RAM. He particularly points to embedded systems and bootstrap code as suitable contexts for the implementation.

A much tougher ask for any software is that it be “secure by default”. Code-watchers will know how hard that is – Vulture South is still aware of only one “provably secure” micro-kernel, the seL4 project.

BearSSL isn't trying to go that far, but as well as the no-SSL rule, it also ignores RC4, RSA, MD5, while TLS 1.0, 3DES and RSA/SHA-1 are put at the bottom of its preference order.

“A facet of “safe by default” is the use of constant-time cryptographic implementations,” Pornin writes.

That's because a great many side-channel vulnerabilities in cryptography are down to timing attacks: measuring how long a processor takes to, for example, create a signature, and using that to make inferences about the algorithm.

Constant time implementations are needed all the way through the process, Pornin writes – hashing, symmetric encryption, asymmetric operations, CBC (cipher block chaining) and HMAC (keyed-hash message authentication code) handling.

Other key aspects of the version 0.1-level project are:

  • Static linking – “only algorithms that are actually used get pulled into the linked binary”, he writes;
  • A state-machine API – remember, this is designed for small-and-skinny environments, so BearSSL doesn't need callback functions for I/O.

One of the most common angles for vulnerabilities is memory leaks – buffer overruns/underruns, for example.

Since BearSSL has to be small, Pornin has decided to ignore malloc() and dynamic allocation entirely: “the whole of BearSSL requires only memcpy(), memmove(), memcmp() and strlen()” from the underlying C library, Pornin says.

Mainly, though, he skipped malloc() for a much more prosaic reason: it makes the program a lot smaller and portable right down to bare metal with no operating system.

Oh, and did we mention there's an OpenSSL patch coming Thursday, US time? That's all the group has said so far. ®

Similar topics

Narrower topics


Other stories you might like

  • US won’t prosecute ‘good faith’ security researchers under CFAA
    Well, that clears things up? Maybe not.

    The US Justice Department has directed prosecutors not to charge "good-faith security researchers" with violating the Computer Fraud and Abuse Act (CFAA) if their reasons for hacking are ethical — things like bug hunting, responsible vulnerability disclosure, or above-board penetration testing.

    Good-faith, according to the policy [PDF], means using a computer "solely for purposes of good-faith testing, investigation, and/or correction of a security flaw or vulnerability."

    Additionally, this activity must be "carried out in a manner designed to avoid any harm to individuals or the public, and where the information derived from the activity is used primarily to promote the security or safety of the class of devices, machines, or online services to which the accessed computer belongs, or those who use such devices, machines, or online services."

    Continue reading
  • Intel plans immersion lab to chill its power-hungry chips
    AI chips are sucking down 600W+ and the solution could be to drown them.

    Intel this week unveiled a $700 million sustainability initiative to try innovative liquid and immersion cooling technologies to the datacenter.

    The project will see Intel construct a 200,000-square-foot "mega lab" approximately 20 miles west of Portland at its Hillsboro campus, where the chipmaker will qualify, test, and demo its expansive — and power hungry — datacenter portfolio using a variety of cooling tech.

    Alongside the lab, the x86 giant unveiled an open reference design for immersion cooling systems for its chips that is being developed by Intel Taiwan. The chip giant is hoping to bring other Taiwanese manufacturers into the fold and it'll then be rolled out globally.

    Continue reading
  • US recovers a record $15m from the 3ve ad-fraud crew
    Swiss banks cough up around half of the proceeds of crime

    The US government has recovered over $15 million in proceeds from the 3ve digital advertising fraud operation that cost businesses more than $29 million for ads that were never viewed.

    "This forfeiture is the largest international cybercrime recovery in the history of the Eastern District of New York," US Attorney Breon Peace said in a statement

    The action, Peace added, "sends a powerful message to those involved in cyber fraud that there are no boundaries to prosecuting these bad actors and locating their ill-gotten assets wherever they are in the world."

    Continue reading

Biting the hand that feeds IT © 1998–2022