╭ changed ───────╮ │src/test/ssh.zig│ ╰────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │141 // algorithm in each slot that the *client* prefers and the server also │ │142 // offers is selected. Both raw KEXINITs are hashed into the exchange │ │143 // hash so tampering is caught at signature verification time. │ │144 - const client_kex_init = try proto.buildKexInit(io, allocator, &proto.our_kex_algos, &proto.our_host_key_algos, &proto.our_ciphers); │ │144 + const client_kex_init = try proto.buildKexInit(io, allocator, &.{"curve25519-sha256"}, &proto.our_host_key_algos, &proto.our_ciphers);│ │145 defer allocator.free(client_kex_init); │ │146 try proto.writePlainPacket(io, cw, client_kex_init); │ │147 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 │ │200 // Recompute H independently. If the server lied about any input the │ │201 // signature won't verify against the trusted host key. │ │202 - const h = try proto.computeExchangeHash(allocator, v_c, v_s, client_kex_init, server_kex_init, k_s, &client_eph.public_key, &server_eph_pub, &k); │ │202 + const h = try proto.computeExchangeHash(allocator, v_c, v_s, client_kex_init, server_kex_init, k_s, &client_eph.public_key, &server_eph_pub, &k, false);│ │203 │ │204 // Verify the host signature on H. │ │205 { │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │229 } │ │230 │ │231 var keys: proto.SessionKeys = undefined; │ │232 - try proto.deriveSessionKeys(allocator, &k, &h, &h, &keys); │ │232 + try proto.deriveSessionKeys(allocator, &k, &h, &h, &keys, false); │ │233 // KEXINIT/KEX_ECDH_INIT/NEWKEYS were seqno 0/1/2; first encrypted is 3.│ │234 var cs_cipher = proto.Cipher.init(&keys.cs_enc, 3); │ │235 var sc_cipher = proto.Cipher.init(&keys.sc_enc, 3); │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │478 const v_s = try allocator.dupe(u8, v_s_trimmed); │ │479 defer allocator.free(v_s); │ │480 │ │481 - const ckex = try proto.buildKexInit(io, allocator, &proto.our_kex_algos, &proto.our_host_key_algos, &proto.our_ciphers); │ │481 + const ckex = try proto.buildKexInit(io, allocator, &.{"curve25519-sha256"}, &proto.our_host_key_algos, &proto.our_ciphers);│ │482 defer allocator.free(ckex); │ │483 try proto.writePlainPacket(io, cw, ckex); │ │484 const skex = try proto.readPlainPacket(allocator, cr); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │504 const sig_blob = try proto.takeStringField(allocator, &rr, 1024); │ │505 defer allocator.free(sig_blob); │ │506 const k = try X25519.scalarmult(eph.secret_key, server_pub); │ │507 - const exchange = try proto.computeExchangeHash(allocator, client_version, v_s, ckex, skex, k_s, &eph.public_key, &server_pub, &k); │ │507 + const exchange = try proto.computeExchangeHash(allocator, client_version, v_s, ckex, skex, k_s, &eph.public_key, &server_pub, &k, false);│ │508 │ │509 try proto.writePlainPacket(io, cw, &[_]u8{proto.SSH_MSG_NEWKEYS}); │ │510 { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │514 } │ │515 │ │516 var keys: proto.SessionKeys = undefined; │ │517 - try proto.deriveSessionKeys(allocator, &k, &exchange, &exchange, &keys); │ │517 + try proto.deriveSessionKeys(allocator, &k, &exchange, &exchange, &keys, false);│ │518 cs = proto.Cipher.init(&keys.cs_enc, 3); │ │519 sc = proto.Cipher.init(&keys.sc_enc, 3); │ │520 session_id = exchange; │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯