Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-cipher: allows to decrypt a payload without altering state #266

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

baloo
Copy link
Member

@baloo baloo commented Aug 13, 2024

When decrypting messages from the wire, we need to first decrypt the first couple of bytes (4 or 16 bytes) just to get the length of packet.

Once we get the length of the packet we can decrypt the full payload. If we just used the Decryptor api as it is, we would alter the internal state.

@baloo baloo marked this pull request as draft August 13, 2024 03:41
When decrypting messages from the wire, we need to first decrypt the
first couple of bytes (4 or 16 bytes) just to get the length of packet.

Once we get the length of the packet we can decrypt the full payload. If
we just used the Decryptor api as it is, we would alter the internal
state.
@baloo baloo force-pushed the baloo/ssh-cipher/decryptor-peek branch from c9b8a76 to 7e237de Compare August 13, 2024 03:45
@baloo baloo marked this pull request as ready for review August 13, 2024 06:41
@tarcieri tarcieri merged commit ab1f278 into RustCrypto:master Aug 13, 2024
20 checks passed
@baloo baloo deleted the baloo/ssh-cipher/decryptor-peek branch August 13, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants