3 ms·
Also, some sort of "parsing" (normalizing) is always required even for binary messages. Endianness, alignment conventions, etc. — just mapping the network bytes
by atemerev 10y ago
Also, some sort of "parsing" (normalizing) is always required even for binary messages. Endianness, alignment conventions, etc. — just mapping the network bytes onto memory is inviting trouble.
(btw, network byte order is big-endian).
- tangent128 10y agoPoint, though binary normalization is easier to define in a manner everybody will consistently implement as opposed to, say, SMTP headers. ...I guess it's abominations like SMTP that I mainly think of when I hear "text-based protocol". JSON and bencode are probably safe enough. (Canonicalization is not useful from a security perspective, since an attacker is under no obligation to canonicalize their message.)