-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for curve25519-sha256 key exchange method #306
Conversation
The CI action is awaiting approval @tmds |
@scott-xu looks good! I'd like to share some code with the |
That's exactly what I'm doing right now and is the reason why I convert it back to Draft. |
I got some challenges when I try to put most logics in the base var reader = packet.GetReader();
reader.ReadMessageId(MessageId.SSH_MSG_KEX_ECDH_REPLY);
SshKey public_host_key = reader.ReadSshKey();
ReadServerExchangeValue(reader);
ReadOnlySequence<byte> exchange_hash_signature = reader.ReadStringAsBytes();
reader.ReadEnd();
return (
public_host_key,
exchange_hash_signature); protected override void ReadServerExchangeValue(SequenceReader reader)
{
q_s = reader.ReadStringAsECPoint();
} |
I don't want to try and split the key exchange in several abstract methods that a derived class then implements because of these challenges. I would like to focus on the sections of code I commented on and let each derived class use them in their |
Might be good to use another PR for |
@scott-xu, thank you for implementing |
This PR adds support for
curve25519-sha2
key exchange method described by https://datatracker.ietf.org/doc/html/rfc8731Close #307