Skip to content

ssh-cipher: Cipher::{encrypt, decrypt} does not persist cipher state. #164

Description

@lowlevl

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions