Policy-Aligned Naming for Caching Partially Secret XML Documents in Named Data Networks

Many structured documents mix secret and public parts. A medical record, a purchase order, or a service configuration is usually stored as an XML tree (a nested hierarchy of tagged elements). Different readers may see different subtrees of that same tree. The XML security literature has tools for this: per-element encryption and access policies that pass down through the tree. It assumes the server or a gateway decides, request by request, who sees what.

Named Data Networking (NDN) is an architecture in which consumers ask for data by name and any router holding a cached copy may answer. That breaks the per-request assumption. Once a packet sits in a router cache, no server is present to check who is reading it. This note proposes a compiler that sits between the two. It takes an XML document, its access policy, and an expected request mix. It then decides how to cut the document into named, separately encrypted network objects. Readers with the same rights fetch byte-identical packets, so caches and request merging keep working, and no router ever evaluates a policy.

The two-sentence version is this. Group the elements of an XML document by exactly which readers are allowed to see them, encrypt each group under its own key, and publish the groups as NDN objects. Then choose how coarsely to merge the groups so that the extra bytes delivered to readers who cannot decrypt them are outweighed by fewer packets, fewer signature checks, and better cache sharing.

Core Claim

Existing NDN access control treats a Data packet as an opaque blob. A New Access Control System Based on CP-ABE in Named Data Networking builds a multi-authority attribute-based encryption scheme, in which the access policy is baked into the ciphertext so only holders of matching attributes can decrypt. Two other works add time-limited access: Provisioning Time-Based Subscription in NDN encodes subscription time slices into the ciphertext, and Differentiated Security Architecture for Secure and Efficient Infotainment Data Communication in IoV Networks applies time-sensitive attribute-based encryption to whole infotainment files. These works motivate the problem: publishers lose oversight once data is cached. They also constrain the solution, because their pairing and key-update costs grow with policy complexity. None of them looks inside the payload.

Secure Web Objects comes closest in spirit. It makes each application data unit self-authenticating under a hierarchical name, but it handles provenance only and leaves fine-grained multi-party authorization open. On the XML side, two works supply the method. The node-level model of The Study of Access Control Model defines "local" and "recursive" propagation of rights through a tree. The fragmentation algorithm of Achieving Efficient Access Control via XACML Policy in Cloud Computing splits overlapping resources into disjoint blocks at configuration time. XACML is the standard XML policy language, described in XML-based access control languages.

Our claim is that this configuration-time fragmentation can be retargeted from speeding up a decision engine to choosing network names and keys. Done that way, it closes two gaps at once. The first is the roughly three-to-four order-of-magnitude gap between XACML evaluation latency and per-hop forwarding budgets. The second is the tension between fine granularity and cache usefulness.

The basic object is the policy equivalence class. Fix a set of reader profiles $U$, such as roles or attribute combinations, and a policy $P$. For each element $e$, let $A(e) \subseteq U$ be the set of profiles $P$ authorizes to read $e$. Two elements belong to the same class exactly when their authorized sets are equal. The number of classes is bounded by the number of distinct authorized sets the policy actually induces, which is typically far smaller than the number of elements, especially under recursive propagation.

A publication plan $\Pi$ merges classes into blocks $B$. Each class inside a block stays encrypted under its own key, so merging never weakens confidentiality. Merging only costs bandwidth paid by readers who cannot decrypt part of the block. The compiler minimizes

$$\mathrm{cost}(\Pi) = \sum_{u \in U} \lambda_u \sum_{B \in \Pi,\; B \cap R_u \neq \emptyset} \big(|B| + h\big) \;-\; \gamma \cdot \mathrm{share}(\Pi),$$

where $\lambda_u$ is the request rate of profile $u$, $R_u$ is the set of classes $u$ needs, $|B|$ is the block's byte size, and $h$ is the per-packet overhead in byte-equivalents (header, signature, and verification time). The term $\mathrm{share}(\Pi)$ is the expected number of upstream fetches saved by cache hits and merged pending requests, estimated in simulation, and $\gamma$ weights it.

The two extremes are already familiar systems. One block for the whole document is "XML Encryption inside a single NDN object." One block per element is "naive per-element naming." The claim is that the optimum usually lies strictly between them and moves predictably with policy skew and popularity.

Research Program

The compiler has three stages.

The first stage evaluates the XACML policy offline against the document's schema and instance. It extends the disjoint-fragment construction of Pei et al. from "minimal physical blocks per rule set" to "classes per authorized-profile set." Local versus recursive propagation is honored exactly as defined by Zhang et al.

The second stage runs a greedy merge over the class adjacency in the tree, using the cost above. The merge is restricted to tree-contiguous merges so that block names stay meaningful.

The third stage emits NDN Data objects named /doc/<version>/<block-id>. The block identifier is an opaque hash rather than an XPath. This addresses the privacy concern of Feng and Guo about policy leakage: routers see only a routable prefix and a meaningless suffix, while the class-to-key mapping is delivered to readers inside their encrypted key bundle. Each class key is wrapped once per profile. We start with plain public-key wrapping and evaluate attribute-based wrapping as a variant.

Policy changes are where this design should beat both existing directions. Changing a rule alters only the classes whose authorized set changes. Only those classes are re-keyed and re-published under a new version, and every other cached block stays valid. Pei et al. explicitly identify this "hot-swapping" problem as requiring full recomputation in their setting.

Routers run unmodified NDN forwarding; no packet is inspected for XML. This is a deliberate negative design choice informed by the file's latency evidence. Pei et al. report about 81–83 ms for 100-rule decisions, ECDSA verification costs 1.8–2.0 ms in Content Protection in Named Data Networking, and forwarding budgets in HTTP as the narrow waist of the future internet are about 100 µs per hop. Semantics-aware filtering of the kind proposed by Cremonini et al. belongs at the producer and the compiler, not in the forwarding path.

Baselines

The naive reference point is plain per-reader filtering at the origin. A server runs an XACML decision engine for each request, strips the unauthorized subtrees, and returns a personalized document over a point-to-point channel. In NDN terms, each reader requests a reader-specific name, so the producer is always contacted and nothing is shared across readers. It will run on the same topologies and request traces, using the same decision engine our compiler uses offline. To beat it, our approach must cut producer load and upstream bytes while never delivering a decryptable unauthorized byte.

The strongest existing competitor for policy evaluation cost is the pre-refined decision engine of Pei et al. This is the right baseline because it is the best published way to make online XACML checks cheap. They report 253.3 ms per decision at 1,500 rules and 155 segments, versus 1259.0 ms for Melcoe PDP and 1602.8 ms for Simple PDP. We will rerun it on the same synthetic policy generator, parameterized by rules, conflicts, and segments, with the same hardware. We count it as beaten only if our amortized per-request authorization cost, which is decryption with cached keys and no online decision, is lower at every rule scale. We will also report our compile time and our re-key time after a policy change, where we expect the comparison to be closest.

The strongest network-side competitor is opaque-payload attribute-based encryption in NDN, following Feng and Guo. It will be run in two configurations. In the first, one object holds the whole document and readers receive everything. In the second, one object is created per distinct reader view, duplicating shared content across views. Both use the same pairing library and topology. Beating it means fewer bytes cached per distinct content byte than the per-view variant and fewer over-delivered bytes than the whole-document variant.

Two ablations isolate the key ingredient. The first, element-level XML Encryption under a single name, removes partitioning entirely and is the $\Pi$ = {whole document} extreme. The second, per-element naming, is the opposite extreme. A further control uses a random tree-contiguous partition with the same number of blocks as our optimized plan. This tests whether alignment with policy classes, rather than block count alone, drives any gains.

Why not just…?

Why not just encrypt each element with XML Encryption and publish the whole document under one NDN name? This is the real threat, and we treat it as a point the optimizer may choose rather than as a strawman. It maximizes cache sharing and needs one signature check. When documents are small or most readers are authorized for most of the content, it should win, and our compiler should simply return it. It loses when sensitive or role-specific subtrees are large and requested by few readers: every reader then downloads ciphertext it cannot open, and the document's full structure and sizes leak to all. We found no reported result on Lacuna for this configuration. The experiment that settles it sweeps the fraction of bytes that are role-restricted and the skew of reader rates, and records where the optimized plan stops coinciding with the single-block plan.

Why not just serve per-user filtered views from an edge CDN running an XACML engine, with plain IP in the core? Edge caching of personalized views shares nothing across users with different rights. A Trace-Driven Analysis of Caching in Content-Centric Networks found edge proxies satisfied only 11% of requests within a single AS traversal versus 32% for router-level caching. The edge engine also inherits the decision latencies reported by Pei et al. A carefully run edge deployment with a pre-refined engine may still be competitive on latency for lightly shared documents. We will report that case honestly rather than claim a uniform win.

Why not just use opaque attribute-based encryption per packet, as Feng and Guo do? Encrypting the whole payload under one policy is all-or-nothing. Supporting mixed-sensitivity documents then forces duplicated ciphertext per view. Decryption costs $6|I|$ pairings, where $|I|$ is the number of attributes involved, and Fan et al. note that key size grows linearly with validity periods. Our scheme can still use attribute-based encryption to wrap the few class keys. The comparison therefore isolates partitioning from the choice of key-wrapping primitive.

Why not just make routers semantics-aware and evaluate policies in the forwarding path? The latency figures above already put XML policy evaluation and signature verification three to four orders of magnitude over a 100 µs per-hop budget. Routers that inspect payloads would also need the payload in the clear. We therefore do not build this, and we cite the gap as the reason.

Proposed Experiments

Documents come from the XMark generator at sizes from 2 KB to 20 MB, as used by Zhang et al., who report no comparable performance numbers. Policies come from a generator in the style of Pei et al., covering 20 to 1,500 rules with controlled conflicts. Network experiments run in ndnSIM on the GEANT2012 topology used for collaborative caching, and on the 37-node, 99-link topology of Sultan et al. for crypto-cost comparability. Request popularity follows a Zipf–Mandelbrot law. Router cache sizes bracket the roughly 10,000-packet threshold below which Tyson et al. found caching nearly useless, so we can test whether policy-aligned blocks remain cache-effective where per-element naming collapses.

The metrics are the following:

  • producer load, measured as the fraction of requests reaching the origin;
  • upstream bytes;
  • the over-delivery ratio, meaning bytes received divided by bytes the reader can decrypt;
  • packets and signature verifications per reader;
  • end-to-end retrieval latency;
  • re-publication volume after a single-rule policy change;
  • structural leakage, measured as the number of distinct names and block sizes visible to a router.

Confidentiality is checked by construction and by an automated audit that tries every profile's keys against every block.

The decisive checks are three. First, policy-aligned partitioning must beat the random partition with equal block count on producer load at equal over-delivery; otherwise alignment is not the active ingredient. Second, the optimized plan must strictly dominate both extremes (whole document and per-element) on the cost objective across a non-trivial region of the skew-by-sensitivity sweep, and must match the whole-document plan where that plan is best. Third, after a single-rule change, the volume re-published must scale with the size of the affected classes rather than the document, compared against full regeneration of every per-view ciphertext under the attribute-based baseline. If the first check fails, the contribution reduces to "choose a block size," and we would report that.