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.
This commit is contained in:
Olaoluwa Osuntokun 2020-01-06 18:28:54 -08:00
parent e96e011520
commit 128be259a7
No known key found for this signature in database
GPG Key ID: BC13F65E2DC84465

@ -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