When a session is opened to an SSH/SFTP server, the WinSCP log includes details of the encryption algorithm that's used.
The PuTTY code responsible for recording the encryption algorithm uses a human readable description. This description has no significance outside of PuTTY, consequently this makes it impossible to cross-reference it against the IANA's Secure Shell Encryption Algorithm Name registry (
https://www.iana.org/assignments/ssh-parameters/ssh-parameters.xhtml#ssh-parameters-17).
Here's the code that's responsible for writing to the log:
https://git.tartarus.org/?p=simon/putty.git;a=blob;f=ssh2bpp.c;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l132
132 bpp_logevent("Initialised %s outbound encryption",
133 ssh_cipher_alg(s->out.cipher)->text_name);
134 } else {
190 bpp_logevent("Initialised %s inbound encryption",
191 ssh_cipher_alg(s->in.cipher)->text_name);
192 } else {
The description is held in the
text_name property of an initialised
ssh_cipheralg struct. The initialised
ssh_cipheralg also contains the encryption algorithm's official IANA name
in the
ssh2_id property.
* ssh_cipheralg definition:
https://git.tartarus.org/?p=simon/putty.git;a=blob;f=ssh.h;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l627
* ssh_cipheralg initialisation:
https://git.tartarus.org/?p=simon/putty.git;a=blob;f=sshaes.c;hb=2762a2025f094bf8ccb75c0bdd7c655bc953f2f1#l108
Would it be possible to expose the
ssh2_id so it's accessible in the WinSCP .Net assembly (WinSCPnet.dll)?