Project

General

Profile

NAC-ABE Design » History » Version 5

Suravi Regmi, 11/24/2025 07:51 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 4 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
24
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
27 1 Suravi Regmi
KP-ABE supports stream-specific semantics and flexible downstream authorization.
28
29 4 Suravi Regmi
In KP-ABE, the producer assigns an attribute string to each Content Key (CK). The consumer receives a DKEY that contains a policy, usually expressed as one or more namespace prefixes. Decryption succeeds when:
30
31
- policy_prefix is a prefix of attribute_string
32
33
This creates a simple, deterministic Matching Rule:
34
35
- The producer attaches attributes to CKs.
36
37
- The consumer holds a DKEY containing a prefix-based policy.
38
39
- Authorization is validated locally through prefix comparison.
40
- T he 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.
41
42 1 Suravi Regmi
---
43
44 4 Suravi Regmi
### Certificates
45
46
NAC-ABE uses two distinct certificates, each serving a different purpose in the trust and encryption pipeline.
47
48
#### Stream Certificate
49
50
The stream certificate defines the namespace and identity under which CKs and encrypted data are published. NAC-ABE derives CK names from this certificate:
51
52
``` c
53
/<stream-identity>/CK/<random>/ENC-BY/<attributes>/seg=i
54
```
55
56
57
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.
58
59
#### Attribute Authority (AA) Certificate
60
61
The AA certificate anchors the ABE trust domain. It is used to validate:
62
63
- Public Parameters (PUBPARAMS)
64
65
- AA KEY packets
66
67
- Any ABE-related metadata
68
69
- The AA certificate ensures that only authenticated parameters are used for CK generation and that consumers can trust the DKEYs they receive.
70
71 3 Suravi Regmi
## 3. ABE Encryption of CK (Black Box Description)
72
73
When the producer encrypts one data chunk:
74
75
1. Producer calls:
76
2. Output:
77
- a fresh **symmetric CK**  
78
- CK segments encrypted with KP-ABE (using AA public parameters)  
79
3. Producer encrypts the data payload with CK.  
80
4. Producer embeds the **CK name** inside the encrypted data.  
81
5. Producer publishes:
82
- CK segments  
83
- encrypted data segments
84
85
The consumer later:
86
- fetches CK segments,
87
- decrypts CK using its DKEY,
88
- decrypts the encrypted data.
89
90
The producer treats ABE internals as a complete black box.
91
92
---
93 1 Suravi Regmi
94 3 Suravi Regmi
## 4. Certificates in NAC-ABE (Updated mGuard Behavior)
95
96
### 4.1 Stream Identity Certificate
97
The stream’s certificate is used by NAC-ABE for:
98
99
**a) Naming CKs**  
100
Updated mGuard naming:
101 4 Suravi Regmi
/<stream-identity>/CK/<CK-ID>/ENC-BY/<attributes>/seg=i
102 3 Suravi Regmi
This scopes CKs to each stream.  
103
Different streams produce CKs under different prefixes.
104
105
**b) Naming encrypted data**
106
/<stream-identity>/<data-suffix>
107
This maintains per-stream isolation.
108
109
**c) Signing and trust schema validation**
110
All CK and encrypted data packets are signed according to the stream’s identity chain.
111
112
---
113
114
### 4.2 AA Certificate
115
The AA certificate is used as the **trusted root of ABE**.
116
117
It enables the producer and consumer to:
118
119
1. Validate AA **Public Parameters (PUBPARAMS)**.
120
2. Validate AA **KEY** packets.
121
3. Determine **ABE type** from PUBPARAMS (KP-ABE vs CP-ABE).
122
4. Run `kpContentKeyGen()` (needs verified public params).
123
124
The AA certificate defines the mathematical ABE domain; the stream certificate defines the namespace and signing authority for CK and data packets.
125
126
---
127
128
## 5. End-to-End Flow (Producer → Repo → Consumer)
129
130 1 Suravi Regmi
---
131 5 Suravi Regmi
### Content Key (CK)
132
A CK is the symmetric key used to encrypt data.
133
CK rotation frequency determines **how precisely access control can be enforced**.
134
A user can only decrypt data encrypted with CKs they are authorized to received.
135 3 Suravi Regmi
136 5 Suravi Regmi
### Content Key (CK)
137
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.
138 3 Suravi Regmi
139 5 Suravi Regmi
### CK Granularity
140
- **Second-level:** maximum precision, very high overhead
141
- **Minute-level:** balanced precision vs cost
142
- **Hour-level:** minimal overhead, coarse control
143
Granularity determines access-control precision and system cost.
144 3 Suravi Regmi
145 5 Suravi Regmi
### CK vs Access-Control Granularity
146
CK granularity must be **equal to or finer than** the access-control granularity.
147 3 Suravi Regmi
148 5 Suravi Regmi
| Access Control ↓ / CK → | second | minute | hour |
149
|--------------------------|--------|--------|------|
150
| second                   | ✔️     | ❌     | ❌   |
151
| minute                   | ✔️     | ✔️     | ❌   |
152
| hour                     | ✔️     | ✔️     | ✔️   |
153 1 Suravi Regmi
154 5 Suravi Regmi
Rule: CK rotation cannot be coarser than the authorization window.
155 1 Suravi Regmi
156 5 Suravi Regmi
### CK Reuse Tradeoffs
157
**High reuse (minute/hour):** fewer CK packets, low cost; coarse control. 
158
**Low reuse (second):** fine-grain control; many CKs, high overhead.
159 1 Suravi Regmi
160 5 Suravi Regmi
### Implementation Note
161
Most encryption overhead is CK generation, not data encryption; finer CK granularity increases load.
162 1 Suravi Regmi
163
164 2 Suravi Regmi
165
![](att-authority.png)
166
![](nac-abe-pro-con.png)