bitcoin-core/secp256k1` vs `bitcoin/src/secp256k1` - what to use?

Cristian

New member
There are two secp256k1 implementations that are related to Bitcoin-Core:

https://github.com/bitcoin-core/secp256k1

https://github.com/bitcoin/bitcoin/tree/master/src/secp256k1

What is the more authoritative implementation? What secp256k1 library should be used?
It seems like https://github.com/bitcoin/bitcoin/tree/master/src/secp256k1 is a subtree of the standalone bitcoin-core/secp256k1 repo. I would use bitcoin-core/secp256k1, it looks like libbtcoin forked it and it looks more up to date than the official bitcoin repo.

If you want to check for yourself, just look through this recent commit log
https://github.com/bitcoin/bitcoin/commit/8903a1a0a78a705402123d2a5c465217cb9d791c
and compare the files to bitcoin-core/secp256k1, you'll see it's the same.
 

Kairo

New member
both of them are the same exact thing developed and maintained by pretty much same exact people (see contributors). the difference is that it is worked on under bitcoin-core github account and in a separate repository and the stable versions are pulled to bitcoin account in bitcoin/bitcoin repository.

the benefit is that if a developer wanted to use libsecp256k1 in their project they don't have to download the much bigger project (bitcoin core) and extract the libsecp256k1 from it. they can easily download a standalone repository and compile that without having to remove the extra parts (bitcoin core related parts).
 
Top