3 ms·
Do you mind going deeper here? Which protocols? Can you point to examples? Because I was about to design a signing Json solution but based on the comments her
by elviejo 7y ago
Do you mind going deeper here?
Which protocols?
Can you point to examples?
Because I was about to design a signing Json solution but based on the comments here it is a bad idea.
- moojd 7y agoProtobuf, cap n proto, and messagepack are a few I've seen before
- zenhack 7y agoThe signing schemes I've seen used in binary protocols fall into two categories: 1. Canonicalize and sign: the format has a defined canonical form. Convert to that before doing cryptographic operations. If the format is well designed around it, this is doable, whereas JSON doesn't really have this and with many libraries it's hard to control the output to the degree that you'd need. 2. Serialize and sign: serialize the data as flat bytes, and then your signed message just has a "bytes" field that is the signed object. This is conceptually not far off from the base64 solution above, except that there's not extra overhead, since with a binary protocol you'll have a length prefix instead of having to escape stuff.
- bmm6o 7y agoBeing able to separate the object and signature saves tons of trouble https://latacora.micro.blog/2019/07/24/how-not-to.html https://latacora.micro.blog/2019/07/24/how-not-to.html