4 releases (breaking)
Uses new Rust 2024
| 0.4.0 | Feb 5, 2026 |
|---|---|
| 0.3.0 | Feb 4, 2026 |
| 0.2.0 | Jan 18, 2026 |
| 0.1.0 | Jan 17, 2026 |
#1335 in Algorithms
Used in 3 crates
33KB
712 lines
APFSDS Obfuscation - Traffic obfuscation utilities
This crate provides:
- SIMD XOR mask (AVX2 + portable fallback)
- Smart padding (matching target distribution)
- Compression utilities
- Timing jitter
- Decoy traffic generation
apfsds-obfuscation
Traffic obfuscation layer for APFSDS.
Features
- XorMask: Rolling XOR mask with session-derived key
- Padding: Size obfuscation with random or fixed-block padding
- Compression: Optional LZ4 compression for payloads
Usage
use apfsds_obfuscation::{XorMask, Padder, PaddingStrategy};
// XOR masking
let mask = XorMask::from_session_key(&session_key);
let masked = mask.apply(&data);
let original = mask.apply(&masked); // XOR is symmetric
// Padding
let padder = Padder::new(PaddingStrategy::Random { min: 8, max: 64 });
let padded = padder.pad(&data);
let unpadded = padder.unpad(&padded)?;
Obfuscation Pipeline
Plaintext → Compress → Pad → XOR Mask → Ciphertext
License
MIT
Dependencies
~5–7MB
~113K SLoC