derecalliance / protobufs

The format of DeRec messages.
Apache License 2.0
2 stars 0 forks source link

prepend secretID/nonce to signed-then-encrypted message #12

Closed lbaird closed 8 months ago

lbaird commented 8 months ago

Add a comment in derecmessage.proto to ensure that the sender prepends the secretID or nonce to each signed-then-encrypted message. This ensures the receiver will know which keys to use for decryption and signature verification.

lbaird commented 8 months ago

NOTE: we don't have to add this. We could just stick with the original design of having the receiver try all the keys they are using with a given URI.

That means they can either use a separate IP address for each key, or they can try all the keys in a list. So this change isn't really necessary. But it's still nice to give the users more options, and it only costs an extra 8 bytes (and a little more code), so it's probably fine to make this change.

jorabin commented 8 months ago

This has now been over taken by events. See latest comments on #11

lbaird commented 8 months ago

The PR has been updated. Each message is now preceded by a 32-bit keyId. And both the contact and pairing request give that keyId at the same time they are giving the new public encryption key.