--- Log opened Thu Oct 18 00:00:40 2018 04:25 -!- ken2812221 [~ken281222@110.50.135.178] has joined #secp256k1 05:41 -!- klot [~klot@188.113.35.204] has joined #secp256k1 05:42 -!- klot [~klot@188.113.35.204] has quit [Remote host closed the connection] 05:42 -!- klot [~klot@188.113.35.204] has joined #secp256k1 05:43 -!- klot [~klot@188.113.35.204] has quit [Remote host closed the connection] 05:44 -!- klot [~klot@188.113.35.204] has joined #secp256k1 05:45 -!- klot [~klot@188.113.35.204] has quit [Remote host closed the connection] 05:45 -!- klot [~klot@188.113.35.204] has joined #secp256k1 12:05 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 12:10 -!- belcher [~belcher@unaffiliated/belcher] has joined #secp256k1 12:17 -!- belcher_ [~belcher@unaffiliated/belcher] has joined #secp256k1 12:18 -!- belcher [~belcher@unaffiliated/belcher] has quit [Ping timeout: 260 seconds] 15:29 -!- ddustin [40470882@gateway/web/freenode/ip.64.71.8.130] has joined #secp256k1 15:29 < ddustin> I'm trying to get the library smaller by 40KB. What is taking up all this space that I might be able to remove? 15:33 < ddustin> It seems odd the library would compile to something so huge 15:34 < sipa> there are large precomputed tables 15:37 < ddustin> Is there a way around using them? I wonder how mbed TLS manages to do it 15:37 < sipa> secp256k1 arithmetic can probably be implemented in a kilobyte of code if you don't care about performance 15:38 < sipa> but libsecp256k1 is a highly optimized library 15:38 < ddustin> Ah I'm seeing a constant 'USE_ECMULT_STATIC_PRECOMPUTATION' -- would turning that off disable it? 15:39 < sipa> it would reduce the binary size, not memory usage 15:39 < sipa> (it would instead be created at runtime) 15:40 < ddustin> Makes sense. Would it be created once and saved? 15:41 < andytoshi> to disable it use --enable-ecmult-static-precomputation=no rather than directly messing with that constant (though i guess it'd have the same effect) 15:41 < andytoshi> ddustin: it's created when you call secp256k1_context_create 15:41 < andytoshi> and will live as long as you hold onto the returned context object 15:41 < andytoshi> which should be destroyed with secp256k1_context_destroy when you're done with it 15:42 < andytoshi> as sipa says, you're just trading static memory for runtime/allocated memory here .. i don't believe we expose any way to shrink the precomp table 15:43 < gmaxwell> ddustin: What do you mean specifically by smaller than 40kb? 15:44 < gmaxwell> e.g. in embedded devices memory usage is critical, but size of the const static data is mostly irrelevant. 15:44 < gmaxwell> (a typical hardware wallet has 32kb ram, and 256KB flash) 15:48 < ddustin> gmaxwell: Yeah putting it in the flash probably makes sense 15:50 < ddustin> I'm just trying to get it to build at all at the moment, wrangling multiple build systems each with their own problems. Shrinking the build size will just get me to the next step more easily -- can come back and revisit a more effective solution later 16:05 -!- klot [~klot@188.113.35.204] has quit [Read error: Connection reset by peer] 16:21 -!- lzfernandes [~lzfernand@41.205.52.107] has joined #secp256k1 16:22 -!- ddustin [40470882@gateway/web/freenode/ip.64.71.8.130] has quit [Ping timeout: 256 seconds] 16:26 -!- lzfernandes [~lzfernand@41.205.52.107] has quit [Quit: Leaving] 18:06 -!- ken2812221 [~ken281222@110.50.135.178] has quit [Quit: Leaving] 18:12 -!- ddustin [40470882@gateway/web/freenode/ip.64.71.8.130] has joined #secp256k1 18:12 < ddustin> Hm, would it be possible to use just the ECDH and secp256k1_ec_pubkey_tweak_add parts of the library without the ECMULT precomputations? 18:14 < ddustin> Basically I've realized this chipset has hardware ECC that I should be using -- but I still need to do tweaks and diffie's. 18:37 -!- ddustin [40470882@gateway/web/freenode/ip.64.71.8.130] has quit [Ping timeout: 256 seconds] 18:37 -!- sipa [~pw@gateway/tor-sasl/sipa1024] has quit [Remote host closed the connection] 18:38 -!- sipa [~pw@gateway/tor-sasl/sipa1024] has joined #secp256k1 19:05 -!- lukedashjr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 19:06 -!- lukedashjr [~luke-jr@unaffiliated/luke-jr] has quit [Excess Flood] 19:07 -!- lukedashjr [~luke-jr@unaffiliated/luke-jr] has joined #secp256k1 19:09 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has quit [Ping timeout: 250 seconds] 19:11 -!- lukedashjr is now known as luke-jr 19:39 < andytoshi> ECDH, yes 19:40 < andytoshi> but tweak_add uses the ecumlt precomp --- Log closed Fri Oct 19 00:00:41 2018