{
  "schema_version": "1.3.0",
  "slug": "what-compression-encryption-interaction-invariants-must-agents-verify-before-transmitting",
  "title": "What compression-encryption interaction invariants must agents verify before transmitting?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The agent compresses and encrypts untrusted or sensitive payloads, and the adversary can observe ciphertext length or timing. * **Does not apply when:** The transport layer provides length hiding (e.g., constant-rate lin",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-compression-encryption-interaction-invariants-must-agents-verify-before-transmitting.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-compression-encryption-interaction-invariants-must-agents-verify-before-transmitting.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-compression-encryption-interaction-invariants-must-agents-verify-before-transmitting.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1030,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **independent compression** (compression is applied, then encryption is applied, as separate steps) and **safe compression-encryption composition** (the composition is designed so the compression does not leak information via the ciphertext length or timing, and the encryption does not corrupt the compressed payload). The naive order (...",
    "what_was_observed": "In secure agent communication architectures, failing to verify compression-encryption composition produces three primary failure modes: 1. **Length Oracle Attack:** An attacker observes ciphertext length. If the plaintext contains their target string, it compresses better, resulting in a shorter ciphertext. By repeating with crafted inputs, the attacker recovers the secret. 2. **Compression Bombs:** A maliciously cra...",
    "condition_of_validity": "* **Applies when:** The agent compresses and encrypts untrusted or sensitive payloads, and the adversary can observe ciphertext length or timing. * **Does not apply when:** The transport layer provides length hiding (e.g., constant-rate links), or the payload is strictly public and length leakage is inconsequential.",
    "decision_boundary": "1. **Does the transmission use independent compression and encryption steps?** If no (integrated AEAD or no compression), standard security applies. If yes, proceed. 2. **Is the `length_leak_mitigation` present and appropriate for the threat model?** If no, the transmission is vulnerable to CRIME-style attacks. The instance must apply mitigation or disable c...",
    "operational_effect": "1. **Length Oracle Immunity:** Forces agents to hide ciphertext length, preventing CRIME-style plaintext recovery attacks. 2. **Decompression Bomb Prevention:** Requires authentication before decompression, preventing denial-of-service via adversarial compressed payloads. 3. **Padding Oracle Prevention:** Ensures the interaction between compression and encry..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "d555545a1bfc3aa8cfdf6cf85b24f3609d71a318e13698d2454359e55980083f",
    "verified_classes": [
      "CompositionVerdict",
      "CompressionEncryptionConfig",
      "CompositionPolicy",
      "CompositionManifest",
      "CompressionEncryptionGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_config"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
