Traffic Analysis Resistance

KayakNet implements multiple techniques to resist traffic analysis attacks.

What is Traffic Analysis?

Traffic analysis examines metadata (timing, size, patterns) to learn about communications without reading content.

Even with encryption, an adversary can learn:

  • When you're active

  • Who you communicate with (by correlating endpoints)

  • How much you communicate

  • Patterns of behavior

Protection Techniques

1. Constant Packet Size

All packets are padded to a fixed size (1024 bytes):

┌────────────────────────────────────────────────┐
│ Small message (50 bytes)                       │
│ + Padding (974 bytes) = 1024 bytes             │
└────────────────────────────────────────────────┘

┌────────────────────────────────────────────────┐
│ Large message (900 bytes)                      │
│ + Padding (124 bytes) = 1024 bytes             │
└────────────────────────────────────────────────┘

Effect: Observer cannot determine message size.

2. Timing Obfuscation

Random delays are added to message forwarding:

Effect: Harder to correlate by timing.

3. Traffic Mixing

Multiple messages are batched and shuffled:

Effect: Order doesn't reveal source-destination relationship.

4. Dummy Traffic

Nodes send fake messages to obscure real patterns:

Effect: Activity level is constant regardless of real usage.

5. Circuit Rotation

Onion routing circuits are changed periodically:

Time
Circuit

0-10 min

A → B → C

10-20 min

D → E → F

20-30 min

G → H → I

Effect: Long-term correlation is harder.

Configuration

Performance Impact

Technique
Latency Impact
Bandwidth Impact

Padding

None

+20-50%

Timing

+50ms avg

None

Mixing

+50ms avg

None

Dummy traffic

None

+20%

Total typical impact:

  • Latency: +100ms

  • Bandwidth: +40%

Threat Scenarios

Scenario 1: ISP Monitoring

Attack: ISP logs packet timing/sizes

Protection:

  • Padding hides message sizes

  • Constant traffic hides activity patterns

  • TLS hides content

Result: ISP sees uniform encrypted traffic

Scenario 2: Timing Correlation

Attack: Observer at entry and exit nodes correlates timing

Protection:

  • Random delays break correlation

  • Mixing shuffles order

  • Multiple circuits in use

Result: Probabilistic, not certain, correlation

Scenario 3: Traffic Confirmation

Attack: Adversary controls entry and exit nodes

Protection:

  • Can't be fully prevented

  • Mixing reduces confidence

  • Circuit rotation limits window

Result: Attack succeeds with lower confidence

Limitations

What We Can't Prevent

  1. Global adversary - If they see everything, correlation is possible

  2. Long-term analysis - Patterns may emerge over time

  3. Active attacks - Adversary can inject traffic to trace

Recommendations

For high-security needs:

  • Use VPN/Tor as additional layer

  • Vary usage patterns

  • Use multiple identities

  • Air-gapped sensitive operations

Comparison

Feature
KayakNet
Tor
I2P

Padding

Yes

Limited

Yes

Timing obfuscation

Yes

No

Yes

Mixing

Yes

No

Yes

Dummy traffic

Yes

No

No

Circuit rotation

Yes

Yes

Continuous

Measuring Protection

Test Your Setup

Verify Timing

All packets should have:

  • Similar sizes (around 1024 bytes)

  • Variable inter-arrival times

  • No obvious patterns

Last updated