target = "https://www.rfc-editor.org/rfc/rfc9001#section-6.2" # 6.2. Responding to a Key Update # # A peer is permitted to initiate a key update after receiving an # acknowledgment of a packet in the current key phase. An endpoint # detects a key update when processing a packet with a key phase that # differs from the value used to protect the last packet it sent. To # process this packet, the endpoint uses the next packet protection key # and IV. See Section 6.3 for considerations about generating these # keys. # # If a packet is successfully processed using the next key and IV, then # the peer has initiated a key update. The endpoint MUST update its # send keys to the corresponding key phase in response, as described in # Section 6.1. Sending keys MUST be updated before sending an # acknowledgment for the packet that was received with updated keys. # By acknowledging the packet that triggered the key update in a packet # protected with the updated keys, the endpoint signals that the key # update is complete. # # An endpoint can defer sending the packet or acknowledgment according # to its normal packet sending behavior; it is not necessary to # immediately generate a packet in response to a key update. The next # packet sent by the endpoint will use the updated keys. The next # packet that contains an acknowledgment will cause the key update to # be completed. If an endpoint detects a second update before it has # sent any packets with updated keys containing an acknowledgment for # the packet that initiated the key update, it indicates that its peer # has updated keys twice without awaiting confirmation. An endpoint # MAY treat such consecutive key updates as a connection error of type # KEY_UPDATE_ERROR. # # An endpoint that receives an acknowledgment that is carried in a # packet protected with old keys where any acknowledged packet was # protected with newer keys MAY treat that as a connection error of # type KEY_UPDATE_ERROR. This indicates that a peer has received and # acknowledged a packet that initiates a key update, but has not # updated keys in response. [[spec]] level = "MUST" quote = ''' The endpoint MUST update its send keys to the corresponding key phase in response, as described in Section 6.1. ''' [[spec]] level = "MUST" quote = ''' Sending keys MUST be updated before sending an acknowledgment for the packet that was received with updated keys. ''' [[spec]] level = "MAY" quote = ''' An endpoint MAY treat such consecutive key updates as a connection error of type KEY_UPDATE_ERROR. ''' [[spec]] level = "MAY" quote = ''' An endpoint that receives an acknowledgment that is carried in a packet protected with old keys where any acknowledged packet was protected with newer keys MAY treat that as a connection error of type KEY_UPDATE_ERROR. '''