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: length handling improvements #255

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

tarcieri
Copy link
Member

Adds an Error::Length variant and returns it whenever the input buffer for an encryption/decryption operation is not properly aligned to the cipher's block size.

Also adds a private Cipher::check_key_and_iv method to validate keys/IVs are the expected size and return appropriate erros if they are not.

@tarcieri tarcieri force-pushed the ssh-cipher/length-handling-improvements branch 10 times, most recently from cbc0132 to 798b065 Compare July 28, 2024 23:54
Adds an `Error::Length` variant and returns it whenever the input buffer
for an encryption/decryption operation is not properly aligned to the
cipher's block size.

Also adds a private `Cipher::check_key_and_iv` method to validate
keys/IVs are the expected size and return appropriate erros if they are
not.
@tarcieri tarcieri force-pushed the ssh-cipher/length-handling-improvements branch from 798b065 to 74f7136 Compare July 28, 2024 23:56
@tarcieri tarcieri merged commit 97b31da into master Jul 29, 2024
20 checks passed
@tarcieri tarcieri deleted the ssh-cipher/length-handling-improvements branch July 29, 2024 00:00
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.

1 participant