Why Nostr? What is Njump?
2023-10-27 21:39:27
in reply to

varx/tech on Nostr: npub18369m…z8jp6 As long as the semantics are equivalent for all implementations, ...

As long as the semantics are equivalent for all implementations, I'm not too concerned about binary equality—that's a level of canonicalization that I think would generally be a functionality concern rather than a security concern.

I don't have a specific attack in mind. I'm just aware that Alice and Bob disagreeing on the semantics of a message is bad. :-P And structured messages are known to be trouble.

I had another thought about how to prevent these issues: Test data. If you offer a selection of "test vectors" you can include known canonicalization issues and specify that they should cause parse failures. Free unit tests is a very attractive thing for implementers. :-)
Author Public Key
npub13cavz8sul0get8lllzwszm7j5mq4n3ygpn60uqn54su99csl9wyqeu3sx0