What the Encrypted Holes Reveal: Image-Level Anonymity for Region-Encrypted Photos

Many organizations need to share a photo with some parts hidden. A camera may need to upload a frame where faces, screens, or license plates are readable only by a security team, while everyone else sees the rest of the scene. The usual design has two parts. A segmentation model draws masks around the sensitive regions, and each region is encrypted to whoever may see it. The cryptography literature has worked hard on two properties that matter here. The first is constant-size ciphertext, meaning the encrypted header does not grow with the number of recipients or the depth of an organizational hierarchy. The second is ciphertext anonymity, meaning an observer cannot tell from a ciphertext who it is addressed to. Both properties have been studied only for opaque byte strings. A photo is not opaque. The shape, position, and count of encrypted regions, together with the visible context around them, can say what was hidden and which clearance level it was hidden for. This holds even when every individual ciphertext is cryptographically anonymous.

This note proposes to define and measure anonymity for region-encrypted images at the level of the whole image, and to close the leak it finds. The attacker we study is a vision-language model. Such models are known to be good at saying what a scene contains from global context and poor at saying where, a weakness known as the global-local alignment gap. We use that same strength in reverse: the visible context predicts the hidden local content. The claim is that per-ciphertext anonymity and constant size are necessary but not sufficient. A content-independent encryption layout is also needed. Such a layout gives every image the same tiling, encrypts every tile with an indistinguishable constant-size header, and adds decoy restricted tiles under a leakage budget. It can drive a model-based attacker toward chance at a measurable cost in visible image area.

Core Claim and Why It Is Not Already Done

The closest cryptographic work treats the payload as meaningless bits. Ge et al.'s micro-video subscribing system encrypts whole video files under broadcast proxy re-encryption with constant (~3 ms) subscriber decryption. It exposes subscriber identities to the cloud and has no region-level control. Kobayashi et al. achieve anonymous hierarchical identity-based encryption, in which identities form a tree such as org/role/team. Their ciphertext is fixed at 4 group elements and decryption costs 3 pairings, regardless of depth. Their scheme hides which node a ciphertext targets, but only for a single message. Ren et al. hide a whole broadcast audience but pay $O(L)$ ciphertext size for $L$ recipients, and they state that constant-size fully anonymous broadcast is open. The dense vision-language work never touches encryption. DenseCLIP builds pixel-text score maps from pre-pooling features. ClearCLIP recovers training-free localization by removing the final-layer residual and feed-forward block. The research file reports no work connecting anonymity with dense vision-language alignment.

What is new here is not a new pairing scheme. We reuse Kobayashi et al.'s scheme as the key-encapsulation step, meaning the step that wraps a short symmetric key for each tile. The new parts are three. First, an image-level anonymity game. Second, vision-language attackers that win it against naive designs. Third, a layout defense whose security does not depend on the segmenter being accurate. Constant-size headers enter as a precondition rather than a goal. If header length varied with policy depth or audience size, as in Ren et al., the byte length alone would tell a network observer which tiles are sensitive.

Threat Model and the Two Leaks

We separate two observers. The outsider is the storage cloud or a network observer, who holds no keys. Here the leak is structural: the number, sizes, and positions of encrypted regions. With a fixed tiling and constant-size anonymous headers on every tile, the outsider's view does not depend on image content, and the cryptographic anonymity proof carries over directly. The insider holds a low-clearance key, opens the tiles it may see, and learns where the tiles it cannot open sit. This existence leak cannot be removed. It mirrors in spirit the lower bound of Smith et al., who show that hiding the recipient set from the recipients themselves rules out constant-size threshold ciphertexts. We therefore do not try to hide existence from insiders. We try to make existence and hole geometry uninformative about the hidden category and about which higher tier holds access.

We score the insider game as attacker advantage over the base rate. The attacker sees the visible tiles and the hole mask, then guesses the hidden category from a fixed sensitive vocabulary, or guesses which hierarchy node the hidden tiles were encrypted to. Advantage is accuracy minus the accuracy of always guessing the most frequent class.

Research Program

We build three pipelines that share one segmentation front end, so that differences come from the encryption layout rather than the masks. The exact-mask pipeline encrypts each sensitive mask as one region. It uses a variable-length policy header, as in Ge et al., or a Ren-style anonymous broadcast header. The padded hybrid pipeline encrypts each region with symmetric authenticated encryption and wraps the keys with anonymous constant-size headers, padded to a fixed maximum number $K$ of distinct policies per image. The content-independent tiling pipeline divides every image into the same $G \times G$ grid. It encrypts every tile, sensitive or not, with a constant-size anonymous header from Kobayashi et al.'s scheme; public tiles go to a root node whose key everyone holds. It then dilates sensitive regions to tile boundaries and marks additional decoy tiles as restricted. Decoys are chosen to maximize the attacker's confusion per unit of lost visible area.

The segmentation front end will be run in two forms. One is training-free ClearCLIP with ViT-B/16 and ViT-L/14. The other is supervised DenseCLIP. Running both lets us measure how localization error converts into privacy failure. A missed sensitive pixel is shipped to the root tier, so tile-level mask recall is the relevant quantity, not mIoU. ClearCLIP's observation that larger backbones localize worse without surgery gives a sharp, testable prediction. Under the naive pipelines, the larger backbone should leak more because its masks miss more. Under tiling with dilation, the gap between backbones should shrink.

The attackers are deliberately strong. One is CLIP zero-shot classification of the hole-masked image against the sensitive vocabulary, which is the global "what" signal. Another is ClearCLIP dense scoring of the context tiles around the hole. The third is a small classifier trained on hole-mask geometry alone, which isolates the shape leak from the context leak.

Baselines

The do-nothing reference encrypts the whole image under one anonymous header. It has zero attacker advantage by construction and zero insider utility, so it anchors the leakage end of the trade-off curve. At the other end, plaintext release with no encryption gives full utility and fixes the attacker's ceiling.

The exact-mask, labeled-header baseline is region encryption in the style of Ge et al. with a readable policy per region. It is the natural extension of the strongest deployed system in the file. The exact-mask, anonymous baseline swaps in Ren et al.'s fully anonymous headers. We expect it to leak to outsiders through its $O(L)$ length, and the reported $O(L)$ size and $O(L)$ decryption pairings are the only figures the file provides for it.

The strongest competitor is the padded hybrid design, because it already achieves constant per-image header overhead and per-ciphertext anonymity using standard tools. It is run on the same images, the same masks, and the same attackers, with $K$ swept, and with the same tile-dilation and decoy budget available to it. Our tiling design beats it only if it reaches lower insider attacker advantage at equal visible-area utility, or equal advantage at lower ciphertext bytes. If padded hybrid with the decoy layout matches tiling, we will report that the layout, not the key-encapsulation choice, carries the result.

For the segmentation front end, the strongest reported training-free numbers in the file are from ClearCLIP: 23.9 mIoU on COCOStuff with ViT-B/16, against 4.4 for vanilla CLIP, and 34.5 mIoU averaged over five datasets with ViT-L/14, against 23.6 for SCLIP. The strongest supervised number is DenseCLIP's 43.5% mIoU on ADE20K with ResNet-50. On the cryptographic side, the reference cost is Kobayashi et al.'s 4 group elements and 3 pairings per header. We found no reported result on Lacuna for any attack that infers hidden content from region-encrypted images, so the attack numbers will be new.

Two ablations isolate the key ingredient. One removes decoys while keeping tiling. The other keeps decoys while using exact-mask geometry. Together they separate how much protection comes from content-independent tile boundaries and how much from decoy placement.

Why not just…?

Why not just encrypt the whole image and let authorized clients run segmentation themselves? If no one needs partial views, this is the right answer, and it is our do-nothing baseline. It gives up exactly the use case that motivates the work: a low-clearance viewer seeing the scene minus the sensitive parts. It also pushes dense model inference onto edge devices, which Ge et al.'s mobile setting suggests is costly. The trade-off curve will show how much utility this option forfeits.

Why not just use symmetric per-region encryption with padded anonymous key wrapping? This is a real threat to the cryptographic part of the proposal. It probably matches tiling on outsider anonymity and may win on bytes, given the large element size of composite-order groups that Kobayashi et al. require. We therefore make it a first-class baseline and frame the contribution around the layout and the attack evaluation. If padded hybrid with decoys wins, the paper's conclusion becomes "use padded hybrid with a content-independent layout," which is still the finding about image-level leakage.

Why not just run inference in a trusted enclave and release redacted outputs? Contiu et al. show SGX can shrink group access metadata dramatically, but enclaves have limited protected memory, and ViT-L dense score maps are large. More importantly, an enclave changes who performs the redaction, not what the released image reveals. The insider-geometry leak is identical whether masks were computed in an enclave or anywhere else, and our insider experiments measure exactly that leak.

Why not just fine-tune a better segmenter so masks are exact? Better masks reduce missed pixels, and the DenseCLIP arm tests this directly. Even perfect masks leave the hole shape and the visible context. The geometry-only attacker and the CLIP context attacker are run on ground-truth masks to show whether leakage persists when localization error is zero. If it does not persist, our claim reduces to a segmentation-quality claim, and we will say so.

Proposed Experiments

We define sensitive vocabularies over ADE20K SceneParse150 (for example person, screen, signboard, car) and over COCOStuff and PASCAL VOC person/vehicle classes. We assign images synthetic hierarchies of 2 to 6 levels so that hierarchy depth and audience size vary.

The first decisive check targets the outsider. We train a classifier on ciphertext byte lengths and positions alone. It should beat chance against the exact-mask anonymous baseline, which leaks through its $O(L)$ length, and should sit at chance against tiling.

The second decisive check targets the insider. For each pipeline and front end, we plot attacker advantage for hidden-category and hidden-tier inference against the fraction of non-sensitive pixels left visible. These runs are done with ground-truth masks and with ClearCLIP ViT-B/16, ClearCLIP ViT-L/14, and DenseCLIP masks.

The predictions are specific. With ground-truth masks, the CLIP context attacker and the geometry attacker should have clearly positive advantage on exact-mask pipelines, which would show that hole shape and context leak independently of segmentation error. Under the naive pipelines, ViT-L/14 masks should leak more than ViT-B/16 masks through missed sensitive tiles. Tiling with decoys should push both attackers near zero advantage while keeping a usable share of the image. We also report header bytes per image and decryption time per tile from the Pairing-Based Cryptography library, compared against the padded hybrid at matched $K$. These numbers determine whether constant-size anonymous headers on every tile cost an acceptable amount in practice.