Context. In my quest on figuring out if I must use NEWNYM
signal or stream isolation is enough for me I dig into the code and narrowed down the possible privacy improvements that NEWNYM
can bring over simple stream isolation, so I can ask more specific questions. One of it is clearing the client side DNS cache.
Goal. My goal is to be able to talk with a server with two different identity, without the server, learning let's say Alice and Bob are the same user. Where the server is a hidden service.
What I know. This answer explains one thing that Tor does for NEWNYM
request:
src/or/addressmap.c:addressmap_clear_transient
this clears the client-side DNS cache, as mentioned in the spec (any mapping between address and IP)
Looking into the code CLEARDNSCACHE
signal does exactly this, it calls the same addressmap_clear_transient()
method.
Question. Is there a risk the server can learn the connection between Alice and Bob without clearing the client side DNS cache? If so, then how much of this risk is?
For reference I also drop the code here, its comments may be useful:
/** Remove all entries from the addressmap that are set to expire, ever. */
void
addressmap_clear_transient(void)
{
addressmap_get_mappings(NULL, 2, TIME_MAX, 0);
}
/** Iterate over all address mappings which have expiry times between
* min_expires and max_expires, inclusive. If sl is provided, add an
* "old-addr new-addr expiry" string to sl for each mapping, omitting
* the expiry time if want_expiry is false. If sl is NULL, remove the
* mappings.
*/
void
addressmap_get_mappings(smartlist_t *sl, time_t min_expires,
time_t max_expires, int want_expiry)
{
...
}