Generate revision counters by encrypting the timestamp
We're currently using the "Increment-on-generation" approach described in rend-spec-v3 Appendix F.1., except the revision counter is not persisted across restarts. A service restarting after publishing a descriptor with the revision counter set to N
will fail to republish its descriptors after the restart, because the HSDirs will reject any new descriptors that have a revision counter < N + 1
(the revision counter is incremented when the time period changes or when the IPTs change, so the service will succeed in republishing its descriptors, as the revision counter will reach N + 1
).
We need to replace this with the OPE-encryption based approach from Appendix F.2.