logoalt Hacker News

lokaryesterday at 8:41 PM1 replyview on HN

What if (and this is perhaps to big an if), you only ever serialize and de-serialize with code generated from the IDL, which always checks the magic numbers (returning a typed object(?


Replies

jeffrallenyesterday at 9:19 PM

It's a big if because the threat model normally includes "bad guys can forge messages". Which means that the input is untrusted and you want to generate your own domain separation bytes for the hash function, not let your attacker choose them.