Expand description
An implementation of Tor’s current relay cell cryptography.
These are not very good algorithms; they were the best we could come up with in ~2002. They are somewhat inefficient, and vulnerable to tagging attacks. They should get replaced within the next several years. For information on some older proposed alternatives so far, see proposals 261, 295, and 298.
I am calling this design tor1; it does not have a generally recognized
name.
Modules§
- bench_
utils - Benchmark utilities for the
tor1module.
Structs§
- Client
Inbound - An outbound client layer, decryption relay cells from a relay.
- Client
Outbound - An outbound client layer, encrypting relay cells for a relay.
- Crypt
State 🔒 - A CryptState represents one layer of shared cryptographic state between a relay and a client for a single hop, in a single direction.
- Crypt
State Pair - A pair of CryptStates shared between a client and a relay, one for the outbound (away from the client) direction, and one for the inbound (towards the client) direction.
- Relay
Inbound - An inbound relay layer, encrypting relay cells for a client.
- Relay
Outbound - An outbound relay layer, decrypting relay cells from a client.
Constants§
- DIGEST_
RANGE 🔒 - Location in the relay cell for our “Digest” field.
- EMPTY_
DIGEST 🔒 - An all-zero digest value.
- RECOGNIZED_
RANGE 🔒 - Location in the relay cell for our “recognized” field.
- SENDME_
TAG_ 🔒LEN - Length of SENDME tag generated by this encryption method.