Eugeny/russh

Incorrect sha2 hash function for ecdh-sha2-nistp{384,521}

Closed this issue · 0 comments

#282 added support for ecdh-sha2-nistp{256,384,521} key exchange algorithms, but uses sha2::Sha256 to compute the exchange hash for each algorithm. The sha2 hash used should adhere to the spec described in RFC 5656 Section 6.3. ecdh-sha2-nistp384 should be hashed using SHA384 and ecdh-sha2-nistp521 should be hashed using SHA512. Unclear if the same is true for fn compute_keys.

I may not have time to address this for several weeks, so raising an issue in case someone is willing and able to resolve in the meantime.