--- Log opened Thu Jun 18 00:00:19 2020 --- Day changed Thu Jun 18 2020 00:00 -!- randyb__ [~randyb@112.198.68.243] has quit [Ping timeout: 246 seconds] 00:14 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 00:15 -!- randyb [~randyb@112.198.68.243] has quit [Remote host closed the connection] 00:42 -!- CubicEarth [~CubicEart@c-67-168-1-172.hsd1.wa.comcast.net] has quit [Ping timeout: 272 seconds] 00:43 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has quit [Ping timeout: 240 seconds] 00:45 -!- CubicEarth [~CubicEart@c-67-168-1-172.hsd1.wa.comcast.net] has joined #rust-bitcoin 02:40 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 02:45 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has joined #rust-bitcoin 02:47 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 256 seconds] 02:49 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 02:51 -!- randyb_ [~randyb@112.198.68.243] has joined #rust-bitcoin 02:53 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 256 seconds] 02:58 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 02:58 -!- randyb_ [~randyb@112.198.68.243] has quit [Ping timeout: 260 seconds] 03:04 -!- Sasha57Parisian [~Sasha57Pa@static.57.1.216.95.clients.your-server.de] has joined #rust-bitcoin 03:04 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has joined #rust-bitcoin 03:17 -!- belcher [~belcher@unaffiliated/belcher] has joined #rust-bitcoin 03:26 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 03:34 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has joined #rust-bitcoin 03:37 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 03:41 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 246 seconds] 03:43 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 03:47 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 240 seconds] 03:48 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 03:49 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has joined #rust-bitcoin 03:53 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 258 seconds] 03:54 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 03:59 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 264 seconds] 04:00 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 04:04 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 265 seconds] 04:05 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 04:10 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 260 seconds] 04:12 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 04:18 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has quit [Remote host closed the connection] 04:18 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 260 seconds] 04:20 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 04:24 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 260 seconds] 04:25 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 04:26 -!- randyb [~randyb@112.198.68.243] has quit [Client Quit] 04:39 < stevenroose> sgeisler: any chance you are interested in looking at the bip39 implementation I posted earlier? I think you were one of the people that mentioned it would be good to have a bip39 impl in rust-bitcoin. 05:08 -!- Sasha57Parisian [~Sasha57Pa@static.57.1.216.95.clients.your-server.de] has quit [Ping timeout: 256 seconds] 05:22 -!- jonatack [~jon@2a01:e0a:53c:a200:bb54:3be5:c3d0:9ce5] has quit [Ping timeout: 272 seconds] 05:24 -!- jonatack [~jon@184.75.221.35] has joined #rust-bitcoin 06:28 -!- Kiminuo [~mix@185.156.174.4] has quit [Ping timeout: 265 seconds] 06:28 -!- randyb [~randyb@112.198.68.243] has joined #rust-bitcoin 06:32 -!- randyb [~randyb@112.198.68.243] has quit [Ping timeout: 258 seconds] 06:37 -!- Kiminuo [~mix@185.156.174.4] has joined #rust-bitcoin 07:14 -!- Kiminuo [~mix@185.156.174.4] has quit [Ping timeout: 264 seconds] 07:56 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 08:02 -!- dr-orlovsky [~dr-orlovs@xdsl-188-154-186-21.adslplus.ch] has joined #rust-bitcoin 09:15 < yancy> stevenroose, I've been reading over your implentation as well. 09:34 < stevenroose> yancy: ah cool, thanks! 09:40 -!- Kiminuo [~mix@185.156.174.4] has joined #rust-bitcoin 10:11 -!- Dean_Guss [~dean@gateway/tor-sasl/deanguss] has joined #rust-bitcoin 10:31 < sgeisler> stevenroose: Nice, looking into it! Given that you'd normally decode exactly one mnemonic phrase how useful is it to build these lookup maps? I'll try to benchmark it. 10:32 < sgeisler> The added complexity and use of unsafe make it worth considering only one `binary_search`-based impl instead of the high/low memory feature. 10:35 < sgeisler> My guess is that the theoretical difference between `O(log(n))` vs. `O(1)` is negligible here and constant factors/building the map dominate. 10:55 -!- guest534543 [~mix@109.183.7.106] has joined #rust-bitcoin 10:59 -!- Kiminuo [~mix@185.156.174.4] has quit [Ping timeout: 256 seconds] 10:59 -!- Kiminuo [~mix@141.98.103.244] has joined #rust-bitcoin 11:00 -!- guest534543 [~mix@109.183.7.106] has quit [Ping timeout: 258 seconds] 11:17 -!- jonatack [~jon@184.75.221.35] has quit [Ping timeout: 258 seconds] 11:19 -!- jonatack [~jon@37.170.249.11] has joined #rust-bitcoin 11:55 -!- fiatjaf [~fiatjaf@2804:7f2:2a84:fb44:ea40:f2ff:fe85:d2dc] has quit [Ping timeout: 272 seconds] 11:57 -!- fiatjaf [~fiatjaf@2804:7f2:2a85:8ab8:ea40:f2ff:fe85:d2dc] has joined #rust-bitcoin 12:23 < sgeisler> Oh damn, ran into the ordering problem and read the backlog, so annoying … 13:00 -!- Kiminuo [~mix@141.98.103.244] has quit [Quit: Leaving] 14:17 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has joined #rust-bitcoin 14:42 < sgeisler> stevenroose: by using a ordered word list and two indices one can achieve good performance and relatively low memory footprint, I built a proof of concept for that https://github.com/stevenroose/rust-bip39/pull/1 14:44 < sgeisler> I still wonder if that's even worth it. We could get away with linear search for all use cases I can imagine. Nobody batch-processes mnemonics afaik. 14:55 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has quit [Remote host closed the connection] 14:57 < belcher> the only people batch processing seed phrases are people trying to bruteforce them 15:00 < sgeisler> I'd say that's not our target market xD 15:02 < belcher> yes exactly, id argue the code handling seed phrases doesnt need to be hugely optimized 15:05 < sgeisler> ~50 micro seconds to verify an mnemonic (should be roughly equivalent to decoding afaik) is in the realm of good enough for me. So unless I'm missing something I'd argue for just using the linear search version. 15:08 < belcher> at worst case this thing will be called every time a user types a new letter into the GUI text entry where they type their seed, and 50us seems plenty fast enough for the GUI to stay responsive 15:09 < belcher> the list of words is fixed at 2048 for bip39 after all, its not like it will grow to billions where linear search becomes a problem 16:32 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has joined #rust-bitcoin 16:36 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has quit [Ping timeout: 260 seconds] 17:16 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has joined #rust-bitcoin 18:28 -!- belcher [~belcher@unaffiliated/belcher] has quit [Quit: Leaving] 18:29 < stevenroose> sgeisler: yeah time-wise the pbkdf2 step takes like almost 500x longer than the word lookup step. 18:29 < stevenroose> Initially I had an implementation without word lists and just binary search, but theres barely any wordlist that is binary searchable. I think only the English one and one more language. 18:30 < stevenroose> All of then with accents or different alphabets are "lexicographically ordered" and I couldn't find any Rust support for that. There is an `alphanumeric` crate but it only does standard latin letters with numbers. No accents or anything, let alone asian alphabets. 18:31 < stevenroose> So at some point I had Language::is_wordlist_ordered() -> true method, but even then you're right that O(log(n)) and O(n) is not a lot of difference on 2048 words. 18:32 < stevenroose> So for the vast majority of use cases, just searching and not using memory would work fine. Perhaps `low-memory` should be default or so. In that case it could be renamed to `word-lookup-table` or so to make it explicit that it's allocating the lookup table. 18:33 < stevenroose> I'd personally be fine with not doing the tables at all. But I was afraid people here would shout at O(n) performance. Even though shouting at unsafe is even more common and justified. (Even though the unsafe is taken verbatim from lazy_static.) 18:56 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:c56e:1e76:b366:6705] has quit [Remote host closed the connection] 20:57 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:e9c5:7d73:444a:8c8d] has joined #rust-bitcoin 21:01 -!- sourabh [~sourabh@2601:18c:cd7f:6df8:e9c5:7d73:444a:8c8d] has quit [Ping timeout: 240 seconds] 23:09 -!- randyb [~randyb@110.54.130.51] has joined #rust-bitcoin 23:14 -!- jonatack_ [~jon@37.166.220.215] has joined #rust-bitcoin 23:18 -!- jonatack [~jon@37.170.249.11] has quit [Ping timeout: 264 seconds] 23:37 -!- randyb [~randyb@110.54.130.51] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] --- Log closed Fri Jun 19 00:00:54 2020