Reason for having HMACs in Sphinx



Summary:

The question has been raised about the necessity of HMACs in Sphinx and what could go wrong if they were not used. It is argued that a receiving node doesn't know the origin node and there doesn't seem to be any attack mode where an attacker wouldn't be able to generate a valid HMAC. The only use case for HMACs appears to be the special case of a 0-valued HMAC, which indicates the end of the route. However, this is seen as essentially a boolean rather than cryptographic verification. It is noted that the verification of which peer sent the Sphinx packet is already done on a lower protocol layer.


Updated on: 2023-06-02T15:23:05.983906+00:00