--- Log opened Sun Mar 13 00:00:26 2022 10:50 < jeremyrubin> i'm trying to implemen t lloyd's DLC ctv construct w/ taproot and I'm struggling a bit with the XONLY API for things... 10:50 < jeremyrubin> for the protocol you need to add 1 to a base key repeatedly 10:50 < jeremyrubin> (which is an XOnly) 10:51 < jeremyrubin> and then also use a combine to add two keys together directly 10:51 < jeremyrubin> it seems there is not an API for adding XOnly's together? 10:52 < jeremyrubin> Would the right thing to do be to use the PublicKey and then do to_x_only later? 10:52 < jeremyrubin> (have to afk for now, woops, will be back later) 10:56 < andytoshi> there is no "right way" to implement a novel crypto protocol using only the rust-secp public API, which is designed to make this hard to do 10:57 < andytoshi> but yes, avoiding xonly til the last moment will probably be the best way to do it 10:57 < andytoshi> and using the combine_key method, which we accidentally added and then couldn't remove due to people immediately rolling their own crypto with it.. 10:58 < andytoshi> but i would suggest that adding 1 repeatedly does not sound very efficient .. if you need to grind through keys deterministically it would be better to double repeatedly and/or use the endomorphism optimization 14:47 < jeremyrubin> andytoshi: the thing you want to compute is X + iG for i = 1...N which represents the N different prices the DLC can be at 14:48 < jeremyrubin> it would be nice to have some form of rust-secp in between ffi::* and "no footguns" 15:09 -!- greypw254 [~greypw2@grey.pw] has quit [Quit: I'll be back!] 15:09 -!- greypw254 [~greypw254@grey.pw] has joined #bitcoin-rust 15:11 -!- greypw254 [~greypw254@grey.pw] has quit [Client Quit] 15:12 -!- greypw254 [~greypw254@grey.pw] has joined #bitcoin-rust --- Log closed Mon Mar 14 00:00:26 2022