TrueSkrillor commented on issue #445:
URL: https://github.com/apache/mina-sshd/issues/445#issuecomment-1867028439

   > According to [OpenSSH 
PROTOCOL](https://github.com/openssh/openssh-portable/blob/master/PROTOCOL) - 
section `1.9 transport: strict key exchange extension`
   > 
   > > Ater sending or receiving a SSH2_MSG_NEWKEYS message, reset the packet 
sequence number to zero
   > 
   > However, it does not specify **which** sequence number to reset - the 
incoming our outgoing. Bear in mind that the NEWKEYS message is "symmetrical" - 
if we sent one, then an incoming one is due any time and vice versa. Since the 
sequence number is part of the encryption (if this is not the 1st NEWKEYS) then 
we need to know whether we sent the request or are responding to it.
   
   Strict key exchange resets the sequence number of the corresponding 
direction after it has received a SSH_MSG_NEWKEYS message. I. e. when receiving 
SSH_MSG_NEWKEYS from the remote peer reset the incoming sequence number, when 
sending SSH_MSG_NEWKEYS reset the outgoing sequence number. The SSH_MSG_NEWKEYS 
itself is handled under the old sequence numbers (sequence number 0 will be the 
first message after SSH_MSG_NEWKEYS).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to