handleEcDhMSG_KEX_ECDH_INIT method

void handleEcDhMSG_KEX_ECDH_INIT(
  1. MSG_KEX_ECDH_INIT msg
)

Implementation

void handleEcDhMSG_KEX_ECDH_INIT(MSG_KEX_ECDH_INIT msg) {
  initializeDiffieHellman(kexMethod, random);
  K = ecdh.computeSecret(msg.qC);
  Uint8List kS = identity.getRawPublicKey(hostkeyType);
  updateExchangeHash(kS);
  writeClearOrEncrypted(MSG_KEX_ECDH_REPLY(ecdh.cText, kS,
      identity.signMessage(hostkeyType, exH, getSecureRandom())));
  sendNewKeys();
}