Skip to content

Commit

Permalink
Improved handling of responses from a server that changes Sender ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-tiloca-sics committed Jul 28, 2024
1 parent e6a6741 commit b00885b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions draft-ietf-core-oscore-groupcomm.md
Original file line number Diff line number Diff line change
Expand Up @@ -1342,11 +1342,11 @@ Note that a client may receive a response protected with a Security Context diff

* The ordering and the replay protection of responses received from the server during the long exchange are performed as per {{sec-replay-protection-responses}} of this document, by using the Response Number associated with that server within that long exchange. In case of unsuccessful decryption and verification of a response, the client SHALL NOT update the Response Number associated with the server.

* When receiving the first valid response from the server within the long exchange, the client MUST store the current kid "kid1" of that server for that long exchange. If the 'kid' field is included in the OSCORE option of the response, its value specifies "kid1". If the request was protected in pairwise mode (see {{sec-pairwise-protection-req}}), the 'kid' field may not be present in the OSCORE option of the response (see {{sec-cose-object-kid}}). In this case, the client assumes "kid1" to be the Recipient ID for the server to which the request was intended for.
* When receiving the first valid response from the server within the long exchange, the client MUST store the kid "kid1" of that server for that long exchange. If the 'kid' field is included in the OSCORE option of the response, its value specifies "kid1". If the request was protected in pairwise mode (see {{sec-pairwise-protection-req}}), the 'kid' field may not be present in the OSCORE option of the response (see {{sec-cose-object-kid}}). In this case, the client assumes "kid1" to be the Recipient ID for the server to which the request was intended for.

* When receiving another valid response to the same request from the same server - which can be identified and recognized through the same public key used to verify the countersignature and included in the server's authentication credential - the client determines the current kid "kid2" of the server as above for "kid1", and MUST check whether "kid2" is equal to the stored "kid1".
* When receiving another valid response to the same request from the same server - which can be identified and recognized through the same public key used to verify the countersignature and included in the server's authentication credential - the client determines the kid "kid2" of the server as above for "kid1", and MUST check whether "kid2" is equal to the stored "kid1".

If "kid1" and "kid2" are different, the client SHOULD NOT accept the response as valid to be delivered to the application, and SHOULD NOT update the Response Number associated with the server. Exceptions can apply if the client has a means of preserving the order of responses in a more elaborate way out of the scope of this document, or the client application does not require response ordering altogether.
If "kid1" and "kid2" are different, the client SHOULD NOT accept the response as valid to be delivered to the application, and SHOULD NOT update the Response Number associated with the server. Exceptions can apply, if the client has a means of preserving the order of responses in a more elaborate way out of the scope of this document, or if the client application does not require response ordering altogether. Servers MUST NOT rely on clients tolerating this, unless it was explicitly agreed on (e.g., as part of the group's setup).

Note that, if "kid2" is different from "kid1" and the 'kid' field is omitted from the response - which is possible if the request was protected in pairwise mode - then the client will compute a wrong keystream to decrypt the countersignature (i.e., by using "kid1" rather than "kid2" in the 'id' field of the 'info' array in {{sssec-encrypted-signature-keystream}}), thus subsequently failing to verify the countersignature and discarding the response.

Expand Down Expand Up @@ -1989,6 +1989,8 @@ As discussed in {{ssec-gid-collision}}, if endpoints are deployed in multiple gr

* Removed requirement on 0 as initial value of the Key Generation Number.

* Improved handling of responses from a server that changes Sender ID.

* Added IANA consideration on the "CoAP Option Numbers" registry.

* Updated references.
Expand Down

0 comments on commit b00885b

Please sign in to comment.