CryptoAuthLib v3.7.4
Microchip CryptoAuthentication Library
 
Loading...
Searching...
No Matches
atca_config_check.h File Reference

Consistency checks for configuration options. More...

#include "atca_config.h"

Macros

#define FEATURE_ENABLED   (1)
 
#define FEATURE_DISABLED   (0)
 
#define DEFAULT_ENABLED   FEATURE_ENABLED
 
#define DEFAULT_DISABLED   FEATURE_DISABLED
 
#define ATCA_SHA_SUPPORT   1
 
#define ATCA_ECC_SUPPORT   DEFAULT_ENABLED
 
#define ATCA_CA2_SUPPORT   DEFAULT_ENABLED
 
#define ATCA_CA_SUPPORT   DEFAULT_ENABLED
 
#define ATCA_HOSTLIB_EN   DEFAULT_ENABLED
 
#define ATCA_USE_ATCAB_FUNCTIONS
 
#define ATCA_CHECK_PARAMS_EN   DEFAULT_ENABLED
 
#define ATCA_CHECK_INVALID_MSG(c, s, m)   if (c) { return ATCA_TRACE(s, m); }
 
#define ATCA_CHECK_VALID_MSG(c, m)   if (!ATCA_TRACE(!(c), m))
 
#define ATCA_CHECK_INVALID(c, s)   ATCA_CHECK_INVALID_MSG(c, s, "")
 
#define ATCA_CHECK_VALID(c)   ATCA_CHECK_VALID_MSG(c, "")
 
#define MULTIPART_BUF_EN   (DEFAULT_DISABLED)
 
#define ATCACERT_EN   (DEFAULT_ENABLED)
 
#define ATCA_HEAP
 
#define ATCA_UNUSED_VAR_CHECK   (DEFAULT_ENABLED)
 
#define ATCAB_AES_EN   (DEFAULT_ENABLED)
 
#define ATCAB_AES_GFM_EN   (DEFAULT_ENABLED)
 
#define ATCAB_AES_GCM_EN   (DEFAULT_ENABLED)
 
#define ATCAB_CHECKMAC_EN   (DEFAULT_ENABLED)
 
#define ATCAB_COUNTER_EN   (DEFAULT_ENABLED)
 
#define ATCAB_DERIVEKEY_EN   (DEFAULT_ENABLED)
 
#define ATCAB_ECDH_EN   (DEFAULT_ENABLED)
 
#define ATCAB_ECDH_ENC_EN   (DEFAULT_ENABLED)
 
#define ATCAB_GENDIG_EN   (DEFAULT_ENABLED)
 
#define ATCAB_GENKEY_EN   (DEFAULT_ENABLED)
 
#define ATCAB_GENKEY_MAC_EN   ATCAB_GENKEY_EN
 
#define ATCAB_HMAC_EN   (DEFAULT_ENABLED)
 
#define ATCAB_INFO_LATCH_EN   (DEFAULT_ENABLED)
 
#define ATCAB_KDF_EN   (DEFAULT_ENABLED)
 
#define ATCAB_LOCK_EN   (DEFAULT_ENABLED)
 
#define ATCAB_MAC_EN   (DEFAULT_ENABLED)
 
#define ATCAB_NONCE_EN   (DEFAULT_ENABLED)
 
#define ATCAB_PRIVWRITE_EN   (DEFAULT_ENABLED)
 
#define ATCAB_RANDOM_EN   (DEFAULT_ENABLED)
 
#define ATCAB_READ_EN   (DEFAULT_ENABLED)
 
#define ATCAB_READ_ENC_EN   ATCAB_READ_EN
 
#define ATCAB_SECUREBOOT_EN   (DEFAULT_ENABLED)
 
#define ATCAB_SECUREBOOT_MAC_EN   ATCAB_SECUREBOOT_EN
 
#define ATCAB_SELFTEST_EN   (DEFAULT_ENABLED)
 
#define ATCAB_SHA_EN   (DEFAULT_ENABLED)
 
#define ATCAB_SHA_HMAC_EN   ATCAB_SHA_EN
 
#define ATCAB_SHA_CONTEXT_EN   ATCAB_SHA_EN
 
#define ATCAB_SIGN_EN   (DEFAULT_ENABLED)
 
#define ATCAB_SIGN_INTERNAL_EN   ATCAB_SIGN_EN
 
#define ATCAB_UPDATEEXTRA_EN   (DEFAULT_ENABLED)
 
#define ATCAB_VERIFY_EN   (DEFAULT_ENABLED)
 
#define ATCAB_VERIFY_EXTERN_EN   ATCAB_VERIFY_EN
 
#define ATCAB_VERIFY_MAC_EN   ATCAB_VERIFY_EN
 
#define ATCAB_VERIFY_STORED_EN   ATCAB_VERIFY_EN
 
#define ATCAB_VERIFY_VALIDATE_EN   ATCAB_VERIFY_EN
 
#define ATCAB_WRITE_EN   (DEFAULT_ENABLED)
 
#define ATCAB_WRITE_ENC_EN   ATCAB_WRITE_EN
 
#define ATCAC_SHA1_EN   (DEFAULT_ENABLED)
 
#define ATCAC_SHA256_EN   (DEFAULT_ENABLED)
 
#define ATCAC_SHA256_HMAC_EN   ATCAC_SHA256_EN
 
#define ATCAC_SHA256_HMAC_CTR_EN   ATCAC_SHA256_HMAC_EN
 
#define ATCAC_RANDOM_EN   ATCA_HOSTLIB_EN
 
#define ATCAC_VERIFY_EN   ATCA_HOSTLIB_EN
 
#define ATCAC_SIGN_EN   ATCA_HOSTLIB_EN
 

Detailed Description

Consistency checks for configuration options.

Macro Definition Documentation

◆ ATCA_CHECK_INVALID_MSG

#define ATCA_CHECK_INVALID_MSG (   c,
  s,
 
)    if (c) { return ATCA_TRACE(s, m); }

Emits message and returns the status code when the condition is true

◆ ATCA_SHA_SUPPORT

#define ATCA_SHA_SUPPORT   1

Library Configuration File - All build attributes should be included in atca_config.h

◆ ATCA_UNUSED_VAR_CHECK

#define ATCA_UNUSED_VAR_CHECK   (DEFAULT_ENABLED)

Enables removal of compiler warning due to unused variables

◆ ATCA_USE_ATCAB_FUNCTIONS

#define ATCA_USE_ATCAB_FUNCTIONS

Does the atcab_ API layer need to be instantiated (adds a layer of abstraction)

◆ ATCAB_AES_GFM_EN

#define ATCAB_AES_GFM_EN   (DEFAULT_ENABLED)

Enable ATCAB_AES_GFM_EN to enabled Galois Field Multiply

Supported API's: atcab_aes

◆ ATCAB_GENKEY_MAC_EN

#define ATCAB_GENKEY_MAC_EN   ATCAB_GENKEY_EN

Requires: ATCAB_GENKEY_EN

Enable ATCAB_GENKEY_MAC_EN which provides for a mac with the genkey command

Supported API's: atcab_genkey_base

◆ ATCAB_INFO_LATCH_EN

#define ATCAB_INFO_LATCH_EN   (DEFAULT_ENABLED)

Enable ATCAB_INFO_LATCH_EN which enables control of GPIOs and the persistent latch

Supported API's: atcab_info_base

◆ ATCAB_VERIFY_MAC_EN

#define ATCAB_VERIFY_MAC_EN   ATCAB_VERIFY_EN

Requires: ATCAB_VERIFY

Executes verification command with verification MAC for the External or Stored Verify modes

Supported API's: atcab_verify_extern_mac, atcab_verify_stored_mac

◆ ATCAC_RANDOM_EN

#define ATCAC_RANDOM_EN   ATCA_HOSTLIB_EN

Requires: ATCA_HOSTLIB_EN

Enable ATCAC_RANDOM_EN get random numbers from the host's implementation - generally assumed to come from the host's cryptographic library or peripheral driver

◆ ATCAC_SHA1_EN

#define ATCAC_SHA1_EN   (DEFAULT_ENABLED)

Enable ATCAC_SHA1_EN to enable sha1 host side api

Supported API's: atcab_write

◆ ATCAC_SHA256_EN

#define ATCAC_SHA256_EN   (DEFAULT_ENABLED)

Enable ATCAC_SHA256_EN to enable sha256 host side api

Supported API's: atcab_write

◆ ATCAC_SIGN_EN

#define ATCAC_SIGN_EN   ATCA_HOSTLIB_EN

Requires: ATCA_HOSTLIB_EN

Enable ATCAC_SIGN_EN to use the host's sign functions. Generally assumed to come from the host's cryptographic library or peripheral driver.

◆ ATCAC_VERIFY_EN

#define ATCAC_VERIFY_EN   ATCA_HOSTLIB_EN

Requires: ATCA_HOSTLIB_EN

Enable ATCAC_VERIFY_EN to use the host's verify functions. Generally assumed to come from the host's cryptographic library or peripheral driver.

◆ ATCACERT_EN

#define ATCACERT_EN   (DEFAULT_ENABLED)

Enables the ATCACERT x509 handling module

◆ MULTIPART_BUF_EN

#define MULTIPART_BUF_EN   (DEFAULT_DISABLED)

Enables multipart buffer handling (generally for small memory model platforms)