@@ -20,12 +20,13 @@ import (
20
20
)
21
21
22
22
const (
23
- kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1"
24
- kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1"
25
- kexAlgoECDH256 = "ecdh-sha2-nistp256"
26
- kexAlgoECDH384 = "ecdh-sha2-nistp384"
27
- kexAlgoECDH521 = "ecdh-sha2-nistp521"
28
- kexAlgoCurve25519SHA256 = "[email protected] "
23
+ kexAlgoDH1SHA1 = "diffie-hellman-group1-sha1"
24
+ kexAlgoDH14SHA1 = "diffie-hellman-group14-sha1"
25
+ kexAlgoECDH256 = "ecdh-sha2-nistp256"
26
+ kexAlgoECDH384 = "ecdh-sha2-nistp384"
27
+ kexAlgoECDH521 = "ecdh-sha2-nistp521"
28
+ kexAlgoCurve25519SHA256LibSSH = "[email protected] "
29
+ kexAlgoCurve25519SHA256 = "curve25519-sha256"
29
30
30
31
// For the following kex only the client half contains a production
31
32
// ready implementation. The server half only consists of a minimal
@@ -410,13 +411,13 @@ func init() {
410
411
kexAlgoMap [kexAlgoECDH384 ] = & ecdh {elliptic .P384 ()}
411
412
kexAlgoMap [kexAlgoECDH256 ] = & ecdh {elliptic .P256 ()}
412
413
kexAlgoMap [kexAlgoCurve25519SHA256 ] = & curve25519sha256 {}
414
+ kexAlgoMap [kexAlgoCurve25519SHA256LibSSH ] = & curve25519sha256 {}
413
415
kexAlgoMap [kexAlgoDHGEXSHA1 ] = & dhGEXSHA {hashFunc : crypto .SHA1 }
414
416
kexAlgoMap [kexAlgoDHGEXSHA256 ] = & dhGEXSHA {hashFunc : crypto .SHA256 }
415
417
}
416
418
417
- // curve25519sha256 implements the [email protected] key
418
- // agreement protocol, as described in
419
- // https://git.libssh.org/projects/libssh.git/tree/doc/[email protected]
419
+ // curve25519sha256 implements the curve25519-sha256 (formerly known as
420
+ // [email protected] ) key exchange method, as described in RFC 8731.
420
421
type curve25519sha256 struct {}
421
422
422
423
type curve25519KeyPair struct {
0 commit comments