FIDO_LARGEBLOB_GET(3)
π FIDO_LARGEBLOB_GET(3) β the "largeBlobs" era π
okay bestie, welcome to fido_largeblob_get(3), a genuine Library Functions Manual moment. this is the libfido2 page about the FIDO2 large blob API and it is so much cooler than it sounds, i promise. π«Ά
β¨ NAME β¨
fido_dev_largeblob_get, fido_dev_largeblob_set, fido_dev_largeblob_remove, fido_dev_largeblob_get_array, fido_dev_largeblob_set_array β the FIDO2 large blob API, aka the whole squad π
πΈ SYNOPSIS πΈ
#include <fido.h>
int
fido_dev_largeblob_get(fido_dev_t *dev, const unsigned char *key_ptr,
size_t key_len, unsigned char **blob_ptr, size_t *blob_len);
int
fido_dev_largeblob_set(fido_dev_t *dev, const unsigned char *key_ptr,
size_t key_len, const unsigned char *blob_ptr, size_t blob_len,
const char *pin);
int
fido_dev_largeblob_remove(fido_dev_t *dev, const unsigned char *key_ptr,
size_t key_len, const char *pin);
int
fido_dev_largeblob_get_array(fido_dev_t *dev, unsigned char **cbor_ptr,
size_t *cbor_len);
int
fido_dev_largeblob_set_array(fido_dev_t *dev,
const unsigned char *cbor_ptr, size_t cbor_len, const char *pin);
π¦ DESCRIPTION π¦
so the "largeBlobs" API of libfido2 is what lets you read, write, and inspect binary blobs that live on a CTAP 2.1 authenticator. and yes, "largeBlobs" is a CTAP 2.1 extension β it's giving very special edition. β¨
here's the tea: "largeBlobs" are stored as elements of a CBOR array. confidentiality is ensured by encrypting each element with a distinct, credential-bound 256-bit AES-GCM key. the array is otherwise shared between different credentials and FIDO2 relying parties. sharing is caring, but encryption is everything. π
getting your hands on a credential's encryption key is possible in a few different ways:
- during enrollment, with
fido_cred_set_extensions(3)andfido_cred_largeblob_key_ptr(3)π - during assertion, with
fido_assert_set_extensions(3)andfido_assert_largeblob_key_ptr(3)πΈ - or, if it's a resident credential, via libfido2's credential management API π
the "largeBlobs" CBOR array is opaque to the authenticator β it literally does not care what's in there, no thoughts head empty π. management of the array is left at the discretion of FIDO2 clients. and for further details on CTAP 2.1's "largeBlobs" extension, please refer to the CTAP 2.1 spec (iykyk π).
π fido_dev_largeblob_get() β the retrieval girlie
this one retrieves the authenticator's "largeBlobs" CBOR array and, on success, returns the first blob (iterating from array index zero, bestie, we start at zero) that can be decrypted by key_ptr, where key_ptr points to key_len bytes.
on success, fido_dev_largeblob_get() sets blob_ptr to the body of the decrypted blob, and blob_len to the length of the decrypted blob in bytes.
β οΈ it is the caller's responsibility to free blob_ptr. yes YOU. not the library. you. don't forget or it's a leak situation π
π fido_dev_largeblob_set() β the insertion icon
this one uses key_ptr to encrypt blob_ptr and inserts the result in the authenticator's "largeBlobs" CBOR array.
where does it go? here's the vibe check:
- insertion happens at the end of the array if no existing element can be decrypted by
key_ptr, or - at the position of the first element (iterating from array index zero) that can be decrypted by
key_ptr. π
key_len holds the length of key_ptr in bytes, and blob_len the length of blob_ptr in bytes.
π a pin or equivalent user-verification gesture is required. no skipping the vibe check, periodt.
π§ fido_dev_largeblob_remove() β the let-it-go era
this one retrieves the authenticator's "largeBlobs" CBOR array and, on success, drops the first blob (iterating from array index zero, always zero) that can be decrypted by key_ptr, where key_ptr points to key_len bytes.
π a pin or equivalent user-verification gesture is required here too. respectfully. π
π fido_dev_largeblob_get_array() β the raw access main character
this one retrieves the authenticator's "largeBlobs" CBOR array and, on success, sets cbor_ptr to the body of the CBOR array, and cbor_len to its corresponding length in bytes.
β οΈ again: it is the caller's responsibility to free cbor_ptr. that's on you bestie, the library is not your cleanup crew π«Ά
β fido_dev_largeblob_set_array() β the overwrite moment
and finally, this one sets the authenticator's "largeBlobs" CBOR array to the data pointed to by cbor_ptr, where cbor_ptr points to cbor_len bytes.
π yep, you guessed it: a pin or equivalent user-verification gesture is required. π
π₯ RETURN VALUES π₯
the whole squad β fido_dev_largeblob_set(), fido_dev_largeblob_get(), fido_dev_largeblob_remove(), fido_dev_largeblob_get_array(), and fido_dev_largeblob_set_array() β returns FIDO_OK on success. slay. β¨
on error, an error code defined in <fido/err.h> is returned. π
π SEE ALSO π
fido_assert_largeblob_key_len(3)fido_assert_largeblob_key_ptr(3)fido_assert_set_extensions(3)fido_cred_largeblob_key_len(3)fido_cred_largeblob_key_ptr(3)fido_cred_set_extensions(3)fido_credman_get_dev_rk(3)fido_credman_get_dev_rp(3)fido_dev_get_assert(3)fido_dev_make_cred(3)
go read them, they're all part of the lore π
π CAVEATS π
okay this is the serious part, bestie, please actually read it:
π¨ the "largeBlobs" extension is not meant to be used to store sensitive data. not the vibe for secrets. when retrieved, a credential's "largeBlobs" encryption key is transmitted in the clear, and an authenticator's "largeBlobs" CBOR array can be read without user interaction or verification. no cap. π©
and that's the whole page, you ate it, you understood it, you're a libfido2 main character now ππ this edition came from Debian and is dated October 26, 2020 β iconic behavior honestly. mwah, go forth and blob responsibly πβ¨π¦
π¦ where this page comes from
- alpine 3.22: libfido2-doc 1.16.0-r0 Β· BSD-2-Clause
- alpine 3.23: libfido2-doc 1.16.0-r2 Β· BSD-2-Clause
- alpine 3.24: libfido2-doc 1.16.0-r4 Β· BSD-2-Clause
- arch rolling: libfido2 1.17.0-1 Β· BSD-2-Clause
- centos-stream 10: libfido2-devel 1.14.0-7.el10 Β· BSD-2-Clause
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- centos-stream 9: libfido2-devel 1.13.0-2.el9 Β· BSD
- debian bookworm: libfido2-doc 1.12.0-2 Β· BSD-2-Clause
- debian trixie: libfido2-doc 1.15.0-1 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 43: libfido2-devel 1.16.0-3.fc43 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- fedora 44: libfido2-devel 1.16.0-5.fc44 Β· BSD-2-Clause
- nixos 26.05: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: fido2-manage 0-unstable-2025-06-06
- nixpkgs unstable: libfido2 1.17.0
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- opensuse-leap 16.0: libfido2-devel 1.15.0-160000.3.2 Β· BSD-2-Clause
- ubuntu noble: libfido2-doc 1.14.0-1build3 Β· BSD-2-Clause
- ubuntu questing: libfido2-doc 1.16.0-2
- ubuntu resolute: libfido2-doc 1.16.0-2build1 Β· BSD-2-Clause
- ubuntu stonking: libfido2-doc 1.17.0-2build1 Β· BSD-2-Clause
- π the page's license: BSD-2-Clause
- Copyright (c) 2020 Yubico AB. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms