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§
- AesOpe
Key - Key for a simple order-preserving encryption on the offset from the start of an SRV protocol run.
- SrvPeriod
Offset - An opaque offset within an SRV period.
Constants§
- DERIVATION_
PREFIX 🔒 - A prefix used when deriving an AES key for this purpose.
Functions§
- add_
slice_ 🔒as_ le_ u16 - Treating
slice
as a sequence of little-endian 2-byte words, add them into a u64.