13#ifndef ZEPHYR_INCLUDE_AUTHENTICATION_FIDO2_FIDO2_STORAGE_H_
14#define ZEPHYR_INCLUDE_AUTHENTICATION_FIDO2_FIDO2_STORAGE_H_
61 const char *user_display_name);
95int fido2_storage_init(
void);
122int fido2_storage_remove(
const uint8_t *cred_id,
size_t cred_id_len);
144int fido2_storage_enumerate_rps(
size_t offset,
struct fido2_credential *creds,
size_t max_creds,
155int fido2_storage_sign_count_increment(
const uint8_t *cred_id,
size_t cred_id_len,
163int fido2_storage_pin_retries_get(
uint8_t *retries);
169int fido2_storage_pin_retries_decrement(
void);
175int fido2_storage_pin_retries_reset(
void);
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:56
int(* fido2_storage_iterate_cb_t)(const struct fido2_credential *cred, void *user_data)
FIDO2 credential storage.
Definition fido2_storage.h:36
#define FIDO2_SHA256_SIZE
SHA-256 hash size.
Definition fido2_types.h:53
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
A stored FIDO2 credential.
Definition fido2_types.h:200
Storage backend API.
Definition fido2_storage.h:39
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:52
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:60
int(* wipe_all)(void)
Wipe all stored credentials and PIN state.
Definition fido2_storage.h:65
int(* iterate)(fido2_storage_iterate_cb_t cb, void *user_data)
Iterate all stored credentials.
Definition fido2_storage.h:55
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:47
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:45
int(* init)(void)
Initialize the storage backend.
Definition fido2_storage.h:41
int(* store)(const struct fido2_credential *cred)
Store a credential.
Definition fido2_storage.h:43
int(* pin_retries_get)(uint8_t *retries)
Get remaining PIN retry count.
Definition fido2_storage.h:71
int(* pin_retries_reset)(void)
Reset PIN retry counter to maximum.
Definition fido2_storage.h:75
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:57
int(* find_by_rp)(const uint8_t rp_id_hash[FIDO2_SHA256_SIZE], struct fido2_credential *creds, size_t max_creds, size_t *count)
Find credentials by relying party ID hash.
Definition fido2_storage.h:49
int(* pin_get)(uint8_t pin_hash[FIDO2_PIN_HASH_SIZE])
Load stored PIN hash.
Definition fido2_storage.h:69
int(* pin_retries_decrement)(void)
Decrement PIN retry counter.
Definition fido2_storage.h:73
int(* credential_count)(size_t *count)
Get the total number of discoverable credentials stored.
Definition fido2_storage.h:63
int(* pin_set)(const uint8_t pin_hash[FIDO2_PIN_HASH_SIZE])
Store PIN hash.
Definition fido2_storage.h:67