tor/src/feature/hs_common
George Kadianakis 5febea0d54 Fix revision counter bugs caused by bad SRV start time computation.
Bug description: For each descriptor, its revision counter is the OPE
ciphertext of the number of seconds since the start time of its SRV value.
This bug caused us to confuse the SRV start time in the middle of the lifetime
of a descriptor in some edge-cases, which caused descriptor rejects.

Bug cause: The bug occurs when we fetch a 23:00 consensus after
midnight (e.g. at 00:08 when not all dirauths have fetched the latest 00:00
consensus). In that case, the voting schedule (which was used for SRV start
time calculation) would return a valid-after past-midnight, whereas our
consensus would be pre-midnight, and that would confuse the SRV start time
computation which is used by HS revision counters (because we would reset the
start time of SRV, without rotating descriptors).

Bug fix: We now use our local consensus time to calculate the SRV start time,
instead of the voting schedule. The voting schedule does not work as originally
envisioned in this case, because it was created for voting by dirauths and not
for scheduling stuff on clients.
2018-08-22 18:09:47 +03:00
..
replaycache.c Fix every include path changed in the previous commit (automated) 2018-07-05 17:15:50 -04:00
replaycache.h Move literally everything out of src/or 2018-07-05 17:15:50 -04:00
shared_random_client.c Fix revision counter bugs caused by bad SRV start time computation. 2018-08-22 18:09:47 +03:00
shared_random_client.h Merge branch 'bug25552_ope_squashed' 2018-07-17 16:19:32 -04:00