From 128be259a774ae04d16b47a55de524b77e4d0773 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 6 Jan 2020 18:28:54 -0800 Subject: [PATCH] routing: use updated sphinx.NewOnionPacket method In this commit, we update the routing package to use the new `sphinx.NewOnionPacket` method. The new version of this method allows us to specify _how_ the packet should be filled before it's used to create a mix-header. This isn't a fundamental change (totally backwards compatible), instead it plugs a privacy leak that may have revealed to the destination how long the true route was. --- routing/router.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routing/router.go b/routing/router.go index 55cefaae..d09383e9 100644 --- a/routing/router.go +++ b/routing/router.go @@ -1518,6 +1518,7 @@ func generateSphinxPacket(rt *route.Route, paymentHash []byte, // privacy preserving source routing across the network. sphinxPacket, err := sphinx.NewOnionPacket( sphinxPath, sessionKey, paymentHash, + sphinx.DeterministicPacketFiller, ) if err != nil { return nil, nil, err