derecalliance / protobufs

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

Update pair.proto #14

Closed lbaird closed 8 months ago

lbaird commented 8 months ago

Changing nonce from 256 bits to 64 bits. There's no need for more than 64 bits.

jorabin commented 8 months ago

The nonce also needs to change in the contact message. Worth noting that if the nonce is prepended to the contact request message then it is duplicated in that message.

lbaird commented 8 months ago

The nonce in the contact would remain unchanged. The nonce would not be prepended to anything. It would still be a field inside the contact. And it would still be a field inside the pairing request.

The only thing that would prepended to anything would be the keyID, which is prepended as plaintext to the ciphertext of every message.

On Fri, Nov 17, 2023 at 8:25 AM Jo @.***> wrote:

The nonce also needs to change in the contact message. Worth noting that if the nonce is prepended to the contact request message then it is duplicated in that message.

— Reply to this email directly, view it on GitHub https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816525211, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDBYW5WL2LMYTOSE57SECLYE5XVNAVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGUZDKMRRGE . You are receiving this because you authored the thread.Message ID: @.***>

jorabin commented 8 months ago

The comment about prepending the nonce antedated the decision to not have it do that any more and to send the key id instead.

The contact message needs to change to reflect the change in length of the nonce.

lbaird commented 8 months ago

There’s no need for the length of the nonce to change. I don’t think there are any changes needed for the nonce, other than the fact that it is no longer prepended as plaintext. Only the keyID needs to be prepended as plaintext.

On Fri, Nov 17, 2023 at 9:08 AM Jo @.***> wrote:

The comment about prepending the nonce antedated the decision to not have it do that any more and to send the key id instead.

The contact message needs to change to reflect the change in length of the nonce.

— Reply to this email directly, view it on GitHub https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816596426, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDBYW3W2SSELT5IABFNITTYE54WLAVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGU4TMNBSGY . You are receiving this because you authored the thread.Message ID: @.***>

jorabin commented 8 months ago

According to the pull request the nonce has changed from bytes to int64 in the pair request and pair response messages.

Given that, it also needs to change from bytes to int64 in the contact message but that change is not part of the pull request.

The pull request needs to include a change to the contact message.

On 17 Nov 2023, at 16:05, Leemon Baird @.***> wrote:

There’s no need for the length of the nonce to change. I don’t think there are any changes needed for the nonce, other than the fact that it is no longer prepended as plaintext. Only the keyID needs to be prepended as plaintext.

On Fri, Nov 17, 2023 at 9:08 AM Jo @.***> wrote:

The comment about prepending the nonce antedated the decision to not have it do that any more and to send the key id instead.

The contact message needs to change to reflect the change in length of the nonce.

— Reply to this email directly, view it on GitHub https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816596426, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDBYW3W2SSELT5IABFNITTYE54WLAVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGU4TMNBSGY . You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816693113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWMBUD77KNV222ZEHTETMTYE6DN5AVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGY4TGMJRGM. You are receiving this because you commented.

lbaird commented 8 months ago

Yes. We had originally agreed on 64bits, and it somehow had been changed to 32 bytes in the protobuf. So the PR is changing it back to 64 bits.

I agree, it must change everywhere it is used: contact, pair request, pair request response.

I’ll add that to the PR.

On Fri, Nov 17, 2023 at 10:10 AM Jo @.***> wrote:

According to the pull request the nonce has changed from bytes to int64 in the pair request and pair response messages.

Given that, it also needs to change from bytes to int64 in the contact message but that change is not part of the pull request.

The pull request needs to include a change to the contact message.

On 17 Nov 2023, at 16:05, Leemon Baird @.***> wrote:

There’s no need for the length of the nonce to change. I don’t think there are any changes needed for the nonce, other than the fact that it is no longer prepended as plaintext. Only the keyID needs to be prepended as plaintext.

On Fri, Nov 17, 2023 at 9:08 AM Jo @.***> wrote:

The comment about prepending the nonce antedated the decision to not have it do that any more and to send the key id instead.

The contact message needs to change to reflect the change in length of the nonce.

— Reply to this email directly, view it on GitHub < https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816596426>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABDBYW3W2SSELT5IABFNITTYE54WLAVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGU4TMNBSGY>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816693113>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAWMBUD77KNV222ZEHTETMTYE6DN5AVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWGY4TGMJRGM>.

You are receiving this because you commented.

— Reply to this email directly, view it on GitHub https://github.com/derecalliance/protobufs/pull/14#issuecomment-1816701247, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDBYWZZSKFQ5Q35ZD7PTH3YE6EAPAVCNFSM6AAAAAA7LDHLTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJWG4YDCMRUG4 . You are receiving this because you authored the thread.Message ID: @.***>

lbaird commented 8 months ago

The PR has the above changes. It can be merged now.