]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Round down hidden service descriptor publication times to nearest hour
authorNick Mathewson <nickm@torproject.org>
Wed, 18 Sep 2013 15:09:34 +0000 (11:09 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 20 Sep 2013 15:00:27 +0000 (11:00 -0400)
Implements part of proposal 222.  We can do this safely, since
REND_CACHE_MAX_SKEW is 24 hours.

changes/no_client_timestamps_024
src/or/rendservice.c

index 9ded8b3d9f08c273faf621c9ae55005b30d86f63..488630fb36859022f013f8e8b52aa0cc0e2fb1fc 100644 (file)
@@ -10,3 +10,5 @@
     - Stop sending timestamps in AUTHENTICATE cells. This is not such
       a big deal from a security point of view, but it achieves no actual
       good purpose, and isn't needed. Implements part of proposal 222.
+    - Reduce down accuracy of timestamps in hidden service descriptors.
+      Implements part of proposal 222.
index 00bca17d462b2b144e97ef75e62f2b5f7a108725..8a4a11e475bc22df6c7aa27400f418a734137a7c 100644 (file)
@@ -593,6 +593,7 @@ rend_service_update_descriptor(rend_service_t *service)
   d = service->desc = tor_malloc_zero(sizeof(rend_service_descriptor_t));
   d->pk = crypto_pk_dup_key(service->private_key);
   d->timestamp = time(NULL);
+  d->timestamp -= d->timestamp % 3600; /* Round down to nearest hour */
   d->intro_nodes = smartlist_new();
   /* Support intro protocols 2 and 3. */
   d->protocols = (1 << 2) + (1 << 3);