--- Log opened Fri Dec 24 00:00:10 2021 00:35 -!- Talkless [~Talkless@mail.dargis.net] has joined #bitcoin-core-pr-reviews 00:38 -!- Yihen_ [~textual@103.138.75.117] has quit [Remote host closed the connection] 00:38 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 02:17 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has joined #bitcoin-core-pr-reviews 02:30 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 02:30 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 03:46 -!- Talkless [~Talkless@mail.dargis.net] has quit [Quit: Konversation terminated!] 03:55 -!- Talkless [~Talkless@mail.dargis.net] has joined #bitcoin-core-pr-reviews 04:04 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.] 04:06 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has joined #bitcoin-core-pr-reviews 04:06 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has quit [Client Quit] 04:08 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has joined #bitcoin-core-pr-reviews 04:24 -!- Talkless [~Talkless@mail.dargis.net] has quit [Quit: Konversation terminated!] 05:25 -!- tecnecio [~tecnecio_@174.red-2-139-120.dynamicip.rima-tde.net] has joined #bitcoin-core-pr-reviews 07:21 -!- provoostenator [~quassel@user/provoostenator] has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.] 07:23 -!- Talkless [~Talkless@m83-176-229-235.cust.tele2.lt] has joined #bitcoin-core-pr-reviews 07:24 -!- provoostenator [~quassel@user/provoostenator] has joined #bitcoin-core-pr-reviews 08:04 -!- andrewtoth [~andrewtot@gateway/tor-sasl/andrewtoth] has quit [Remote host closed the connection] 08:05 -!- andrewtoth [~andrewtot@gateway/tor-sasl/andrewtoth] has joined #bitcoin-core-pr-reviews 08:42 -!- luke-jr [~luke-jr@user/luke-jr] has quit [Ping timeout: 268 seconds] 08:43 -!- luke-jr [~luke-jr@user/luke-jr] has joined #bitcoin-core-pr-reviews 08:52 -!- madacol [~madacol@185.231.211.202] has joined #bitcoin-core-pr-reviews 08:59 -!- madacol [~madacol@185.231.211.202] has quit [Ping timeout: 256 seconds] 09:02 -!- dongcarl [~dongcarl@70.107.207.192] has quit [Quit: Ping timeout (120 seconds)] 09:04 -!- qubenix [~qubenix@66.172.11.228] has quit [Remote host closed the connection] 09:05 -!- dongcarl [~dongcarl@70.107.207.192] has joined #bitcoin-core-pr-reviews 09:06 -!- madacol [~madacol@185.231.211.202] has joined #bitcoin-core-pr-reviews 09:08 -!- qubenix [~qubenix@user/qubenix] has joined #bitcoin-core-pr-reviews 10:05 -!- madacol [~madacol@185.231.211.202] has quit [Quit: WeeChat 2.8] 10:16 < pinheadmz> im brute forcing vanity bech32 address for an idea I had, and encounter something unexpected. 10:16 < pinheadmz> bc1qh300vzk0afa6ec7p9h765uzps52merl03yvayfe6uppglw7vwp2qul45jg bcrt1qh300vzk0afa6ec7p9h765uzps52merl03yvayfe6uppglw7vwp2qxwfaaa 10:16 < pinheadmz> bc1qs7qtzd33xmufprycuczjz2p60ey7pqwp47w7aukp0dahf3uscr8qp8uaaa bcrt1qs7qtzd33xmufprycuczjz2p60ey7pqwp47w7aukp0dahf3uscr8qmkq5jg 10:16 < pinheadmz> i dont know how to explain it but, these are pairs of addrs with same program for main / regtest 10:16 < pinheadmz> the checksums are... connected somehow 10:16 < pinheadmz> when main chsksum ends in aaa, regtest checkum ends in 5jg 10:16 < pinheadmz> -> and VICE VERSA 10:16 < pinheadmz> what?! 10:17 < sipa> A different prefix corresponds to XOR'ing a different constant into the checksum. 10:17 < pinheadmz> its just xor? 10:17 < sipa> XOR is an involution (doing it twice undoes the effect). 10:17 < pinheadmz> i understand that but didnt see it that way inthe spec 10:17 < pinheadmz> values = bech32_hrp_expand(hrp) + data 10:18 < sipa> It's a linear code; everything is XORing :) 10:18 < pinheadmz> interesting, thank you 10:18 < sipa> Every (character,position) combination translates to a particular constants. All those constants are XORed, giving the checksum. 10:19 < pinheadmz> ok i see now in bech32_polymod in bip173, theres a loop where everything gets xored 10:20 < pinheadmz> neat 10:20 < pinheadmz> got a chill down my spine i thought id just generated the same priv key twice somehow 10:20 < sipa> Right, though it may not be obvious that repeated application of the bech32_polymod transformation still results in xorring for earlier processed characters. 10:20 < sipa> However, it's a linear code, so it must be. 10:22 < pinheadmz> does that mean that the same bytes, in a different order would result in same checksum? 10:22 < sipa> No, because the position matters. 10:22 < pinheadmz> makes sense 10:22 < sipa> Every (character,position) combination results in a different constant being XOR'ed into the checksum. 10:23 < sipa> It is a length 1023 code though, by design, so (c,p) and (c,p+1023) have the same constants. 10:24 < pinheadmz> where is the position in the algorithm? theres this loop ` for v in values:` which doesnt pass the index (of v) 10:24 < sipa> (If you were to actually use the algorithm on such long inputs; BIP173/BIP350 restrict the input including HRP to 89 or 90 characters IIRC) 10:24 < sipa> It's not in the algorithm. 10:24 < sipa> I'm explaining what the effect of the algorithm is. 10:25 < sipa> Earlier characters go through more iterations of the polymod loop; that's how the position matters. 10:25 < pinheadmz> aha 12:10 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 12:11 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 12:30 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 12:30 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 13:03 -!- ___nick___ [~quassel@cpc68286-cdif17-2-0-cust533.5-1.cable.virginm.net] has quit [Ping timeout: 240 seconds] 13:20 -!- Talkless [~Talkless@m83-176-229-235.cust.tele2.lt] has quit [Ping timeout: 256 seconds] 16:03 -!- siv2r[m] [~siv2rmatr@2001:470:69fc:105::fed3] has quit [Ping timeout: 240 seconds] 16:04 -!- siv2r[m] [~siv2rmatr@2001:470:69fc:105::fed3] has joined #bitcoin-core-pr-reviews 16:32 -!- tecnecio [~tecnecio_@174.red-2-139-120.dynamicip.rima-tde.net] has quit [Ping timeout: 240 seconds] 19:30 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 19:30 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 20:30 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 20:30 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 22:02 -!- shaavan [~shaavan@117.199.216.54] has joined #bitcoin-core-pr-reviews 22:04 -!- shaavan [~shaavan@117.199.216.54] has quit [Client Quit] 23:06 -!- tecnecio [~tecnecio_@174.red-2-139-120.dynamicip.rima-tde.net] has joined #bitcoin-core-pr-reviews 23:18 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 23:19 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 23:29 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 23:30 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews 23:58 -!- Yihen [~textual@103.138.75.117] has quit [Remote host closed the connection] 23:59 -!- Yihen [~textual@103.138.75.117] has joined #bitcoin-core-pr-reviews --- Log closed Sat Dec 25 00:00:11 2021