--- Day changed Tue Aug 07 2018 00:01 -!- wizonesolutions5 [~wizonesol@nz3l200.bb60246.ctm.net] has joined #secp256k1 00:06 -!- wizonesolutions5 [~wizonesol@nz3l200.bb60246.ctm.net] has quit [Ping timeout: 244 seconds] 00:50 -!- Alina-malina6 [~Alina-mal@121.130.244.30] has joined #secp256k1 00:50 -!- Alina-malina6 [~Alina-mal@121.130.244.30] has quit [Remote host closed the connection] 01:15 -!- prettymuchbryce2 [~prettymuc@110.77.251.8] has joined #secp256k1 01:21 -!- prettymuchbryce2 [~prettymuc@110.77.251.8] has quit [Ping timeout: 244 seconds] 01:24 -!- WSPR26 [~WSPR@185.129.118.112] has joined #secp256k1 01:25 -!- WSPR26 [~WSPR@185.129.118.112] has quit [K-Lined] 02:17 -!- Alistair9 [~Alistair@177.20.210.250] has joined #secp256k1 02:24 -!- Alistair9 [~Alistair@177.20.210.250] has quit [Ping timeout: 260 seconds] 03:06 -!- mdroid [~mdroid@p836067-ipngn200902tokaisakaetozai.aichi.ocn.ne.jp] has joined #secp256k1 03:06 -!- mdroid [~mdroid@p836067-ipngn200902tokaisakaetozai.aichi.ocn.ne.jp] has quit [Killed (Sigyn (Spam is off topic on freenode.))] 03:09 -!- abian15 [~abian@110.77.182.69] has joined #secp256k1 03:10 -!- abian15 [~abian@110.77.182.69] has quit [K-Lined] 03:19 -!- BackUP22 [~BackUP@42.113.112.167] has joined #secp256k1 03:19 -!- BackUP22 [~BackUP@42.113.112.167] has quit [Remote host closed the connection] 05:05 -!- wget18 [~wget@184.170.14.52] has joined #secp256k1 05:05 -!- wget18 [~wget@184.170.14.52] has quit [K-Lined] 05:45 -!- Silversword27 [~Silverswo@190-199-237-134.dyn.dsl.cantv.net] has joined #secp256k1 05:46 -!- Silversword27 [~Silverswo@190-199-237-134.dyn.dsl.cantv.net] has quit [Remote host closed the connection] 05:49 -!- maaku_ [~maaku@173.234.25.100] has joined #secp256k1 05:51 -!- maaku [~maaku@173.234.25.100] has quit [Remote host closed the connection] 06:03 -!- exio48 [~exio4@190-199-237-134.dyn.dsl.cantv.net] has joined #secp256k1 06:03 -!- exio48 [~exio4@190-199-237-134.dyn.dsl.cantv.net] has quit [Remote host closed the connection] 06:09 -!- Guest56166 [~hook54321@168-205-38-72.wantel.net.br] has joined #secp256k1 06:09 -!- Guest56166 [~hook54321@168-205-38-72.wantel.net.br] has quit [Remote host closed the connection] 06:53 -!- OwenBarfield [~OwenBarfi@cpc121914-telf14-2-0-cust136.16-1.cable.virginm.net] has joined #secp256k1 06:54 -!- OwenBarfield [~OwenBarfi@cpc121914-telf14-2-0-cust136.16-1.cable.virginm.net] has quit [Remote host closed the connection] 07:22 -!- Dave18 [~Dave@186.14.245.50] has joined #secp256k1 07:23 -!- Dave18 [~Dave@186.14.245.50] has quit [Remote host closed the connection] 07:54 -!- brykr8 [~brykr@200.71.95.214] has joined #secp256k1 07:59 -!- trobotham19 [~trobotham@179.52.139.12] has joined #secp256k1 08:00 -!- brykr8 [~brykr@200.71.95.214] has quit [Ping timeout: 260 seconds] 08:04 -!- trobotham19 [~trobotham@179.52.139.12] has quit [Ping timeout: 240 seconds] 08:09 -!- sockspls1 [~sockspls@bb119-74-35-12.singnet.com.sg] has joined #secp256k1 08:10 -!- sockspls1 [~sockspls@bb119-74-35-12.singnet.com.sg] has quit [Remote host closed the connection] 09:03 -!- Guest84006 [~dlcastc@node-ssw.pool-118-173.dynamic.totbb.net] has joined #secp256k1 09:08 -!- Guest84006 [~dlcastc@node-ssw.pool-118-173.dynamic.totbb.net] has quit [Ping timeout: 244 seconds] 09:43 -!- Guest79333 [~Guest7933@118.176.120.104] has joined #secp256k1 09:44 -!- Guest79333 [~Guest7933@118.176.120.104] has quit [Killed (Unit193 (Spam is not permitted on freenode.))] 10:33 -!- developers [~developer@60.174.118.80] has joined #secp256k1 10:39 -!- developers [~developer@60.174.118.80] has quit [Ping timeout: 244 seconds] 11:11 -!- deusexbeer [~deusexbee@079-170-138-109-dynamic-pool-adsl.wbt.ru] has quit [Ping timeout: 256 seconds] 11:12 -!- deusexbeer [~deusexbee@080-250-078-032-dynamic-pool-adsl.wbt.ru] has joined #secp256k1 11:14 -!- agris_ [~agris@gateway/tor-sasl/agris] has quit [Remote host closed the connection] 11:14 -!- agris_ [~agris@gateway/tor-sasl/agris] has joined #secp256k1 11:47 -!- deusexbeer [~deusexbee@080-250-078-032-dynamic-pool-adsl.wbt.ru] has quit [Quit: Konversation terminated!] 11:49 -!- Corvus`10 [~Corvus`@ip72-200-142-147.ri.ri.cox.net] has joined #secp256k1 11:51 -!- Corvus`10 [~Corvus`@ip72-200-142-147.ri.ri.cox.net] has quit [Remote host closed the connection] 12:38 < roconnor> I kinda wish there were a secp256k1_gej_set_ge_var function. 12:40 -!- ken2812221 [~User@1.200.203.30] has quit [Read error: Connection reset by peer] 12:41 <@gmaxwell> roconnor: Huh? What useful thing would you do in variable time there? 12:42 < roconnor> if a->infinity then return early. 12:44 <@gmaxwell> that would almost certantly be slower 12:44 < roconnor> slower than copying 30 32-bit integers? 12:47 <@gmaxwell> A branch misprediction? yes. 12:47 <@gmaxwell> http://ithare.com/infographics-operation-costs-in-cpu-clock-cycles/ 12:48 <@gmaxwell> roconnor: you could change it to do so and benchmark, if it were faster it would be easy to duplicate the function and make the var callers call the right one. 12:48 <@gmaxwell> But I would be pretty surprised if it were faster. 12:48 < roconnor> I see. 12:50 -!- ken2812221 [~User@1.200.203.30] has joined #secp256k1 12:52 -!- d10n18 [~d10n@2.190.203.86] has joined #secp256k1 12:58 -!- d10n18 [~d10n@2.190.203.86] has quit [Ping timeout: 256 seconds] 12:58 < roconnor> in C, is it defined behaviour to assign an uninitialized value to another variable? 13:08 <@gmaxwell> I believe it's technically undefined, because uninitialized data could have trapping values. 13:12 < roconnor> I see. So all these r values passed to gej functions need to be initialized. 13:13 < roconnor> gej/ge functions 13:15 < roconnor> lest one of these fuction only sets the infinity flag and you end up passing the result into a funciton like secp256k1_gej_set_ge that blindly copies that value. 13:16 <@gmaxwell> Then I think thats technically not proper. Someone should double check my belief on assignment. 13:17 < roconnor> ecmult_impl.h is full of tempory values that are uninitalized being passed as r values everywhere. Which is a bit worrying. 13:18 -!- jack321 [~jack3@190-201-172-252.dyn.dsl.cantv.net] has joined #secp256k1 13:18 < roconnor> gmaxwell: BTW, you claim about trap values is the same as my understanding but I'm definitely not a C expert! 13:20 < roconnor> I think there is a moderately high chance we have undefined behaviour lurking within secp256k1_gej_set_ge. 13:20 -!- jack321 [~jack3@190-201-172-252.dyn.dsl.cantv.net] has quit [Read error: Connection reset by peer] 13:22 < roconnor> (and similar functions) 13:24 <@gmaxwell> in practice we don't run on platforms with trapping values, and those struct assignments turn into memcpys that are safe regardless. So even if so, it's an issue of being formally correct (which we should be) rather than a pratical issue. 13:26 < roconnor> I'm not really worry about existing deployments. I am a little worried about an even fancier version of GCC in the future. 13:27 < roconnor> I also don't have any particular codepath that exibits a copy of uninitialized memory on hand at the moment. 13:33 < roconnor> according to a paywalled ACM article on "Uninitalized reads": ``If a stored value of an object has a trap representation and is read by an lvalue expression that does not have character type, the behavior is undefined. '' 13:33 < roconnor> ``Consequently, an automatic variable can be assigned a trap representation without causing undefined behavior, but the value of the variable cannot be read until a proper value is stored in it.'' 13:34 < roconnor> So, it sounds to me like assignments of trap values are well-defined! 13:34 < roconnor> horray! 13:34 <@gmaxwell> in practice basically everything is full of unchecked assignments 13:34 <@gmaxwell> so good if its okay then. :) 13:37 < roconnor> oh wait it goes on :( 13:38 < roconnor> ``The value of an object with automatic storage duration is used while it is indeterminate [is undefined behavour].'' 13:40 < roconnor> Okay I take it back I have no idea whether this is well defined or not. 13:41 < roconnor> apparently Itanium CPUs have this NaT (Not a Thing) flag that could maybe tickle this sort of issue. 13:41 < roconnor> \me sobs 13:57 <@gmaxwell> right, itanium is the only hardware that I've actually programmed in C on that has trapping values. 13:59 < roconnor> Do we compile libsecp256k1 for IA-64? 14:09 <@gmaxwell> No. 14:10 <@gmaxwell> It would work in any case, assignment copying of uninitilized values is done by *. 14:11 <@gmaxwell> I have an ia64 system in a box someplace, but the prospect of bringing it up again fills me with dread. I lost a week of time every prior time I've brought it up. :P 14:15 < roconnor> assignment copying as in https://github.com/bitcoin-core/secp256k1/blob/452d8e4d2a2f9f1b5be6b02e18f1ba102e5ca0b4/src/group_impl.h#L381 ? 14:15 < roconnor> ah but that is past the a->infinity check. ... clever! 14:39 -!- insidious16 [~insidious@168.232.131.45] has joined #secp256k1 14:39 -!- insidious16 [~insidious@168.232.131.45] has quit [K-Lined] 14:42 -!- keithn15 [~keithn@41.42.20.221] has joined #secp256k1 14:46 -!- keithn15 [~keithn@41.42.20.221] has quit [Ping timeout: 244 seconds] 15:02 -!- Comstock_ [~Comstock_@p799145-ipbf401fukuhanazo.fukushima.ocn.ne.jp] has joined #secp256k1 15:02 -!- Comstock_ [~Comstock_@p799145-ipbf401fukuhanazo.fukushima.ocn.ne.jp] has quit [Remote host closed the connection] 15:13 -!- xboner [~xboner@125.132.13.29] has joined #secp256k1 15:14 -!- xboner [~xboner@125.132.13.29] has quit [Remote host closed the connection] 15:32 -!- deusexbeer [~deusexbee@080-250-078-032-dynamic-pool-adsl.wbt.ru] has joined #secp256k1 17:17 -!- krushia [~krushia@187.69.8.241] has joined #secp256k1 17:18 -!- krushia [~krushia@187.69.8.241] has quit [Remote host closed the connection] 19:27 -!- and [~and@187.110.233.253] has joined #secp256k1 19:32 -!- and [~and@187.110.233.253] has quit [Ping timeout: 260 seconds] 19:49 -!- MillerBoss2 [~MillerBos@201.250.207.133] has joined #secp256k1 19:50 -!- MillerBoss2 [~MillerBos@201.250.207.133] has quit [Remote host closed the connection] 21:05 < roconnor> https://github.com/bitcoin-core/secp256k1/blob/452d8e4d2a2f9f1b5be6b02e18f1ba102e5ca0b4/src/ecmult_impl.h#L545-L549 21:05 < roconnor> here the point variable is uninitialized. 21:06 < roconnor> if the callback only sets the infinity flag to point and doesn't initialize the other files, then the secp256k1_gej_set_ge will copy uninitialized memory. 21:07 < roconnor> I suppose there might just be a precondition that the callback must initialize all the fields. 21:17 -!- arubi [~ese168@gateway/tor-sasl/ese168] has quit [Ping timeout: 250 seconds] 21:18 -!- arubi [~ese168@gateway/tor-sasl/ese168] has joined #secp256k1 21:23 -!- Colti26 [~Colti@2.50.132.161] has joined #secp256k1 21:24 -!- Colti26 [~Colti@2.50.132.161] has quit [Remote host closed the connection] 22:04 -!- SiLuman6 [~SiLuman@softbank126200170251.bbtec.net] has joined #secp256k1 22:04 -!- SiLuman6 [~SiLuman@softbank126200170251.bbtec.net] has quit [Remote host closed the connection] 23:09 -!- ensyde [~ensyde@203.110.92.150] has joined #secp256k1 23:10 -!- ensyde [~ensyde@203.110.92.150] has quit [Killed (Unit193 (Spam is not permitted on freenode.))]