Access Control & Security
Deep-dive page: how a public, untrusted DHT stores private social data — identity, encryption, ACLs, group keys, revocation — and what remains open.
Supersession note: the identity/ACL baseline is LCN 2009; DDS-level security (buckets, groups, consolidation) is CTS 2014; the authoritative access-control model is the short paper LANMAN 2017 (poster variant: same venue). Crypto parameters in the 2009 paper (RSA-1024) are superseded by the elliptic-curve implementation in
com.p2pframework.security.ellipticcurves; see security component for code state.
Identity: the public key is the identifier
Registration (LCN 2009):
- username + passphrase → asymmetric key pair (deterministic recovery model);
- the numeric representation of the public key serves as both
nodeIDanduserID— FreePastry's ID space was widened (1088-bit in the paper) to fit key-derived IDs; - a signed minimal profile is stored in the DHT as proof of existence;
- general rule later formalized (LANMAN 2017):
OverlayKey = PublicKey(ObjectName)— ownership of any object is provable to all DHT nodes without any trusted third party. Anonymous alternative identities are also discussed there.
Hybrid encryption of every stored object
- Payload: one symmetric data key (DDEKey, AES-128 in the 2009 measurements) per object.
- The DDEKey is stored asymmetrically encrypted per authorized user inside an access-control structure — only one copy of the encrypted data exists in the DHT.
- Structure evolution: 2009's Key List (+ object-specific key,
SharedItem→ signedCryptedItem) became the 2017 Access Control Map: per public key a list of signed Access Control Entries (access right, encrypted DDEKey, signer); the creator's first entry proves intended creation. - Granular Encryption/Granular Signature (GEGS): protection applies per DDS attribute (Secured Data Items map attribute name → encrypted item), not just per object.
- Versioning: an
Encryption Versionconfig decides which DDEKey applies to new modifications.
Groups and hierarchy
(CTS 2014):
- a group item holds a symmetric key
S_Gplus an asymmetric pair(e_G, d_G), stored encrypted for each member; adding a member = one more encrypted copy in the signed group key list (2009: group object ID = hash(admin public key, group name)); - admin groups and nested groups (a member may itself be a group) give derived access via a depth-first walk of the hierarchy;
- removing a member regenerates the group key (eager re-keying at group level);
- object-level removal uses lazy revocation (LANMAN 2017): after deleting an ACE the user may still hold the old DDEKey, but old data versions are deliberately ignored — re-encrypt only from the new version instead of rewriting everything.
Write protection for distributed data structures
Two-stage write control (CTS 2014):
- Bucket signature under the group key → who may insert into a bucket;
- element signature + stored nonce → only the author may modify/delete that element, with replay protection.
Lists live in buckets (bucketKey = h(listName + floor(i/splitsize))), remote operations
(get(i), set(i), contains) run at the storage peer; deletion inserts a synthetic
deletedItem and a consolidation protocol shifts it exactly one bucket per invocation
(two signatures, two storage peers, notification timeout) so nothing gets lost. Simulation:
deleted-item share falls from up to 0.3 to mostly < 0.05; splitsize ≈ 20 was a good compromise.
Details: DDS internals.
Measured overhead (2009, Core 2 Quad — still the documented cost model)
| Operation | Cost |
|---|---|
| Secure message | < 2 KB overhead (1899–1911 B absolute); relative 212 % (895 B payload) → 17 % (10.9 kB) |
| En-/decrypt message | ~10–14 ms / 8–10 ms |
| Each extra authorized user | +413 B (key-list copy) |
| 200 privileged users | 83,653 B (24 % of a 347 kB object), encrypt 89 ms, decrypt ~20 ms constant |
| Key wrapping | 0.36 ms per key |
Documented guidance: from ~200 friends upward, use group-based access control instead of per-friend key copies.
Known weak points and 2026 open work
Flagged by the researchers themselves (work items → security roadmap blog):
- #33 replication trusts the neighbourhood — overtaking leaf-set neighbours can absorb replicas;
- #35 stored replica validity unchecked (signed versions/hash chains missing);
- #34 replace today's key handling with proper ephemeral ECDH sessions;
- #126 concrete defect in
javax.crypto.specusage (see bug catalogue); - #47 no prioritization of critical messages (dispatcher DoS resilience);
- #55 decentralized reputation for storage/relay nodes;
- #56 expiring posts (TTL semantics across replicas);
- #135 mutual-friendship handshake bug.
Sources
- Practical Security in P2P-based Social Networks, IEEE LCN 2009
- Secure Distributed Data Structures for P2P-based Social Networks, IEEE CTS 2014
- Access Control for Secure DDS in DHTs, IEEE LANMAN 2017 (short paper / poster)
- Current code:
com.p2pframework.security.ellipticcurves, users/security bundles — security component page