-
-
Notifications
You must be signed in to change notification settings - Fork 940
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
[Ed25519] Use BouncyCastle instead of Chaos.NaCl #1448
Conversation
Was going to remove the whole Chaos.NaCl folder once several other PRs get merged. Do you want me to remove it piece by piece? |
@@ -91,8 +92,7 @@ public ED25519Key(SshKeyData publicKeyData) | |||
throw new ArgumentException($"Invalid Ed25519 public key data ({publicKeyData.Name}, {publicKeyData.Keys.Length}).", nameof(publicKeyData)); | |||
} | |||
|
|||
PublicKey = publicKeyData.Keys[0].ToByteArray().Reverse().TrimLeadingZeros().Pad(Ed25519.PublicKeySizeInBytes); | |||
PrivateKey = new byte[Ed25519.ExpandedPrivateKeySizeInBytes]; | |||
PublicKey = publicKeyData.Keys[0].ToByteArray().Reverse().TrimLeadingZeros().Pad(Ed25519.PublicKeySize); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just keep the PrivateKey not-null unless we enable nullability here
PublicKey = publicKeyData.Keys[0].ToByteArray().Reverse().TrimLeadingZeros().Pad(Ed25519.PublicKeySize); | |
PublicKey = publicKeyData.Keys[0].ToByteArray().Reverse().TrimLeadingZeros().Pad(Ed25519.PublicKeySize); | |
PrivateKey = new byte[Ed25519.SecretKeySize]; |
I think either way is fine |
No description provided.