Hi there, first of all thanks for the work on those 3 crates, they're really coming handy when implementing SSH primitives !
About the interfaces for ssh-cipher, it seems like calling Cipher::encrypt or Cipher::decrypt at different times to encrypt/decrypt SSH packet doesn't preserve the inner state of the Cipher and produce invalid data.
I may be doing something wrong however, but so far I am only able to decrypt and encrypt the first packet after the key-exchange, the successive packets gets mangled.
I test my code against OpenSSH, so I'd guess the client is behaving correctly in this case.
Hi there, first of all thanks for the work on those 3 crates, they're really coming handy when implementing SSH primitives !
About the interfaces for
ssh-cipher, it seems like callingCipher::encryptorCipher::decryptat different times to encrypt/decrypt SSH packet doesn't preserve the inner state of the Cipher and produce invalid data.I may be doing something wrong however, but so far I am only able to decrypt and encrypt the first packet after the key-exchange, the successive packets gets mangled.
I test my code against OpenSSH, so I'd guess the client is behaving correctly in this case.