What is Nostr?
Corné Plooy [ARCHIVE] /
npub1ly5…dx6n
2023-06-09 12:53:14
in reply to nevent1q…0e5s

Corné Plooy [ARCHIVE] on Nostr: 📅 Original date posted:2018-11-29 📝 Original message: Hi, Is there a reason why ...

📅 Original date posted:2018-11-29
📝 Original message:
Hi,


Is there a reason why we have HMACs in Sphinx? What could go wrong if we
didn't?

A receiving node doesn't know anyway what the origin node is; I don't
see any attack mode where an attacker wouldn't be able to generate a
valid HMAC.

A receiving node only knows which peer sent it a Sphinx packet;
verification that this peer really sent this Sphinx packet is (I think)
already done on a lower protocol layer.


AFAICS, The only real use case of the HMAC value is the special case of
a 0-valued HMAC, indicating the end of the route. But that's just silly:
it's essentially a boolean, not any kind of cryptographic verification.


CJP
Author Public Key
npub1ly5vrg5ylhdkxrkj824jhlnfsy2z8fvlg8wcc0jqc4aezma6majsycdx6n