Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
fido2_types.h File Reference

FIDO2 shared type definitions. More...

#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include <zephyr/sys/util.h>

Go to the source code of this file.

Data Structures

struct  fido2_credential
 A stored FIDO2 credential. More...
struct  fido2_device_info
 Device information returned by authenticatorGetInfo. More...
#define FIDO2_CREDENTIAL_ID_MAX_SIZE   128
 FIDO2 shared types.
#define FIDO2_RP_ID_MAX_LEN   128
 Maximum relying party ID length.
#define FIDO2_RP_NAME_MAX_LEN   64
 Maximum relying party name length.
#define FIDO2_USER_NAME_MAX_LEN   64
 Maximum user name length.
#define FIDO2_USER_DISPLAY_NAME_MAX_LEN   64
 Maximum user display name length.
#define FIDO2_USER_ID_MAX_SIZE   64
 Maximum user ID size in bytes.
#define FIDO2_AAGUID_SIZE   16
 AAGUID size in bytes.
#define FIDO2_SHA256_SIZE   32
 SHA-256 hash size.
#define FIDO2_PIN_HASH_SIZE   16
 PIN hash size.
#define FIDO2_DISCOVERABLE_CRED_ID_SIZE   32
 Size of a discoverable credential ID.
#define FIDO2_NON_DISCOVERABLE_CRED_ID_SIZE   64
 Size of a non-discoverable credential ID.
#define FIDO2_AUTH_DATA_HEADER_SIZE   37
 Authenticator data header size.
#define FIDO2_ATTESTED_CRED_DATA_MAX_SIZE   (FIDO2_AAGUID_SIZE + 2 + FIDO2_CREDENTIAL_ID_MAX_SIZE + FIDO2_COSE_KEY_MAX_SIZE)
 Attested credential data size.
#define FIDO2_AUTH_DATA_MAX_SIZE   (FIDO2_AUTH_DATA_HEADER_SIZE + FIDO2_ATTESTED_CRED_DATA_MAX_SIZE)
 Maximum authenticatorData size 8.
#define FIDO2_MAX_EXTENSIONS   8
 Maximum number of supported extensions.
#define FIDO2_MAX_VERSIONS   4
 Maximum number of supported versions.
#define FIDO2_EXT_HMAC_SECRET   BIT(0)
 Credential extension HMAC secret.
#define FIDO2_EXT_LARGE_BLOB_KEY   BIT(1)
 Credential extension largeBlobKey.
#define FIDO2_EXT_CRED_BLOB   BIT(2)
 Credential extension credBlob.
#define FIDO2_EXT_THIRD_PARTY_PAY   BIT(3)
 Credential extension thirdPartyPayment.
#define FIDO2_TRANSPORT_USB   BIT(0)
 Transport USB.
#define FIDO2_TRANSPORT_BLE   BIT(1)
 Transport BLE.
#define FIDO2_TRANSPORT_NFC   BIT(2)
 Transport NFC.
#define AUTH_DATA_FLAG_UP   BIT(0)
 User Present (UP) result.
#define AUTH_DATA_FLAG_UV   BIT(2)
 User Verified (UV) result.
#define AUTH_DATA_FLAG_AT   BIT(6)
 Attested credential data included (AT).
#define AUTH_DATA_FLAG_ED   BIT(7)
 Extension data included (ED).
enum  fido2_status {
  FIDO2_OK = 0x00 , FIDO2_ERR_INVALID_COMMAND = 0x01 , FIDO2_ERR_INVALID_PARAMETER = 0x02 , FIDO2_ERR_INVALID_LENGTH = 0x03 ,
  FIDO2_ERR_INVALID_SEQ = 0x04 , FIDO2_ERR_TIMEOUT = 0x05 , FIDO2_ERR_CHANNEL_BUSY = 0x06 , FIDO2_ERR_LOCK_REQUIRED = 0x0A ,
  FIDO2_ERR_INVALID_CHANNEL = 0x0B , FIDO2_ERR_CBOR_UNEXPECTED_TYPE = 0x11 , FIDO2_ERR_INVALID_CBOR = 0x12 , FIDO2_ERR_MISSING_PARAMETER = 0x14 ,
  FIDO2_ERR_LIMIT_EXCEEDED = 0x15 , FIDO2_ERR_UNSUPPORTED_EXTENSION = 0x16 , FIDO2_ERR_FP_DATABASE_FULL = 0x17 , FIDO2_ERR_LARGE_BLOB_STORAGE_FULL = 0x18 ,
  FIDO2_ERR_CREDENTIAL_EXCLUDED = 0x19 , FIDO2_ERR_PROCESSING = 0x21 , FIDO2_ERR_INVALID_CREDENTIAL = 0x22 , FIDO2_ERR_USER_ACTION_PENDING = 0x23 ,
  FIDO2_ERR_OPERATION_PENDING = 0x24 , FIDO2_ERR_NO_OPERATIONS = 0x25 , FIDO2_ERR_UNSUPPORTED_ALGORITHM = 0x26 , FIDO2_ERR_OPERATION_DENIED = 0x27 ,
  FIDO2_ERR_KEY_STORE_FULL = 0x28 , FIDO2_ERR_UNSUPPORTED_OPTION = 0x2B , FIDO2_ERR_INVALID_OPTION = 0x2C , FIDO2_ERR_KEEPALIVE_CANCEL = 0x2D ,
  FIDO2_ERR_NO_CREDENTIALS = 0x2E , FIDO2_ERR_USER_ACTION_TIMEOUT = 0x2F , FIDO2_ERR_NOT_ALLOWED = 0x30 , FIDO2_ERR_PIN_INVALID = 0x31 ,
  FIDO2_ERR_PIN_BLOCKED = 0x32 , FIDO2_ERR_PIN_AUTH_INVALID = 0x33 , FIDO2_ERR_PIN_AUTH_BLOCKED = 0x34 , FIDO2_ERR_PIN_NOT_SET = 0x35 ,
  FIDO2_ERR_PUAT_REQUIRED = 0x36 , FIDO2_ERR_PIN_POLICY_VIOLATION = 0x37 , FIDO2_ERR_RESERVED = 0x38 , FIDO2_ERR_REQUEST_TOO_LARGE = 0x39 ,
  FIDO2_ERR_ACTION_TIMEOUT = 0x3A , FIDO2_ERR_UP_REQUIRED = 0x3B , FIDO2_ERR_UV_BLOCKED = 0x3C , FIDO2_ERR_INTEGRITY_FAILURE = 0x3D ,
  FIDO2_ERR_INVALID_SUBCOMMAND = 0x3E , FIDO2_ERR_UV_INVALID = 0x3F , FIDO2_ERR_UNAUTHORIZED_PERMISSION = 0x40 , FIDO2_ERR_OTHER = 0x7F
}
 CTAP2 status codes. More...
enum  fido2_cmd {
  FIDO2_CMD_MAKE_CREDENTIAL = 0x01 , FIDO2_CMD_GET_ASSERTION = 0x02 , FIDO2_CMD_GET_INFO = 0x04 , FIDO2_CMD_CLIENT_PIN = 0x06 ,
  FIDO2_CMD_RESET = 0x07 , FIDO2_CMD_GET_NEXT_ASSERTION = 0x08 , FIDO2_CMD_CREDENTIAL_MGMT = 0x0A , FIDO2_CMD_SELECTION = 0x0B
}
 CTAP2 command codes. More...
enum  fido2_cred_protect { FIDO2_CRED_PROTECT_UV_OPTIONAL = 0x01 , FIDO2_CRED_PROTECT_UV_OPTIONAL_WITH_LIST = 0x02 , FIDO2_CRED_PROTECT_UV_REQUIRED = 0x03 }
 Credential protection levels. More...
enum  fido2_cose_alg { FIDO2_COSE_ES256 = -7 , FIDO2_COSE_EDDSA = -8 , FIDO2_COSE_RS256 = -257 }
 COSE algorithm identifiers. More...

Detailed Description

FIDO2 shared type definitions.