Bitcoin Forum
January 28, 2023, 03:24:52 AM *
News: Latest Bitcoin Core release: 24.0.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: secp256k1 not LGPLed unless GMP option is turned on  (Read 1415 times)
misterbigg (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001



View Profile
June 14, 2015, 01:32:12 PM
Last edit: June 14, 2015, 09:14:02 PM by misterbigg
 #1

I'm trying to build that great secp25k1 library (https://github.com/bitcoin/secp256k1) but it needs USE_NUM_GMP defined, and it has to link to GNU Multiprecision Library which is GPLv2? What's going on here?
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1674876292
Hero Member
*
Offline Offline

Posts: 1674876292

View Profile Personal Message (Offline)

Ignore
1674876292
Reply with quote  #2

1674876292
Report to moderator
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1120
Merit: 1113


View Profile
June 14, 2015, 02:03:59 PM
 #2

https://gmplib.org/

"Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2. These licenses make the library free to use, share, and improve, and allow you to pass on the result."

What version of GMP does it need?

misterbigg (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001



View Profile
June 14, 2015, 02:21:53 PM
 #3

Ah, I see. So Bitcoin links to GMP but doesn't include the sources? I'm not sure how I would make that work for my project. I was hoping that the secpk2561 library was self contained.

Realistically, would it be possible for me to provide the missing bignum routines using a boost::multiprecision implementation?
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 3836
Merit: 7254



View Profile
June 14, 2015, 05:43:52 PM
 #4

I'm trying to build that great secp25k1 library (https://github.com/bitcoin/secp256k1) but it needs USE_NUM_GMP defined, and it has to link to GNU Multiprecision Library which is GPLv2? What's going on here?
secp256k1 is self contained. GMP is optional. Releases of Bitcoin Core do not currently use GMP.

Libsecp256k1 is still unreleased experimental software. Our use of it in Bitcoin core is intentionally very narrow (only for signing, always checked against OpenSSL). I would not advise using it in a production consensus system currently. If you're interested in using it-- you could help support its maturation to full release by supporting review of the software.
misterbigg (OP)
Legendary
*
Offline Offline

Activity: 1064
Merit: 1001



View Profile
June 14, 2015, 06:31:03 PM
 #5

Oh! Well that's great news. I will study the sources more closely, I got a compile error from failing to define USE_NUM_GMP. I guess I should have tried defining USE_NUM_NONE. Will try again. Thanks for the heads up about the state of the code. We're already using OpenSSL so I think we can add a code path that does signature checking and signature generation using this secp256k1 library along side SSL for non-production builds, to compare the results. And we can likely review the code.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!