Pure-Rust asynchronous SSH library, both client and server

#69 PR? AES256-GCM implementation

Opened by Eugeny on February 7, 2022
Eugeny on February 7, 2022

Hi, I know you said you’d like to concentrate on supporting modern ciphers only, but are you open to accepting an AES256-GCM implementation into the repo?

I have one ready to go (via thrussh-libsodium).

If you’re up to it - GCM needs an internal counter, and it can’t use the sequence number directly since the first two packets are not encrypted. Is making SealingKey and OpeningKey trait methods take a mutable self an acceptable solution, or is it ok to just hardcode the GCM counter as sequence_number - 3 like I did?

pmeunier on February 7, 2022

Yes, it would be cool, especially if it’s feature-gated. I’m not sure what you’re talking about in the second one, this sounds sensitive enough to not be able to give an opinion without seeing the code first. I don’t remember what SealingKey and OpeningKey are, tbh.

Eugeny on February 7, 2022

I’m ashamed to say I couldn’t get pijul to work on my macOS, so here’s a diff: https://github.com/Eugeny/thrussh/compare/aes256gcm?expand=1

Here are the main points:

Let me know if you see anything that needs changing!