Add the line fmt.Printf("%x\n",contact.theirIdentityPublic[:]) anywhere around https://github.com/agl/pond/blob/master/client/client.go#L1041 in newRatchet(..). Next run go test. It'll print 0000000000000000000000000000000000000000000000000000000000000000 repeatedly, so the ratchet never sees a non-zero value for contact.theirIdentityPublic.
I have not dug into the ratchet code enough to figure out if this matters, but the ratchet does use ratchet.theirIdentityPublic. If it matters, we could move the calls to newRatchet elsewhere, presumably only for V2 as doing so might break new key up.
Add the line
fmt.Printf("%x\n",contact.theirIdentityPublic[:])
anywhere around https://github.com/agl/pond/blob/master/client/client.go#L1041 innewRatchet(..)
. Next rungo test
. It'll print0000000000000000000000000000000000000000000000000000000000000000
repeatedly, so the ratchet never sees a non-zero value forcontact.theirIdentityPublic
.This is because the two calls to
newRatchet
at https://github.com/agl/pond/blob/master/client/client.go#L1051 and https://github.com/agl/pond/blob/master/client/disk.go#L103 run before key exchange completes.I have not dug into the ratchet code enough to figure out if this matters, but the ratchet does use
ratchet.theirIdentityPublic
. If it matters, we could move the calls tonewRatchet
elsewhere, presumably only for V2 as doing so might break new key up.