vLLM vllm/v1/core/kv_cache_utils.py: prefix-cache block hashing, cache_salt, DEFAULT_NONE_HASH_SEED
repo
Fields
id
sources/sec-vllm-kv-block-hash-sourcePublisher
vLLM project
Kind
repo
Published
2026-10-04
Accessed
2026-10-04
notes
The isolation knob that actually exists in the engine. Block hashes are sha256 by default, derived from a FIXED default seed so independent processes compute identical hashes for identical content and can share a prefix cache across nodes; the comment is explicit that keeping the seed secret is NOT what provides collision resistance. cache_salt is named in the code as 'the mechanism for intentional cache isolation' and is folded into the hash only for the first block (start_token_idx == 0). Non-cryptographic hashes keep a per-process random seed because a predictable seed would let an attacker precompute colliding blocks offline (issue #12621).
Notes
The isolation knob that actually exists in the engine. Block hashes are sha256 by default, derived from a FIXED default seed so independent processes compute identical hashes for identical content and can share a prefix cache across nodes; the comment is explicit that keeping the seed secret is NOT what provides collision resistance. cache_salt is named in the code as 'the mechanism for intentional cache isolation' and is folded into the hash only for the first block (start_token_idx == 0). Non-cryptographic hashes keep a per-process random seed because a predictable seed would let an attacker precompute colliding blocks offline (issue #12621).
Cross-references
This record references no other records.