From c5d6e72720522308ee474e86b790316583433be1 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 14 Oct 2020 13:21:46 +0200 Subject: [PATCH] comment PairFromED25519 --- helper/communicator/sshkey/generate.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/communicator/sshkey/generate.go b/helper/communicator/sshkey/generate.go index d5dbdbde5..9d3582b00 100644 --- a/helper/communicator/sshkey/generate.go +++ b/helper/communicator/sshkey/generate.go @@ -62,6 +62,10 @@ func NewPair(public, private interface{}) (*Pair, error) { }, nil } +// PairFromED25519 marshalls a valid pair of openssh pem for ED25519 keypairs. +// NewPair can handle ed25519 pairs but generates the wrong format apparently: +// `Load key "id_ed25519": invalid format` is the error that happens when I try +// to ssh with such a key. func PairFromED25519(public ed25519.PublicKey, private ed25519.PrivateKey) (*Pair, error) { // see https://github.com/golang/crypto/blob/7f63de1d35b0f77fa2b9faea3e7deb402a2383c8/ssh/keys.go#L1273-L1443 key := struct {