Closed lbaird closed 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.
This has now been over taken by events. See latest comments on #11
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.
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.