Hacker News new | ask | show | jobs
by protanopia 2321 days ago
Why was BoringSSL chosen as the backend? According to Google,

> Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.

https://boringssl.googlesource.com/boringssl/

2 comments

Did you read the line underneath?

> Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.

Sounds like its just a strong warning that they'll change their APIs when they want (in the name of security). Not that it isn't production ready.

Which is why, they're vendoring a copy of BoringSSL. The readme on their git repo[1] clearly states this.

[1]: https://github.com/apple/swift-crypto

That allows them to avoid the problem, but why introduce the problem in the first place? Why not use something that is intended to be used as a crypto library?
They had an existing API to comply with[1]. NaCl's API doesn't cover everything they need. Their choices were down to 1. Use OpenSSL (or a fork of it, which BoringSSL is) 2. Roll their own crypto. They chose #1 on all other platforms and stayed with #2 on the platforms they control (I might be mistaken here, perhaps they wrap some OpenSSL derivative on their own platforms too). And that in my opinion is a reasonable choice, given the constraints.

[1]: https://developer.apple.com/documentation/cryptokit