mirage / awa-ssh

Purely functional SSH library in ocaml.
ISC License
104 stars 12 forks source link

new KEX: ECDH_X25519 #15

Closed hannesm closed 4 years ago

hannesm commented 4 years ago

this uses hacl_x25519 to get ECDH_X25519 support for the ssh client. Since the encoding is slightly different (unsigned mpint instead of mpint), new messages and code paths are needed (that avoid checks for negative numbers, potentially adding a leading zero byte). This has been tested against an OpenSSH server.

Specification in https://tools.ietf.org/html/rfc8731 (should be the same as https://git.libssh.org/projects/libssh.git/tree/doc/curve25519-sha256@libssh.org.txt), but I couldn't bother to add support for multiple names for a single kex