handleX25519MSG_KEX_ECDH_REPLY method
Completes X25519 key exchange.
Implementation
Uint8List handleX25519MSG_KEX_ECDH_REPLY(MSG_KEX_ECDH_REPLY msg) {
Uint8List fingerprint;
if (tracePrint != null) {
tracePrint('$hostport: MSG_KEX_ECDH_REPLY for X25519DH');
}
if (!acceptedHostkey) fingerprint = msg.kS;
K = x25519dh.computeSecret(msg.qS);
if (!computeExchangeHashAndVerifyHostKey(msg.kS, msg.hSig)) {
throw FormatException('$hostport: verify hostkey failed');
}
return fingerprint;
}