Skip to content

Commit e277457

Browse files
feat(webauthn): LargeBlobStorage trait + in-memory + authenticator backends
Adds the public `LargeBlobStorage` async trait alongside two bundled implementations: - `MemoryLargeBlobStorage`: a HashMap-backed store, primarily for tests. - `AuthenticatorLargeBlobStorage<'_, C>`: drives the CTAP 2.1 `authenticatorLargeBlobs(get)` command, parses the serialized largeBlobArray, locates the entry matching the supplied per-credential `largeBlobKey` (AES-256-GCM authenticated decryption), and decompresses the deflated plaintext. Only the read path is implemented in this PR. `LargeBlobStorage::write` returns `Unsupported` in both bundled backends; the chunked write path with `pinUvAuthParam` binding is reserved for a follow-up. Includes 14 unit tests covering: in-memory round-trip, AEAD round-trip, wrong-key rejection, multi-entry array selection, corrupted/truncated array rejection, empty array handling, and a MockChannel-backed end-to-end test of the authenticator read flow. Refs: WebAuthn L3 §10.5, CTAP 2.2 §6.10 / §6.10.4 / §11.4.
1 parent acb2892 commit e277457

4 files changed

Lines changed: 739 additions & 0 deletions

File tree

libwebauthn/Cargo.lock

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libwebauthn/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ p256 = { version = "0.13.2", features = ["ecdh", "arithmetic", "serde"] }
5858
heapless = "0.7"
5959
cosey = "0.3.2"
6060
aes = "0.8.2"
61+
aes-gcm = "0.10"
62+
flate2 = "1.0"
6163
hmac = "0.12.1"
6264
cbc = { version = "0.1", features = ["alloc"] }
6365
hkdf = "0.12"

0 commit comments

Comments
 (0)