add support for ed25519 authentication #1220
Closed
+4,968
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds support for connecting to servers that require ed25519 authentication.
Checklist
Reference implementations:
The ed25519 implementation was taken from here because it was portable C (and therefore easy to make work with cgo) and because it was very close to the code the reference C implementation was derived from.
The biggest issue with this is that it introduces a dependency on cgo. I spent a fair amount of time trying to get this going with the ed25519 implementation from the standard library (crypto/ed25519), but I lack the cryptography knowledge to figure out what is happening here on a high level so I can use the corresponding high-level functions from crypto/ed25519.
If cgo is a deal breaker (and there is not someone else on the team with the knowledge/time to implement this in pure go), would it be worth exploring an API to allow additional authentication methods as "plugins"? I could then implement this as a plugin and only users who needed ed25519 would have to worry about cgo.