Module tor_hscrypto::ope

source ·
Available on crate feature ope only.
Expand description

A simple order-preserving encryption function.

This function is used to generate revision counters for onion service descriptors. It is not suitable for other purposes.

The scheme here is the one described in the specifications as “Encrypted Time In Period”.

It is loosely based on the scheme first described in G. Bebek. “Anti-tamper database research: Inference control techniques.”“ Technical Report EECS 433 Final Report, Case Western Reserve University, November 2002.

Structs§

  • Key for a simple order-preserving encryption on the offset from the start of an SRV protocol run.
  • An opaque offset within an SRV period.