--- Day changed Sun Jun 05 2016 02:03 -!- roconnor [~roconnor@host-104-157-228-32.dyn.295.ca] has quit [Ping timeout: 244 seconds] 03:53 -!- sipa_ [~pw@2a02:348:86:3011::1] has joined #secp256k1 03:53 -!- wumpus [~quassel@pdpc/supporter/professional/wumpus] has quit [Remote host closed the connection] 03:53 -!- Madars [~null@unaffiliated/madars] has quit [Ping timeout: 260 seconds] 03:53 -!- sipa [~pw@unaffiliated/sipa1024] has quit [Ping timeout: 260 seconds] 03:55 -!- Guest31006 [~null@contents-vnder-pressvre.mit.edu] has joined #secp256k1 03:55 -!- wumpus [~quassel@pdpc/supporter/professional/wumpus] has joined #secp256k1 06:10 -!- jtimon [~quassel@4.28.134.37.dynamic.jazztel.es] has joined #secp256k1 09:04 < andytoshi> hehe, i've actually encountered mathematicians who get upset at me for applying algebraic geometry to real life 09:04 < andytoshi> not so much for purity's sake but because there's a meme out there that "cryptography" means "war" 09:06 < andytoshi> are there patches out there that'll let me use libsecp without malloc/free? how about without abort/fprintf/stderr (i realize doing this would neuter all our ARG_CHECKS, but i'll be careful) 09:20 < andytoshi> oh the printf/abort stuff is only called from the error callbacks (and in CHECK, but as long as --with-bignum=no is set, is only ever called within #ifdef VERIFY). so that's trivial for me to patch out 09:21 < sipa_> you'll need a hardcoded context 09:21 < sipa_> if you have that, i think it's possible to not have any mallocs 09:25 < andytoshi> are there scripts floating around that'll build that for me? (it's not hard but i'm lazy) 09:26 < andytoshi> hmm, also i'm using the rangeproof_ stuff like in elements, it looks like there is an additional malloc in secp256k1_ge_set_all_gej_var that'll be ugly to remove 09:28 < andytoshi> the rangeproof stuff actually allocates in a few places .. it's ugly but conceptually easy enough to fix this, basically put a cap on nrings 09:32 < andytoshi> if i submitted a PR that replaced all the mallocs with kmalloc (and free with kfree, and did something with the abort()s) so that people could build kernel modules with libsecp, would that be accepted? 09:32 < andytoshi> i mean, under some configure flag 09:32 < andytoshi> that also disabled gmp 09:34 < andytoshi> the usecase here is for people doing HSM stuff with arm trustzone or similar processor security extension that allows executing crypto code in some secure element. on linux this generally requires being in kernel space 10:09 -!- roconnor [~roconnor@host-192.252-161-167.dyn.295.ca] has joined #secp256k1 11:52 -!- andytoshi [~andytoshi@wpsoftware.net] has quit [Changing host] 11:52 -!- andytoshi [~andytoshi@unaffiliated/andytoshi] has joined #secp256k1 12:06 -!- mdavid613 [~Adium@cpe-172-251-161-231.socal.res.rr.com] has joined #secp256k1 12:10 -!- roconnor [~roconnor@host-192.252-161-167.dyn.295.ca] has quit [Quit: Konversation terminated!] 12:24 -!- mdavid613 [~Adium@cpe-172-251-161-231.socal.res.rr.com] has quit [Quit: Leaving.] 14:15 < gmaxwell> andytoshi: we should make it so that it's very easy to replace any of those calls... not just kernels, it's needed in some testing enviroments. 14:16 < andytoshi> also i notice we have `#include ` and/or `#include ` in several files and these are almost never used .. git blame shows they've all just always been theer 14:16 < andytoshi> gmaxwell: so malloc is already easy cuz we have `checked_malloc`. i propose we rename to `secp256k1_malloc` and also have `secp256k1_free` 14:18 < gmaxwell> As an aside, why do we want libsecp in a kernel module? 14:20 < andytoshi> gmaxwell: i've got an HSM device here which has "arm trustzone" which basically splits the processor into "normal mode" and "secure mode". in secure mode you have a few kb of protected RAM. to switch modes you need kernel support 14:21 < andytoshi> the idea is, you write all your crypto code in a kernel module, bake your kernel in (well, bake in some signing keys), then you've basically got a TPM that loses all its keys when you drop power to it 14:23 < andytoshi> i don't think "we" (meaning the libsecp developers) have any use for it, but i'd like this to be easy for me to do without completely hacking the library to death 14:24 < gmaxwell> gotcha 14:30 -!- bustd_soket [weechat@gateway/vpn/mullvad/x-brnatwqcgsthocud] has quit [Ping timeout: 258 seconds] 14:44 -!- bustd_soket [weechat@gateway/vpn/mullvad/x-zasnpmyxzpdtwugs] has joined #secp256k1 14:44 -!- bustd_soket [weechat@gateway/vpn/mullvad/x-zasnpmyxzpdtwugs] has quit [Changing host] 14:44 -!- bustd_soket [weechat@unaffiliated/loteriety] has joined #secp256k1 14:44 -!- bustd_soket [weechat@unaffiliated/loteriety] has quit [Changing host] 14:44 -!- bustd_soket [weechat@gateway/vpn/mullvad/x-zasnpmyxzpdtwugs] has joined #secp256k1 22:16 -!- jtimon [~quassel@4.28.134.37.dynamic.jazztel.es] has quit [Ping timeout: 244 seconds]