Commit Graph

3 Commits

Author SHA1 Message Date
Lucas Chollet
c8e5a4581c LibSSH: Make TypedBlob constructible from raw bytes or a string
This will later be used for reading public keys from the network or from
a local file.
2026-04-08 13:43:19 +02:00
Lucas Chollet
bed715c323 LibSSH+SSHServer: Add support for decrypting packets using ChaCha20
This means that we can now decrypt the SERVICE_REQUEST message, and we
log:

Client protocol string: SSH-2.0-OpenSSH_10.0p2 Ubuntu-5ubuntu5.1
KEXINIT message sent
KEX_ECDH_REPLY message sent
NEWKEYS message received, we should use encryption from now on
Service 'ssh-userauth' requested
error: Draw the rest of the owl
2026-03-23 12:43:36 +01:00
Lucas Chollet
eaee493008 LibSSH+SSHServer: Perform a key exchange on connection
This is once again very limited. We only support one `curve25519-sha256`
for the key exchange and `ssh-ed25519` as the host key.

With the SSH_DEBUG macro set and connecting from my host, it now prints:
```
Client protocol string: SSH-2.0-OpenSSH_10.0p2 Ubuntu-5ubuntu5
KEXINIT message sent
KEX_ECDH_REPLY message sent
error: Draw the rest of the owl
```
The client seems happy with the key exchange, and the following message
is encrypted!
2026-03-17 13:33:25 +01:00