Commit 9a51a79
committed
feat(sdk): require kid for ML-KEM key access (DSPX-3229)
ML-KEM wrapped key access objects must carry a kid so the KAS can identify
which encapsulation key to unwrap with; unlike RSA/EC there is no way to
recover the key without it. Previously MlKemWrapped accepted an optional kid
and only emitted it when truthy, silently producing an unusable KAO.
- MlKemWrapped now requires kid: string, rejects missing/blank values with a
ConfigurationError, and always emits kid in the KAO.
- buildKeyAccess guards the ML-KEM branch so callers get a clear
ConfigurationError before constructing MlKemWrapped.
- RSA (Wrapped) and EC (ECWrapped) keep kid optional, unchanged.
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>1 parent 819fe70 commit 9a51a79
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | | - | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
| |||
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 237 | + | |
236 | 238 | | |
237 | 239 | | |
238 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
286 | 291 | | |
287 | 292 | | |
288 | 293 | | |
| |||
0 commit comments