Discussion:
[bitcoin-dev] What is OpenSSL still used for?
Andrew C via bitcoin-dev
2016-01-19 01:39:19 UTC
Permalink
In the release notes for 0.12, it says that we have moved from using
OpenSSL to libsecp256k1 for signature validation. So what else is it being
used for that we need to keep it as a dependency?

Thanks,
Andrew
Ethan Heilman via bitcoin-dev
2016-01-19 03:58:22 UTC
Permalink
I believe libsecp256k1 just performs Elliptic Curve operations
required by Bitcoin. OpenSSL is used for all other crypto.

For instance the PRNG appears to be OpenSSL:
https://github.com/bitcoin/bitcoin/blob/master/src/random.h


On Mon, Jan 18, 2016 at 8:39 PM, Andrew C via bitcoin-dev
In the release notes for 0.12, it says that we have moved from using OpenSSL
to libsecp256k1 for signature validation. So what else is it being used for
that we need to keep it as a dependency?
Thanks,
Andrew
_______________________________________________
bitcoin-dev mailing list
https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev
Douglas Roark via bitcoin-dev
2016-01-21 02:57:23 UTC
Permalink
Post by Ethan Heilman via bitcoin-dev
I believe libsecp256k1 just performs Elliptic Curve operations
required by Bitcoin. OpenSSL is used for all other crypto.
The exact answer, as I understand it, is a bit more nuanced. In
particular, you referenced the PRNG. I believe libsecp256k1, as
currently written, relies on an implementation of RFC 6979 instead of
using a PRNG. I'm guessing this is done for portability reasons (no
need to hook into the OS's RNG).

Otherwise, yes, I believe this answer is basically correct. There are
still some crypto functions not covered by libsecp256k1, at least at
the API level. But, for consensus-critical functionality, I think 0.12
will be rid of OpenSSL.

- --
- ---
Douglas Roark
Cryptocurrency, network security, travel, and art.
https://onename.com/droark
***@vt.edu
PGP key ID: 26623924
Jonas Schnelli via bitcoin-dev
2016-01-21 07:42:56 UTC
Permalink
Hi Andrew
Post by Andrew C via bitcoin-dev
In the release notes for 0.12, it says that we have moved from
using OpenSSL to libsecp256k1 for signature validation. So what
else is it being used for that we need to keep it as a dependency?
Openssl was dropped from the consensus layer (ECC) in 0.12, though, it
still used for...

1) ... getting random numbers (randomize the ECC signing context)
2) [wallet only] ... AES256 encryption of private keys
3) [GUI only] ... SSL/X.509 for BIP70 (payment protocol)

Openssl dependency for 1) and 2) could be removed. There are some –
outdated – relevant PRs:

Entropy: https://github.com/bitcoin/bitcoin/pull/5885
AES: https://github.com/bitcoin/bitcoin/pull/5949

I guess for point 3) [BIP70] it makes sense to keep openssl.

/jonas
Wladimir J. van der Laan via bitcoin-dev
2016-01-25 11:58:29 UTC
Permalink
Post by Jonas Schnelli via bitcoin-dev
Post by Andrew C via bitcoin-dev
In the release notes for 0.12, it says that we have moved from
using OpenSSL to libsecp256k1 for signature validation. So what
else is it being used for that we need to keep it as a dependency?
Openssl was dropped from the consensus layer (ECC) in 0.12, though, it
still used for...
1) ... getting random numbers (randomize the ECC signing context)
2) [wallet only] ... AES256 encryption of private keys
3) [GUI only] ... SSL/X.509 for BIP70 (payment protocol)
Openssl dependency for 1) and 2) could be removed. There are some –
Entropy: https://github.com/bitcoin/bitcoin/pull/5885
AES: https://github.com/bitcoin/bitcoin/pull/5949
I guess for point 3) [BIP70] it makes sense to keep openssl.
Exactly - the plan is that OpenSSL will, in due time, be a dependency only if the
GUI is enabled. Most of the work for that is already done but it has to be made
up to date and carefully tested and integrated.

Wladimir

Continue reading on narkive:
Loading...