--- Day changed Mon Dec 05 2016 00:01 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 00:02 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 00:21 -!- molz [~molly@unaffiliated/molly] has quit [Ping timeout: 258 seconds] 00:25 -!- afk11 [~afk11@unaffiliated/afk11] has quit [Ping timeout: 260 seconds] 00:26 -!- afk11 [~afk11@176.61.67.182] has joined #lightning-dev 00:26 -!- afk11 [~afk11@176.61.67.182] has quit [Changing host] 00:26 -!- afk11 [~afk11@unaffiliated/afk11] has joined #lightning-dev 00:35 -!- cdecker [~cdecker@mail.snyke.net] has quit [Ping timeout: 244 seconds] 00:35 -!- cdecker [~cdecker@mail.snyke.net] has joined #lightning-dev 00:45 -!- JackH [~laptop@79-73-189-171.dynamic.dsl.as9105.com] has quit [Quit: Leaving] 00:45 -!- JackH [~laptop@79-73-189-171.dynamic.dsl.as9105.com] has joined #lightning-dev 00:49 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection] 01:01 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-sczzggonijjticjv] has quit [Read error: Connection reset by peer] 01:01 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-dhdgxiueqocbnxdt] has joined #lightning-dev 01:27 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 01:55 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-dhdgxiueqocbnxdt] has quit [Ping timeout: 260 seconds] 01:55 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-zwsxtmpbbswbtrok] has joined #lightning-dev 01:56 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 01:57 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 01:57 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 01:57 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 01:58 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-zwsxtmpbbswbtrok] has quit [Read error: Connection reset by peer] 02:00 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-bxzfvspouzjktzth] has joined #lightning-dev 02:02 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has joined #lightning-dev 02:02 -!- AaronvanW [~ewout@207pc74.sshunet.nl] has quit [Changing host] 02:02 -!- AaronvanW [~ewout@unaffiliated/aaronvanw] has joined #lightning-dev 02:35 -!- luke-jr [~luke-jr@unaffiliated/luke-jr] has joined #lightning-dev 03:07 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has quit [Quit: No Ping reply in 180 seconds.] 03:08 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has joined #lightning-dev 03:31 -!- Piper-Off is now known as Monthrect 03:33 -lightningrfc:#lightning-dev- [lightning-rfc] pm47 opened pull request #35: Moved msg type description from BOLT#2 to BOLT#1 (master...bolt1-type-desc) https://git.io/v18W5 03:42 -!- Grouver [~grouver@53535FBF.cm-6-4b.dynamic.ziggo.nl] has joined #lightning-dev 03:50 -lightningrfc:#lightning-dev- [lightning-rfc] pm47 pushed 2 new commits to master: https://git.io/v1881 03:50 -lightningrfc:#lightning-dev- lightning-rfc/master 8ae61d6 pm47: added a ToC 03:50 -lightningrfc:#lightning-dev- lightning-rfc/master 844ee69 pm47: fixed ToC links 03:52 -lightningrfc:#lightning-dev- [lightning-rfc] pm47 pushed 1 new commit to master: https://git.io/v188b 03:52 -lightningrfc:#lightning-dev- lightning-rfc/master 58d1733 pm47: typo 04:05 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has joined #lightning-dev 04:54 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has quit [Remote host closed the connection] 05:08 -!- moli [~molly@unaffiliated/molly] has joined #lightning-dev 05:27 -!- PaulCapestany [~PaulCapes@2604:5500:17:2ea:ed5c:b7f7:7c11:5b25] has quit [Quit: .] 05:28 -!- BashCo_ [~BashCo@unaffiliated/bashco] has joined #lightning-dev 05:31 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 248 seconds] 05:58 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has joined #lightning-dev 06:20 -!- jtimon [~quassel@186.31.134.37.dynamic.jazztel.es] has quit [Ping timeout: 268 seconds] 06:36 -!- ville- [~ville@xollo.net] has left #lightning-dev [] 06:50 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 06:51 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 07:08 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 07:09 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 07:10 -!- wraithm [~textual@205.197.160.100] has joined #lightning-dev 07:20 -!- laurentmt [~Thunderbi@80.215.138.113] has joined #lightning-dev 07:36 -!- laurentmt [~Thunderbi@80.215.138.113] has quit [Quit: laurentmt] 07:46 -!- murchandamus [~murchghos@ghostdub.de] has quit [Remote host closed the connection] 07:48 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 08:05 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has quit [Quit: No Ping reply in 180 seconds.] 08:07 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has joined #lightning-dev 08:36 -!- Monthrect is now known as Piper-Off 08:39 -!- laurentmt [~Thunderbi@80.215.138.113] has joined #lightning-dev 08:55 -!- laurentmt [~Thunderbi@80.215.138.113] has quit [Quit: laurentmt] 09:00 -!- laurentmt [~Thunderbi@80.215.138.113] has joined #lightning-dev 09:10 -!- BCBot_ [~BCBot@46.101.246.115] has quit [Remote host closed the connection] 09:10 -!- BCBot [~BCBot@46.101.246.115] has joined #lightning-dev 10:09 -!- sstone [~sstone@3.46-14-84.ripe.coltfrance.com] has quit [Quit: Leaving] 10:15 -!- BashCo_ [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection] 10:16 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 10:19 -!- laurentmt [~Thunderbi@80.215.138.113] has quit [Quit: laurentmt] 10:20 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Ping timeout: 245 seconds] 10:37 -!- BashCo [~BashCo@unaffiliated/bashco] has joined #lightning-dev 11:03 -!- aalex__ [~aalex@64.187.177.58] has quit [Read error: Connection reset by peer] 11:03 -!- aalex__ [~aalex@64.187.177.58] has joined #lightning-dev 11:04 -!- aalex [~aalex@64.187.177.58] has joined #lightning-dev 11:08 -!- aalex__ [~aalex@64.187.177.58] has quit [Ping timeout: 260 seconds] 11:11 -!- moli [~molly@unaffiliated/molly] has quit [Ping timeout: 256 seconds] --- Log closed Mon Dec 05 11:23:28 2016 --- Log opened Mon Dec 05 11:23:47 2016 11:23 -!- kanzure_ [~kanzure@unaffiliated/kanzure] has joined #lightning-dev 11:23 -!- Irssi: #lightning-dev: Total of 64 nicks [0 ops, 0 halfops, 0 voices, 64 normal] 11:24 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #lightning-dev 11:26 -!- BlueMatt_ [~BlueMatt@mail.bluematt.me] has joined #lightning-dev 11:28 -!- BlueMatt [~BlueMatt@unaffiliated/bluematt] has quit [Disconnected by services] 11:28 -!- BlueMatt_ is now known as BlueMatt 11:28 -!- BlueMatt [~BlueMatt@mail.bluematt.me] has quit [Changing host] 11:28 -!- BlueMatt [~BlueMatt@unaffiliated/bluematt] has joined #lightning-dev 11:28 -!- Netsplit *.net <-> *.split quits: kanzure, aakselrod 11:35 -!- Irssi: Join to #lightning-dev was synced in 705 secs 11:37 -!- aalex_ [~aalex@64.187.177.58] has joined #lightning-dev 11:39 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 11:41 -!- aalex [~aalex@64.187.177.58] has quit [Ping timeout: 260 seconds] 11:49 -!- You're now known as kanzure 11:50 -!- Grouver [~grouver@53535FBF.cm-6-4b.dynamic.ziggo.nl] has quit [Quit: Leaving] 11:56 -!- aakselro1 is now known as aakselrod 12:00 -!- Madars [~null@unaffiliated/madars] has quit [Quit: Leaving.] 12:03 -!- Madars [~null@unaffiliated/madars] has joined #lightning-dev 12:08 < roasbeef> rusty: 96-bit nonce, so the IETF variant described in the rfc 12:08 -!- arubi_ is now known as arubi 12:08 < roasbeef> taking a look at your rfc PR now 12:09 < arubi> rusty, the test vectors are proving to be invaluable. thanks 12:09 < rusty> roasbeef: cool. The libsodium API has both. Code compiles, now to test... 12:12 < rusty> arubi: great! 12:17 -lightningrfc:#lightning-dev- [lightning-rfc] Roasbeef pushed 1 new commit to master: https://git.io/v14Kw 12:17 -lightningrfc:#lightning-dev- lightning-rfc/master 57235bb Olaoluwa Osuntokun: BOLT 02: update opening channel establishment paragraph... 12:18 < rusty> roasbeef: there's a couple more, thanks. 12:18 < rusty> I was halfway through implementing act 2 before I realized it's basically identical to act 1. 12:35 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 250 seconds] 12:38 < roasbeef> act one does an epheremal-static DH, act two does an ephemeral-ephemeral DH 12:38 < roasbeef> but yeah there is some duplication within the description, I was torn between creating some higher level functions or pattern-matching directions vs describing everythign in-lilne 12:38 < roasbeef> in-line* 12:39 < roasbeef> leaned towards in-line as I felt it was easier to read since all the context is laid out, rather than reading then referring back to the pattern-matching guideliens 12:47 < roasbeef> the steps of the handhskaes as described has minimal abstractions, implementations will likely create a few functions that'll be re-used in each act of the handhskae. like for example, a func to mix recv'd data into the handshake digest 12:52 < roasbeef> could collapse stuff a bit by introducing funcs like that for the implementer 12:53 -!- wasi [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 13:19 -!- aalex__ [~aalex@64.187.177.58] has joined #lightning-dev 13:23 -!- aalex_ [~aalex@64.187.177.58] has quit [Ping timeout: 250 seconds] 13:58 -!- jtimon [~quassel@186.31.134.37.dynamic.jazztel.es] has joined #lightning-dev 14:13 -!- jl2012 [uid133844@gateway/web/irccloud.com/x-bxzfvspouzjktzth] has quit [Quit: Connection closed for inactivity] 14:15 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 14:28 -!- aalex [~aalex@64.187.177.58] has joined #lightning-dev 14:31 -!- aalex__ [~aalex@64.187.177.58] has quit [Ping timeout: 258 seconds] 14:39 -!- aakselrod [~alex@c-75-70-229-204.hsd1.co.comcast.net] has quit [Quit: leaving] 14:59 -!- JackH [~laptop@79-73-189-171.dynamic.dsl.as9105.com] has quit [Remote host closed the connection] 15:12 -!- laurentmt [~Thunderbi@176.158.157.202] has joined #lightning-dev 15:18 -!- laurentmt [~Thunderbi@176.158.157.202] has quit [Quit: laurentmt] 15:45 -!- wraithm [~textual@205.197.160.100] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…] 15:47 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 15:58 -!- moli [~molly@unaffiliated/molly] has joined #lightning-dev 16:08 -!- droark [~droark@c-24-22-123-27.hsd1.or.comcast.net] has quit [Ping timeout: 244 seconds] 16:40 < rusty2> roasbeef: I concur. I left mine as monkey-see-monkey do (mainly) as I'm aiming for more "reference" than speed or compactness. 17:32 -!- Ylbam [uid99779@gateway/web/irccloud.com/x-jwrejxtznosozzqy] has quit [Quit: Connection closed for inactivity] 18:15 -!- wasi0 [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 18:16 -!- wasi0 [~wasi@gateway/tor-sasl/wasi] has quit [Client Quit] 18:17 -!- wasi0 [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 18:17 -!- wasi [~wasi@gateway/tor-sasl/wasi] has quit [Ping timeout: 245 seconds] 18:20 -!- wasi0 [~wasi@gateway/tor-sasl/wasi] has quit [Client Quit] 18:24 < rusty2> roasbeef: OK, so I'm testing my handshake code, and I missed a nonce reset. I think we should make nonce an arg to encryptWithAD() and explicitly pass 0 during handshake (and increment in the caller for the lightning message send) 18:25 < rusty2> roasbeef: IIUC, nonce is always 0 during handshake? 18:36 -!- wasi [~wasi@gateway/tor-sasl/wasi] has joined #lightning-dev 18:53 < rusty2> roasbeef: hmm, actually, should nonce be incremented normally. You reset it to 0 in many places, I'm not sure what you're trying to do (it's also formatted weirdly, hanging on the end of the point before the encrypt/decrypt) 19:02 < rusty2> roasbeef: your implementation does not reset nonce, AFAICT. So something's wrong... 19:10 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell closed pull request #33: BOLT 8: minor clarifications and fixes. (master...bolt-8-clarification) https://git.io/v1lAo 19:13 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell pushed 2 new commits to master: https://git.io/v1B0F 19:13 -lightningrfc:#lightning-dev- lightning-rfc/master ffed58f Rusty Russell: BOLT 8: minor clarifications and fixes.... 19:13 -lightningrfc:#lightning-dev- lightning-rfc/master eb49bf3 Rusty Russell: BOLT 8: More minor clarifications.... 19:18 < rusty2> roasbeef: yeah, there seems to be some nonce confusion. Logically, we have ln and rn for local and remote nonces. Unless there's a good reason, we should simply start at 0 for first packet, and continue to increment through handshake and into normal data, AFAICT. 19:19 < rusty2> s/ln and rn/sn and rn/ for send and receive, to match sk and rk. 19:19 -!- rusty2 is now known as rusty 19:33 -lightningrfc:#lightning-dev- [lightning-rfc] rustyrussell opened pull request #36: BOLT 8: clarify nonces. (master...bolt-8-nonce) https://git.io/v1BEr 19:33 * rusty throws some text at roasbeef... ^ 19:42 * rusty fixes that up a bit more... 19:49 < rusty> roasbeef: act 3 is wrong. Sender does "c = encrypt(pubkey), h = SHA-256(h || c)" receiver does "rs = decryptWithAD(temp_k, 2, h, c), h = SHA-256(h || rs.pub.serializeCompressed())`" 19:50 < rusty> roasbeef: assume sender should also h=SHA256(h || s.pub.serializeCompressed()) 19:56 < rusty> roasbeef: also pushed... 20:05 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has quit [Quit: No Ping reply in 180 seconds.] 20:07 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has joined #lightning-dev 20:09 < rusty> roasbeef: ... and a fix for incorrect working on sk,rk for responder. 20:23 -!- rusty [~rusty@pdpc/supporter/bronze/rusty] has left #lightning-dev [] 20:34 * roasbeef assumes rusty will read the scrollback 20:34 < roasbeef> rusty: yeh just realized there's an extra nonce reset on the recv part of act two after the decryptoin 20:35 < roasbeef> rusty: yes the nonce is always zero during the handshake as each temp_key is only used to encrypt/decrypt one message 20:36 < roasbeef> local/remote nonces are only created at the end of act three for both sides 20:36 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has quit [Quit: No Ping reply in 180 seconds.] 20:38 -!- maaku [~quassel@173-228-107-141.dsl.static.fusionbroadband.com] has joined #lightning-dev 20:41 < roasbeef> rusty: no, for act three the sender mixes in the ciphertext of the encrypted static pubkey, not the pubkey itself 20:43 < roasbeef> rusty: my imlp _does_ reset the nonce after each new hkdf rachet 21:00 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has joined #lightning-dev 21:00 < roasbeef> rusty2: replied in scrollback 21:01 < rusty2> roasbeef: yeah, rebooted, reading GH too... 21:02 < rusty2> roasbeef: OK, so receive side is wrong then:L 21:03 < roasbeef> yeh recv on act two was wrong, also recv on act three 21:03 < roasbeef> on act two only a single nonce reset, on act three use ciphertext not pub key to mix into digest 21:04 < rusty2> OK, if nonce is really supposed to be 0 all the time., then let's make it explicit. 21:06 < rusty2> Note that initiator does `c = encryptWithAD(temp_k, 0, h, zero)` then responder does `c = encryptWithAD(temp_k, 0, h, zero)`. So it? 21:06 < roasbeef> so it? 21:06 < rusty2> Weird... So it looks like nonce reuse, but it isn't since temp_k is differnet... 21:07 < roasbeef> yeh temp_k changes each time 21:07 < rusty2> Yeah, can we call them temp_k1 temp_k2 temp_k3? 21:08 < rusty2> You don't actually need them between acts, for example. That's not ovvious. 21:09 < rusty2> Hmm, actually, you do. Better to rename. Patch incoming... 21:13 < rusty2> roasbeef: um, looks like act3's `c = encryptWithAD(temp_k, h, s.pub.serializeCompressed())` reuses the key it used at end of act2? 21:15 -!- aalex [~aalex@64.187.177.58] has quit [Read error: Connection reset by peer] 21:15 -!- aalex [~aalex@64.187.177.58] has joined #lightning-dev 21:16 < rusty2> roasbeef: yeah, there are three temp_k creations, and 4 encryptions. Something is screwy... 21:20 -!- moli [~molly@unaffiliated/molly] has quit [Ping timeout: 248 seconds] 21:20 -!- molz [~molly@unaffiliated/molly] has joined #lightning-dev 21:29 < rusty2> I'm going to assume nonce is 1 there, to fix it. 21:44 < rusty2> roasbeef: OK, shuffled simple patches to the top. Fixed up the nonce numbering based on your correction (thanks). See what you think. 22:02 -!- jtimon [~quassel@186.31.134.37.dynamic.jazztel.es] has quit [Ping timeout: 256 seconds] 22:41 -!- rusty2 [~rusty@pdpc/supporter/bronze/rusty] has quit [Ping timeout: 250 seconds] 23:30 -!- murchandamus [~murchghos@ghostdub.de] has quit [Ping timeout: 244 seconds] 23:32 -!- murchandamus [~murchghos@ghostdub.de] has joined #lightning-dev 23:53 -!- BashCo [~BashCo@unaffiliated/bashco] has quit [Remote host closed the connection]