Live data from Hacker News

BearSSL – Smaller SSL/TLS

bearssl.org

131–140 of 206 posts

Re: BearSSL – Smaller SSL/TLS

#131

Earlier quoted context omitted.

So you're pretty much out of luck if you want to visit a page that contains some analysis?

Well, presumably, if the author's last name is Porn in and your spam filter is pretty basic (or overzealous).

I wonder how it would cope with Scunthorpe

Re: BearSSL – Smaller SSL/TLS

#132

Oh man, can't wait for the docs. TLS 1.2 on an ESP8266 would make it possible to use them with AWS IoT.

From what I understand, you can use them already with AWS IoT but I'm not sure if this solution is ideal or secure enough. Haven't used it personally but it's there:

https://github.com/SuperHouse/esp-open-rtos/blob/master/exam...

Re: BearSSL – Smaller SSL/TLS

#133

Earlier quoted context omitted.

So you're pretty much out of luck if you want to visit a page that contains some analysis?

Well, presumably, if the author's last name is Porn in and your spam filter is pretty basic (or overzealous).

"contains some analysis"

Re: BearSSL – Smaller SSL/TLS

#134

Earlier quoted context omitted.

A lot of people are arguing that new projects like this should use Rust. Like https://github.com/ctz/rustls .

Rust can't target the same platforms C can. Rust is also (generally) more memory intensive than C for similar programs. This makes its use in embedded situations a non-starter (at least for now).

> Rust can't target the same platforms C can.

I keep seeing this argument, but nobody actually names those platforms. Name one platform you need to run a TLS stack on that LLVM doesn't have support for.

> Rust is also (generally) more memory intensive than C for similar programs

[citation needed]

Re: BearSSL – Smaller SSL/TLS

#135

Earlier quoted context omitted.

A lot of people are arguing that new projects like this should use Rust. Like https://github.com/ctz/rustls .

Only because they don't know Ada and they wanna reinvent the wheel again /s

As soon as you call (the equivalent of) malloc/free in Ada you either need a GC or you're in undefined behavior land. In Rust, that is not true.

Obviously, being able to call malloc without a GC is a nice to have for TLS on embedded systems.

Re: BearSSL – Smaller SSL/TLS

#136
post #14

The last thing the world needs is another immature SSL/TLS implementation however this makes it very interesting: > No dynamic allocation whatsoever. There is not a single malloc() call in all the library. In fact, the whole of BearSSL requires only memcpy(), memmove(), memcmp() and strlen() from the underlying C library. This makes it utterly portable even in the most special, OS-less situations. (On “big” systems,…

> The last thing the world needs is another immature SSL/TLS implementation...

No, they world needs as many of those as it can get (if they are tagged as such). And then all the authors need to discuss with each other what they learned from the implementation. And then they compare their code with existing code bases and discuss differences. They review their patches, as well as patches from other projects.

They discuss the diffs, learn from others and bring in new ways too look at things.

All bugs are shallow given enough eyes, and yet one of our biggest mantra's sole purpose is to limit the number of eyes. We need people that are familiar with crypto codebases and its subtleties, because we need the reviewers for our established projects. And for this reason, we need people to write and publish crypto related code. Not so we can push another new, excitingly half-baked TLS stacks into a product, but to foster the code review process we all rely on.

Re: BearSSL – Smaller SSL/TLS

#137
post #55
post #14

The last thing the world needs is another immature SSL/TLS implementation however this makes it very interesting: > No dynamic allocation whatsoever. There is not a single malloc() call in all the library. In fact, the whole of BearSSL requires only memcpy(), memmove(), memcmp() and strlen() from the underlying C library. This makes it utterly portable even in the most special, OS-less situations. (On “big” systems,…

Is there any evidence that memcpy/memmove outperform malloc?

That question doesn't make any sense. They don't do the same thing, so you can't compare their relative performance. What's faster: an Intel i7 or a BMW i8?

Malloc is potentially troublesome for two reasons. First, its performance is potentially unpredictable. It depends on the current state of the heap at the time of the call, which you can't know in advance except in some very rare situations. It can also fail entirely, and that is likewise unpredictable.

memcpy and memmove, ultimately being byte-copying loops, don't suffer from these problems. Their performance is consistent and they always succeed if your pointers and lengths are valid.

On PCs these days, the troubles of malloc don't matter much. You have so much performance margin that occasional slow calls don't matter, and virtual memory with a big address space means that it almost never fails. If it does fail, it's OK if the program crashes and you have to restart it. But many systems are much more constrained.

Re: BearSSL – Smaller SSL/TLS

#139
post #94
post #14

The last thing the world needs is another immature SSL/TLS implementation however this makes it very interesting: > No dynamic allocation whatsoever. There is not a single malloc() call in all the library. In fact, the whole of BearSSL requires only memcpy(), memmove(), memcmp() and strlen() from the underlying C library. This makes it utterly portable even in the most special, OS-less situations. (On “big” systems,…

"The last thing the world needs is another immature SSL/TLS implementation" Are you saying we should live forever with the established SSL libraries? The only way software can mature, is to write it, release it, ship it, fix it, repeat.

Implying you have the resources to do so correctly. Which was the issue with OpenSSL.

Completely unrelated but:

https://tls.mbed.org/

Another small footprint ssl/tls library, very readable code and a pleasure to work with.

Post reply on HN