News for hackers. Stuff that matters.
Re:BoringSSL by mike_hearn on Tuesday October 20, 2015 @01:59PM (#10420696)
Reviewing and improving literally every function in OpenSSL one at a time is a truly heroic effort.

A part of me regrets that so much time and skill is being sunk into a swamp like OpenSSL though. Surely by now it'd have been easier for Google to produce a much more modern C++ based SSL toolkit that doesn't have this ridiculous litany of problems to resolve? An OpenSSL API emulation could then have been layered on top. I realise a lot of C/C++ apps rely on the OpenSSL API, but I hope one day the industry finds a way to rip off the sticking plaster.

Re:BoringSSL by masklinn on Tuesday October 20, 2015 @02:39PM (#10420919)
> An OpenSSL API emulation could then have been layered on top.

Not really. OpenSSL exposes "internal" data structures in its API, leaking e.g. x.509 datastructures through[0]. The only way to expose an OpenSSL API emulation is to be OpenSSL.

That's why the libressl project started libtls[1] (née ReSSL) as a clean-slate abstracted API.

[0] http://www.tedunangst.com/flak/post/goreSSL

[1] http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/...

Re:BoringSSL by wnoise on Tuesday October 20, 2015 @05:12PM (#10421843)
Oh thank goodness someone is making a saner API.
Re:BoringSSL by sbierwagen on Tuesday October 20, 2015 @02:17PM (#10420802)

  An OpenSSL API emulation could then have been layered on top.
I feel like a full OpenSSL API emulator (With ABI!) would be about as big as OpenSSL itself.
Re:BoringSSL by chris_wot on Tuesday October 20, 2015 @02:31PM (#10420874)
Not necessarily. A complete rewrite can often introduce more bugs than are solved. There's lots wrong with OpenSSL, but there's also a lot it does correctly.

Refactoring code like this is actually a good way of doing things!

Re:BoringSSL by AnthonyMouse on Tuesday October 20, 2015 @08:24PM (#10422815)
> An OpenSSL API emulation could then have been layered on top.

A major problem with OpenSSL is the API. It's hard to use correctly and encourages bad code. Effort would be much better spent transitioning applications away from that API than trying to emulate it.

Re:BoringSSL by swsieber on Tuesday October 20, 2015 @02:19PM (#10420808)
I feel like this would actually be a good project for a rust re-write. I like to think of rust as c or c++ except with memory "static type-checking". That seems like a huge incentive.
Re:BoringSSL by dyladan on Tuesday October 20, 2015 @04:31PM (#10421617)
It's difficult/impossible to write constant time functions in rust in it's current state afaik.
Re:BoringSSL by viraptor on Tuesday October 20, 2015 @09:12PM (#10422965)
Could you link something relevant? I find it hard to believe - seems you could do it the same way every other language does. For example OR all the bytes XORed between two arrays, then compare to 0.

Maidsafe seems to be implementing it somehow for example: http://maidsafe.net/sodiumoxide/master/maidsafe_sodiumoxide/... (see comments about PartialEq)

Re:BoringSSL by swsieber on Tuesday October 20, 2015 @07:08PM (#10422488)
I did not realize that; looking things up I can verify your claim. There is an RFC out there for the ability to write constant time functions. That would be great and I hope it makes it in. Thanks for informing me.
Re:BoringSSL by arielby on Tuesday October 20, 2015 @05:41PM (#10422006)
Not more difficult than C - you write the crypto functions in asm. You could use a C compiler to handle the ABI but the code isn't really C code.
Re:BoringSSL by MichaelGG on Tuesday October 20, 2015 @05:53PM (#10422074)
How much code needs to be constant time? Compared to all the management code and parsing and so on?