# Secure Bootloader Sample Reference Enumeration Type Documentation

## BL_AttestStatus_t

Location: bl_attestation.h:90

Define the basic attestation status types.

Members

- BL_ATTEST_NO_ERROR

- BL_ATTEST_INIT_FAILED

- BL_ATTEST_INVALID_REQUEST

- BL_ATTEST_INVALID_CLAIM

- BL_ATTEST_KEY_GEN_FAILURE

- BL_ATTEST_KEY_FAILURE

- BL_ATTEST_BUFFER_OVERFLOW

## BL_AttestKeyType_t

Location: bl_attestation.h:102

Define the types of attestation keys supported by the system.

Members

- BL_ATTEST_AES_128

- BL_ATTEST_AES_192

- BL_ATTEST_AES_256

- BL_ATTEST_RSA_1024

- BL_ATTEST_RSA_2048

- BL_ATTEST_RSA_3072

- BL_ATTEST_ECC_256

- BL_ATTEST_KEYTYPE_MAX

## BL_AttestationChallengeSize_t

Location: bl_attestation.h:115

Define the supported attestation challenge sizes.

Members

- BL_ATTEST_CHALLENGE_32 = 32

- BL_ATTEST_CHALLENGE_48 = 48

- BL_ATTEST_CHALLENGE_64 = 64

## BL_AttestTags_t

Location: bl_attestation.h:123

Define CBOR tag values for each of the attestation fields.

Members

- BL_ATTEST_CBOR_TAG_HASH = 0xCBAA

- BL_ATTEST_CBOR_TAG_SIGN

- BL_ATTEST_CBOR_TAG_EAT

## BL_UpdateType_t

Location: bl_check.h:99

Define the possible update types.

Members

- BL_UPDATE_IMAGE

- BL_UPDATE_BOOTLOADER

- BL_UPDATE_SECURE_IMAGE

- BL_UPDATE_SECURE_BOOTLOADER

- BL_UPDATE_SECONDARY_IMAGE

- BL_UPDATE_NONE

## BL_ConfigStatus_t

Location: bl_configuration.h:91

Define the configuration status values.

Members

- BL_CONFIG_OKAY

- BL_CONFIG_CORRUPT

## BL_CryptoStatus_t

Location: bl_crypto.h:97

Define the status values returned by the cryptography modules.

Members

- BL_CRYPTO_NO_ERROR

- BL_CRYPTO_RNG_FAIL

- BL_CRYPTO_HASH_FAIL

- BL_CRYPTO_RSA_FAIL

- BL_CRYPTO_RSA_WRITE_FAIL

- BL_CRYPTO_RSA_READ_FAIL

- BL_CRYPTO_RSA_HASH_FAIL

- BL_CRYPTO_RSA_SIGN_FAIL

- BL_CRYPTO_RSA_VERIFY_FAIL

- BL_CRYPTO_ECC_FAIL

- BL_CRYPTO_AES_FAIL

## BL_CryptoRSAKeyType_t

Location: bl_crypto_rsa.h:95

Define the supported key types, encoding the key size in bits.

Members

- RSA_1024 = 1024

- RSA_2048 = 2048

- RSA_3072 = 3072

## BL_EATStatus_t

Location: bl_eat.h:88

Define the possible status codes.

Members

- BL_EAT_NO_ERROR

- BL_EAT_INVALID_OPERATION

- BL_EAT_BUFFER_OVERFLOW

- BL_CHALLENGE_FAILURE

- BL_INSTANCE_FAILURE

- BL_IMPLEMENTATION_FAILURE

- BL_CLIENT_FAILURE

- BL_LIFECYCLE_FAILURE

- BL_EAN_FAILURE

- BL_SEED_FAILURE

- BL_ROM_FAILURE

- BL_BOOTLOADER_FAILURE

- BL_APPLICATION_FAILURE

## BL_EATTags_t

Location: bl_eat.h:106

Define CBOR tag values for each of the EAT fields.

Members

- BL_EAT_CBOR_TAG_CHALLENGE = 0xCBEA

- BL_EAT_CBOR_TAG_INSTANCE

- BL_EAT_CBOR_TAG_IMPLEMENTATION

- BL_EAT_CBOR_TAG_CLIENT

- BL_EAT_CBOR_TAG_LIFECYCLE

- BL_EAT_CBOR_TAG_EAN

- BL_EAT_CBOR_TAG_SEED

- BL_EAT_CBOR_TAG_ROM

- BL_EAT_CBOR_TAG_BOOTLOADER

- BL_EAT_CBOR_TAG_APPLICATION

- BL_EAT_CBOR_TAG_MAX

## BL_FCSStatus_t

Location: bl_fcs.h:89

Define the possible FCS status values.

Members

- BL_FCS_NO_ERROR

- BL_FCS_VALID

- BL_FCS_INVALID

- BL_FCS_UNRECOGNIZED

- BL_FCS_NOT_INITIALIZED

## BL_FCSAlgorithm_t

Location: bl_fcs.h:99

Define the possible valid FCS calculators.

Members

- BL_FCS_CCITT_FFFF = 0

- BL_FCS_MCRF4XX

- BL_FCS_NO_ALGO

## BL_EncryptionStatus_t

Location: bl_file_encryption.h:100

Define the file encryption status values.

Members

- BL_ENCRYPT_NO_ERROR

- BL_ENCRYPT_KEY_ERROR

- BL_ENCRYPTION_FAILURE

- BL_DECRYPTION_FAILURE

- BL_ENCRYPTION_INVALID_REQUEST

## BL_ImageType_t

Location: bl_image.h:85

Define the known image types.

Members

- BL_IMAGE_BOOTLOADER

- BL_IMAGE_APPLICATION

- BL_IMAGE_UNRECOGNIZED

## BL_ImageStatus_t

Location: bl_image.h:92

Define the image status values.

Members

- BL_IMAGE_NO_ERROR = 0

- BL_IMAGE_ADDRESS_ERROR

- BL_IMAGE_LENGTH_ERROR

- BL_IMAGE_FLASH_ERROR

- BL_IMAGE_VERIFY_ERROR

- BL_IMAGE_AUTHENTICATE_ERROR

## BL_LoaderCommand_t

Location: bl_loader.h:82

Enum specifying each of the valid commands the loader recognizes.

Members

- BL_LOADER_HELLO = 0

- BL_LOADER_PROGRAM

- BL_LOADER_READ

- BL_LOADER_RESTART

- BL_LOADER_AUTHENTICATE

- BL_LOADER_FILE_LIST

- BL_LOADER_FILE_LOAD

- BL_LOADER_FILE_READ

- BL_LOADER_FILE_REMOVE

- BL_LOADER_FILE_RESET

- BL_LOADER_INJECT_KEY

- BL_LOADER_GET_TOKEN_SIZE

- BL_LOADER_GET_TOKEN

- BL_LOADER_ERROR

- BL_LOADER_COMMAND_MAX

## BL_LoaderStatus_t

Location: bl_loader.h:115

Define a set of supported loader status codes.

Members

- BL_LOADER_NO_ERROR = 0

- BL_LOADER_BAD_MSG

- BL_LOADER_UNKNOWN_CMD

- BL_LOADER_INVALID_CMD

- BL_LOADER_GENERAL_FLASH_FAILURE

- BL_LOADER_WRITE_FLASH_NOT_ENABLED

- BL_LOADER_BAD_FLASH_ADDRESS

- BL_LOADER_ERASE_FLASH_FAILED

- BL_LOADER_BAD_FLASH_LENGTH

- BL_LOADER_INACCESSIBLE_FLASH

- BL_LOADER_FLASH_COPIER_BUSY

- BL_LOADER_PROG_FLASH_FAILED

- BL_LOADER_VERIFY_FLASH_FAILED

- BL_LOADER_VERIFY_IMAGE_FAILED

- BL_LOADER_NO_VALID_BOOTLOADER

- BL_LOADER_RX_FAILURE

- BL_LOADER_RX_TIMEOUT

- BL_LOADER_IMAGE_FAILURE

- BL_LOADER_VERIFICATION_FAILURE

- BL_LOADER_CERT_LOAD_FAILURE

- BL_LOADER_AUTHENTICATION_FAILURE

- BL_LOADER_AUTHENTICATE_IMAGE_FAILED

- BL_LOADER_FILE_SYSTEM_FAILURE

- BL_LOADER_ATTESTATION_FAILURE

## BL_LoaderCertType_t

Location: bl_loader.h:144

Enum specifying the types of certificate that can be loaded.

Members

- BL_KEY1_CERT

- BL_KEY2_CERT

- BL_CONTENT_CERT

- BL_DEBUG_CERT

## BL_LoaderStatusType_t

Location: bl_loader.h:153

Define a type for the status messages.

Members

- BL_LOADER_STATUS_TYPE_NEXT = 0x55

- BL_LOADER_STATUS_TYPE_END = 0xAA

- BL_LOADER_STATUS_TYPE_CRC = 0xCC

## BL_CBORStatus_t

Location: bl_mini_cbor.h:88

Define the CBOR status values.

Members

- BL_CBOR_NO_ERROR

- BL_CBOR_BAD_REQUEST

- BL_CBOR_BUFFER_FULL

- BL_CBOR_OVERFLOW

## blSecureBootStatus_t

Location: bl_secure_boot.h:87

Define the status codes.

Members

- BL_SEC_NO_ERROR

- BL_SEC_INIT_FAILED

- BL_SEC_CONTEXT_FAILED

- BL_SEC_KEY1_AUTH_FAILED

- BL_SEC_KEY2_AUTH_FAILED

- BL_SEC_CONTENT_AUTH_FAILED

- BL_SEC_INVALID_OPERATION

- BL_SEC_INVALID_PARAMETER

## BL_FStoreStatus_t

Location: bl_simple_filer.h:93

Define the status values possible from the secure filer module.

Members

- BL_FS_NO_ERROR

- BL_FS_INIT_FAILURE

- BL_FS_FS_FULL

- BL_FS_MISSING_FILE

- BL_FS_DUPLICATE_FILE

- BL_FS_INVALID_OPERATION

- BL_FS_ENCRYPTION_FAILURE

- BL_FS_FLASH_READ_FAILURE

- BL_FS_FLASH_WRITE_FAILURE

- BL_FS_FLASH_ERASE_FAILURE

## BL_FSFlags_t

Location: bl_simple_filer.h:108

Define the flags associated with stored files.

Members

- BL_FS_CAN_READ = 1

- BL_FS_CAN_WRITE = 2

- BL_FS_CAN_DELETE = 4

## BL_FSReservedFilename_t

Location: bl_simple_filer.h:118

Define a set of reserved file names that should not be accessible directly from the loader.

Members

- BL_FS_NOFILE

- BL_FS_ATTEST_AES_128

- BL_FS_ATTEST_AES_192

- BL_FS_ATTEST_AES_256

- BL_FS_ATTEST_RSA_1024

- BL_FS_ATTEST_RSA_2048

- BL_FS_ATTEST_RSA_3072

- BL_FS_ATTEST_ECC_256

- BL_FS_MAX_RESERVED_FILE

## BL_UARTStatus_t

Location: bl_uart.h:113

Define a set of supported error codes.

Members

- BL_UART_NO_ERROR = 0

- BL_UART_TX_IDLE

- BL_UART_RX_IDLE

- BL_UART_TX_BUSY

- BL_UART_RX_BUSY

- BL_UART_TX_TIMEOUT

- BL_UART_RX_TIMEOUT

- BL_UART_INVALID_PARAMETER

- BL_UART_STATE_ERROR

- BL_UART_BAD_FCS

- BL_UART_RX_ERROR

- BL_UART_TX_ERROR