--- Log opened Fri Jun 20 00:00:22 2025 10:50 < Ademan> GetKey::get_key() might be the only method to put the secp context *last* though, that's kinda weird, API appears to be 2+ years old and not used in bdk so maybe it could be changed? I know personally I always do (&self, &secp, any_other_context..., other_args...) 12:18 < andytoshi> Ademan: sometime soon TM we will get rid of all the secp contexts 12:19 < Ademan> andytoshi: hrm, by using a static context? I guess I don't know what the full implications of that are, whether that's desirable or not 12:19 < Ademan> wow that was good timing I haven't looked at this computer in hours heh 12:21 < Ademan> I guess why would anyone *not* use a static context if it's always desirable (and if it's not always desirable, does it really make sense to take away that option from library users?) 12:22 < andytoshi> Ademan: because right now we don't have a good way to rerandomize static contexts, at lesat in nostd 12:23 < andytoshi> so there is some defense-in-depth against sidechannel attacks which would be poorly implemented 12:23 < andytoshi> and we let the perfect be the enemy of the good 12:23 < andytoshi> and have delayed fixing the API for like 5 years because of this (which is not even an impossible problem, it's just hard because we gotta think about concurrency without mutex primitives) 15:06 < andytoshi> Ademan: ok, so i spent a couple hours working on this. it's a bit more than rerandomization. in fact we can't even construct a static context in nostd because there are some heavy-ish precomp tables we need 15:54 < Ademan> hrm, is that signalling "punt on this for another 5 years" ? ;-) 17:46 < andytoshi> Ademan: https://github.com/rust-bitcoin/rust-secp256k1/pull/806 17:46 < andytoshi> i did it :P 17:47 < andytoshi> i will say that, without a LLM to help me power through the "writers block" stages of that PR, it probably would be another 5 years.. 18:50 < Ademan> congrats! lol, when I was thinking about it a bit myself I was a bit dubious about spinlocking but I suppose it does work --- Log closed Sat Jun 21 00:00:22 2025