12#ifndef ZEPHYR_INCLUDE_AUTHENTICATION_FIDO2_FIDO2_STORAGE_H_
13#define ZEPHYR_INCLUDE_AUTHENTICATION_FIDO2_FIDO2_STORAGE_H_
60 const char *user_display_name);
94int fido2_storage_init(
void);
121int fido2_storage_remove(
const uint8_t *cred_id,
size_t cred_id_len);
143int fido2_storage_enumerate_rps(
size_t offset,
struct fido2_credential *creds,
size_t max_creds,
154int fido2_storage_sign_count_increment(
const uint8_t *cred_id,
size_t cred_id_len,
FIDO2 shared type definitions.
const struct fido2_storage_api fido2_storage_backend
FIDO2 storage backend instance.
#define FIDO2_PIN_HASH_SIZE
PIN hash size.
Definition fido2_types.h:55
int(* fido2_storage_iterate_cb_t)(const struct fido2_credential *cred, void *user_data)
FIDO2 credential storage.
Definition fido2_storage.h:35
#define FIDO2_SHA256_SIZE
SHA-256 hash size.
Definition fido2_types.h:52
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
A stored FIDO2 credential.
Definition fido2_types.h:186
Storage backend API.
Definition fido2_storage.h:38
int(* enumerate_rps)(size_t offset, struct fido2_credential *creds, size_t max_creds, size_t *count)
Enumerate unique Relying Party IDs from stored credentials.
Definition fido2_storage.h:51
int(* update_user_info)(const uint8_t *cred_id, size_t cred_id_len, const char *user_name, const char *user_display_name)
Update user information for an existing credential.
Definition fido2_storage.h:59
int(* pin_get)(uint8_t pin_hash[16])
Load stored PIN hash.
Definition fido2_storage.h:68
int(* wipe_all)(void)
Wipe all stored credentials and PIN state.
Definition fido2_storage.h:64
int(* iterate)(fido2_storage_iterate_cb_t cb, void *user_data)
Iterate all stored credentials.
Definition fido2_storage.h:54
int(* find_by_rp)(const uint8_t rp_id_hash[32], struct fido2_credential *creds, size_t max_creds, size_t *count)
Find credentials by relying party ID hash.
Definition fido2_storage.h:48
int(* remove)(const uint8_t *cred_id, size_t cred_id_len, struct fido2_credential *cred)
Remove a credential by ID.
Definition fido2_storage.h:46
int(* load)(const uint8_t *cred_id, size_t cred_id_len, struct fido2_credential *cred)
Load a credential by ID.
Definition fido2_storage.h:44
int(* init)(void)
Initialize the storage backend.
Definition fido2_storage.h:40
int(* store)(const struct fido2_credential *cred)
Store a credential.
Definition fido2_storage.h:42
int(* pin_retries_get)(uint8_t *retries)
Get remaining PIN retry count.
Definition fido2_storage.h:70
int(* pin_retries_reset)(void)
Reset PIN retry counter to maximum.
Definition fido2_storage.h:74
int(* sign_count_increment)(const uint8_t *cred_id, size_t cred_id_len, uint32_t *new_count)
Increment and return the signature counter.
Definition fido2_storage.h:56
int(* pin_retries_decrement)(void)
Decrement PIN retry counter.
Definition fido2_storage.h:72
int(* credential_count)(size_t *count)
Get the total number of discoverable credentials stored.
Definition fido2_storage.h:62
int(* pin_set)(const uint8_t pin_hash[16])
Store PIN hash.
Definition fido2_storage.h:66