Commit 637ca93
committed
feat(webauthn): largeBlob write and delete
Implements WebAuthn L3 §10.1.5 write and a libwebauthn-side delete
on top of CTAP 2.2 §6.10.6 update-or-erase. The platform fetches the
existing large-blob array, drops any entry that decrypts under the
credential's largeBlobKey, optionally appends a fresh encrypted entry,
and re-uploads the canonical CBOR array with a fresh SHA-256 trailer.
Foreign entries (different key, malformed, unknown fields) are
preserved byte-for-byte per the §6.10.2 platform contract.
Upload is chunked per maxFragmentLength with pinUvAuthParam computed
as authenticate(token, 32*0xff || 0x0c 0x00 || u32_le(offset)
|| SHA-256(set)) per §6.10.2. The Ctap2GetAssertionRequest now ORs
LARGE_BLOB_WRITE into its permissions when write or delete is
requested so user_verification negotiates a token covering the lbw
permission.
To keep PIN-protected devices working under UV=Discouraged, the
Ctap2UserVerifiableRequest trait gains needs_pin_uv_auth_token,
which suppresses the OnlyForSharedSecret downgrade in
user_verification. Unprotected authenticators continue to accept the
write without auth params per spec line 137.
Delete with no matching entry returns LargeBlobError::NoMatch
(written=false), matching the strict §6.10.6 'Return an error' branch
at line 303.1 parent fa2aa83 commit 637ca93
8 files changed
Lines changed: 795 additions & 81 deletions
File tree
- libwebauthn/src
- ops/webauthn
- idl
- proto/ctap2
- model
- webauthn
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
339 | 340 | | |
340 | | - | |
341 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| |||
350 | 353 | | |
351 | 354 | | |
352 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
353 | 365 | | |
354 | 366 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
| 367 | + | |
| 368 | + | |
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
| |||
366 | 375 | | |
367 | 376 | | |
368 | 377 | | |
369 | | - | |
370 | | - | |
371 | | - | |
| 378 | + | |
| 379 | + | |
372 | 380 | | |
373 | 381 | | |
374 | 382 | | |
| |||
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
546 | | - | |
| 554 | + | |
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
0 commit comments