derecalliance / protobufs

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

`DECRYPTION_FAILED` is redundant in the `StatusEnum` #28

Open zanctor opened 6 months ago

zanctor commented 6 months ago

The DECRYPTION_FAILED value of the StatusEnum is redundant, since we do not know a message sender before we decrypt the message, thus we do not know where to send the Result with this status.

jorabin commented 6 months ago

If you have a two-way communication channel/transport then you could send a response with this status.

zanctor commented 6 months ago

You can, but the response message will still lack the receiver field, which should be taken from the sender field in the decrypted request. Also, if we are talking about the PairRequestMessage, it won't be possible to encrypt the response message, since the encryption key is also contained in the decrypted body.

jorabin commented 6 months ago

fair point regarding decryption