Project

General

Profile

NAC-ABE Design » History » Version 6

Suravi Regmi, 11/24/2025 08:12 PM

1 1 Suravi Regmi
# NAC-ABE Design
2
3 3 Suravi Regmi
4
### What NAC-ABE Provides
5
NAC-ABE implements name-based access control using two layers:
6
7
1. **Symmetric encryption of data** using Content Key (CK).  
8
2. **ABE encryption of CK** using AA-issued public parameters and consumer policies.
9
10
Data is encrypted with a CK, and the CK itself is encrypted under ABE so that only authorized consumers holding a matching Decryption Key (DKEY) can recover it.
11
The Attribute Authority (AA) publishes public parameters and issues DKEYs, while NAC-ABE producers generate CKs and encrypted data using these parameters.
12
13
This removes the need for any online authorization server during data fetch and enables cryptographically enforced access control at the packet level.
14
15
---
16
### Why mGuard Uses KP-ABE
17
18 4 Suravi Regmi
A KP-ABE policy defines which identities can receive a Decryption Key (DKEY) and which data attributes that DKEY authorizes them to decrypt. Each policy includes:
19 1 Suravi Regmi
20 6 Suravi Regmi
- A **policy-id** , which uniquely identifies the policy.
21
- A list of **requester-names** , representing the NDN identities that will receive the DKEY generated from this policy.
22
- One or more **attribute-filters** , typically expressed as namespace prefixes. These prefixes determine which encrypted Content Keys (CKs) the resulting DKEY can decrypt.
23 1 Suravi Regmi
24 4 Suravi Regmi
Policies are evaluated using exact prefix matching. If the attribute attached by the producer during CK generation starts with a prefix listed in an allow-filter, a DKEY created from that policy will successfully decrypt the CK.
25
No role-based or device-level semantics are required; access control is driven entirely by namespace prefixes embedded within attributes.
26 6 Suravi Regmi
The producer never evaluates policies and never needs access to DKEYs. All authorization takes place on the consumer side using the policy embedded in the DKEY.
27 4 Suravi Regmi
28 1 Suravi Regmi
---
29 4 Suravi Regmi
30
### Certificates
31 1 Suravi Regmi
32 4 Suravi Regmi
NAC-ABE uses two distinct certificates, each serving a different purpose in the trust and encryption pipeline.
33
#### Stream Certificate
34
The stream certificate defines the namespace and identity under which CKs and encrypted data are published. NAC-ABE derives CK names from this certificate:
35
36
``` c
37
/<stream-identity>/CK/<random>/ENC-BY/<attributes>/seg=i
38
```
39
Encrypted data packets are also named under the same identity prefix. This ensures that each stream's data and CKs are isolated and validated using the stream's trust chain.
40
41
#### Attribute Authority (AA) Certificate
42
43
The AA certificate anchors the ABE trust domain. It is used to validate:
44
- Public Parameters (PUBPARAMS)
45
- AA KEY packets
46 3 Suravi Regmi
- Any ABE-related metadata
47
- The AA certificate ensures that only authenticated parameters are used for CK generation and that consumers can trust the DKEYs they receive.
48
49 6 Suravi Regmi
---
50 3 Suravi Regmi
51 6 Suravi Regmi
###  ABE Encryption of CK (Black Box Description)
52 3 Suravi Regmi
53
---
54 1 Suravi Regmi
55 3 Suravi Regmi
## 4. Certificates in NAC-ABE (Updated mGuard Behavior)
56
57
### 4.1 Stream Identity Certificate
58
The stream’s certificate is used by NAC-ABE for:
59
60
**a) Naming CKs**  
61
Updated mGuard naming:
62 4 Suravi Regmi
/<stream-identity>/CK/<CK-ID>/ENC-BY/<attributes>/seg=i
63 3 Suravi Regmi
This scopes CKs to each stream.  
64
Different streams produce CKs under different prefixes.
65
66
**b) Naming encrypted data**
67
/<stream-identity>/<data-suffix>
68
This maintains per-stream isolation.
69
70
**c) Signing and trust schema validation**
71
All CK and encrypted data packets are signed according to the stream’s identity chain.
72
73
---
74
75
### 4.2 AA Certificate
76
The AA certificate is used as the **trusted root of ABE**.
77
78
It enables the producer and consumer to:
79
80
1. Validate AA **Public Parameters (PUBPARAMS)**.
81
2. Validate AA **KEY** packets.
82
3. Determine **ABE type** from PUBPARAMS (KP-ABE vs CP-ABE).
83
4. Run `kpContentKeyGen()` (needs verified public params).
84
85
The AA certificate defines the mathematical ABE domain; the stream certificate defines the namespace and signing authority for CK and data packets.
86
87
---
88
89
## 5. End-to-End Flow (Producer → Repo → Consumer)
90
91 1 Suravi Regmi
---
92 5 Suravi Regmi
### Content Key (CK)
93
A CK is the symmetric key used to encrypt data.
94
CK rotation frequency determines **how precisely access control can be enforced**.
95
A user can only decrypt data encrypted with CKs they are authorized to received.
96 3 Suravi Regmi
97 5 Suravi Regmi
### Content Key (CK)
98
A CK is the symmetric key used to encrypt data. CK rotation frequency determines access-control precision. A user can only decrypt data encrypted with CKs they are authorized for.
99 3 Suravi Regmi
100 5 Suravi Regmi
### CK Granularity
101
- **Second-level:** maximum precision, very high overhead
102
- **Minute-level:** balanced precision vs cost
103
- **Hour-level:** minimal overhead, coarse control
104
Granularity determines access-control precision and system cost.
105 3 Suravi Regmi
106 5 Suravi Regmi
### CK vs Access-Control Granularity
107
CK granularity must be **equal to or finer than** the access-control granularity.
108 3 Suravi Regmi
109 5 Suravi Regmi
| Access Control ↓ / CK → | second | minute | hour |
110
|--------------------------|--------|--------|------|
111
| second                   | ✔️     | ❌     | ❌   |
112
| minute                   | ✔️     | ✔️     | ❌   |
113
| hour                     | ✔️     | ✔️     | ✔️   |
114 1 Suravi Regmi
115 5 Suravi Regmi
Rule: CK rotation cannot be coarser than the authorization window.
116 1 Suravi Regmi
117 5 Suravi Regmi
### CK Reuse Tradeoffs
118
**High reuse (minute/hour):** fewer CK packets, low cost; coarse control. 
119
**Low reuse (second):** fine-grain control; many CKs, high overhead.
120 1 Suravi Regmi
121 5 Suravi Regmi
### Implementation Note
122
Most encryption overhead is CK generation, not data encryption; finer CK granularity increases load.
123 1 Suravi Regmi
124
125 2 Suravi Regmi
126
![](att-authority.png)
127
![](nac-abe-pro-con.png)