Optionally non-optional ed_pubkey for extend cell
https://gitweb.torproject.org/tor.git/tree/src/feature/relay/circuitbuild_relay.c#n111
circuit_extend_add_ed25519_helper
/* Fill in ed_pubkey if it was not provided and we can infer it from
* our networkstatus */
if (ed25519_public_key_is_zero(&ec->ed_pubkey)) {
const node_t *node = node_get_by_id((const char*)ec->node_id);
const ed25519_public_key_t *node_ed_id = NULL;
if (node &&
node_supports_ed25519_link_authentication(node, 1) &&
(node_ed_id = node_get_ed25519_id(node))) {
ed25519_pubkey_copy(&ec->ed_pubkey, node_ed_id);
}
}
https://gitweb.torproject.org/tor.git/tree/src/core/or/connection_or.c#n2026
connection_or_client_learned_peer_id
if (!expected_ed_key && ed_peer_id) {
log_info(LD_HANDSHAKE, "(We had no Ed25519 ID in mind when we made this "
"connection.)");
connection_or_set_identity_digest(conn,
(const char*)rsa_peer_id, ed_peer_id);
changed_identity = 1;
}
https://gitweb.torproject.org/tor.git/tree/src/core/or/channel.c#n2426
channel_get_for_extend
/* The Ed25519 key has to match too */
if (!channel_remote_identity_matches(chan, rsa_id_digest, ed_id)) {
continue;
}
zeroes + no node info = new extra channel