I am learning SSH protocol. With my current understanding of SSH protocol, I think that message digest algorithms for using in digital signature should be derived from Key Exchange. But Openssh implementation uses only SHA1 for signing and verifying of digital signatures. SHA1 is hard coded in these two functions, ssh_dss_sign() and ssh_dss_verify().
I am wondering, does all the implementations of use SHA1 as hash algorithm for signing and verifying digital signatures. And why don't we use SHA-256 as it's better than SHA1?
Is there any specific reason for doing so..? If yes, could someone please provide some references.
Thanks in advance.
ssh_ecdsa_sign
inssh-ecdsa.c
andkey_ec_nid_to_hash_alg
inkey.c
.) $\endgroup$