Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

sahara.h File Reference


Detailed Description

File which implements the FSL_SHW API when used on Sahara

Definition in file sahara.h.

#include <inttypes.h>
#include <stdlib.h>
#include <memory.h>

Go to the source code of this file.

Classes

struct  fsl_sho_ibo_t
struct  fsl_shw_acco_t
struct  fsl_shw_hco_t
struct  fsl_shw_hmco_t
struct  fsl_shw_kso_t
struct  fsl_shw_pco_t
 Platform Capability Object. More...
struct  fsl_shw_result_t
struct  fsl_shw_scco_t
struct  fsl_shw_sko_t
struct  fsl_shw_spo_t
struct  fsl_shw_uco_t
struct  sah_Desc
 Structure type for descriptors. More...
struct  sah_Head_Desc
 The first descriptor in a chain. More...
struct  sah_Link
 Structure type for links. More...
struct  sah_Mem_Util
 Structure for API memory utilities. More...
struct  sah_Queue
struct  sah_results

Defines

#define _DIAG_ADAPTOR
#define _DIAG_DRV_IF
#define _DIAG_SECURITY_FUNC
#define copy_bytes(out, in, len)   memcpy(out, in, len)
#define fsl_shw_acco_clear_flags(acobject, acflags)   (acobject)->flags &= ~(acflags)
#define fsl_shw_acco_init(acobject, acmode)
#define fsl_shw_acco_set_ccm(acobject, acalg, accounter, acmaclen)
#define fsl_shw_acco_set_flags(acobject, acflags)   (acobject)->flags |= (acflags)
#define fsl_shw_ccm_nist_format_ctr_and_iv(acobject, act, acad, acq, acN, acQ)
#define fsl_shw_ccm_nist_update_ctr_and_iv(acobject, acN, acQ)
#define fsl_shw_hco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_hco_get_digest(hcobject, hccontext, hcclength, hcmsglen)
#define fsl_shw_hco_get_info(hcobject, hcalgorithm)
#define fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hco_set_digest(hcobject, hccontext, hcmsglen)
#define fsl_shw_hco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_hmco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_hmco_init(hcobject, hcalgorithm)   fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hmco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_pco_check_auth_supported(pcobject, pcmode)   ((pcmode == FSL_ACC_MODE_CCM) ? 1 : 0)
#define fsl_shw_pco_check_black_key_supported(pcobject)   1
#define fsl_shw_pco_check_pk_supported(pcobject)   0
#define fsl_shw_pco_check_spo_supported(pcobject)   ((pcobject)->scm_version == 2)
#define fsl_shw_pco_check_sw_keys_supported(pcobject)   0
#define fsl_shw_pco_check_sym_supported(pcobject, pcalg, pcmode)   ((pcobject)->sym_support[pcalg][pcmode])
#define fsl_shw_pco_get_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_hash_algorithms(pcobject, gsalgorithms, gsacount)
#define fsl_shw_pco_get_scc_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_scm_block_size(pcobject)   ((pcobject)->block_size_bytes)
#define fsl_shw_pco_get_scm_version(pcobject)   ((pcobject)->scm_version)
#define fsl_shw_pco_get_smn_size(pcobject, black_size, red_size)
#define fsl_shw_pco_get_smn_version(pcobject)   ((pcobject)->smn_version)
#define fsl_shw_pco_get_spo_count(pcobject)
#define fsl_shw_pco_get_spo_size_bytes(pcobject)
#define fsl_shw_pco_get_sym_algorithms(pcobject, pcalgorithms, pcacount)
#define fsl_shw_pco_get_sym_modes(pcobject, gsmodes, gsacount)
#define fsl_shw_pco_get_version(pcobject, pcmajor, pcminor)
#define fsl_shw_ro_get_reference(robject)   (robject)->user_ref
#define fsl_shw_ro_get_status(robject)   (robject)->code
#define fsl_shw_scco_clear_flags(scobject, scflags)   (scobject)->flags &= ~(scflags)
#define fsl_shw_scco_get_context(scobject, sccontext)   copy_bytes(sccontext, (scobject)->context, (scobject)->block_size_bytes)
#define fsl_shw_scco_get_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_scco_init(scobject, scalg, scmode)
#define fsl_shw_scco_set_context(scobject, sccontext)
#define fsl_shw_scco_set_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_scco_set_flags(scobject, scflags)   (scobject)->flags |= (scflags)
#define fsl_shw_sko_calculate_wrapped_size(wkeyinfo, wkeylen)
#define fsl_shw_sko_clear_flags(skobject, skflags)   (skobject)->flags &= ~(skflags)
#define fsl_shw_sko_get_algorithm(skobject, skalgorithm)   *(skalgorithm) = (skobject)->algorithm
#define fsl_shw_sko_get_established_info(skobject, skhandle)   *(skhandle) = (skobject)->handle
#define fsl_shw_sko_get_key(skobject, skkey)
#define fsl_shw_sko_init(skobject, skalgorithm)
#define fsl_shw_sko_init_pf_key(skobject, skalgorithm, skhwkey)
#define fsl_shw_sko_set_established_info(skobject, skuserid, skhandle)
#define fsl_shw_sko_set_flags(skobject, skflags)   (skobject)->flags |= (skflags)
#define fsl_shw_sko_set_key(skobject, skkey, skkeylen)
#define fsl_shw_sko_set_key_length(skobject, skkeylen)   (skobject)->key_length = skkeylen;
#define fsl_shw_sko_set_keystore(skobject, user_keystore)   (skobject)->keystore = (user_keystore)
#define fsl_shw_sko_set_user_id(skobject, skuserid)   (skobject)->userid = (skuserid)
#define fsl_shw_uco_clear_flags(ucontext, uflags)   (ucontext)->flags &= ~(uflags)
#define fsl_shw_uco_init(ucontext, usize)
#define fsl_shw_uco_set_callback(ucontext, ucallback)   (ucontext)->callback = ucallback
#define fsl_shw_uco_set_flags(ucontext, uflags)   (ucontext)->flags |= (uflags)
#define fsl_shw_uco_set_reference(ucontext, uref)   (ucontext)->user_ref = uref
#define SAH_IN_USER_KEYSTORE   0x100
#define SAH_KEY_IS_HIDDEN   0x08
#define SAH_LINK_INSERTED_LINK   0x80
#define SAH_OUTPUT_LINK   0x04
#define SAH_OWNS_LINK_DATA   0x01
#define SAH_PREPHYS_DATA   0x40
#define SAH_REWORKED_LINK   0x10
#define SAH_STORED_KEY_INFO   0x20
#define SAH_USES_LINK_DATA   0x02
#define SAHARA_DEVICE   "/dev/sahara"

Typedefs

typedef uint64_t key_userid_t
typedef uint8_t * sah_Int
 Indefinite precision integer used for security operations on SAHARA accelerator. The data will always be in little Endian format.
typedef uint32_t sah_Link_Flags
 typedef for flags field of sah_Link
typedef uint8_t * sah_Oct_Str
 Byte array used for block cipher and hash digest/MAC operations on SAHARA accelerator. The Endian format will be as specified by the function using the sah_Oct_Str.

Enumerations

enum  fsl_shw_acc_mode_t { FSL_ACC_MODE_CCM, FSL_ACC_MODE_SSL, FSL_ACC_MODE_CCM, FSL_ACC_MODE_SSL }
enum  fsl_shw_auth_ctx_flags_t {
  FSL_ACCO_CTX_INIT = 1, FSL_ACCO_CTX_LOAD = 2, FSL_ACCO_CTX_SAVE = 4, FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 0x10, FSL_ACCO_CTX_INIT = 1, FSL_ACCO_CTX_LOAD = 2, FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8, FSL_ACCO_NIST_CCM = 0x10
}
enum  fsl_shw_ctr_mod_t {
  FSL_CTR_MOD_8, FSL_CTR_MOD_16, FSL_CTR_MOD_24, FSL_CTR_MOD_32,
  FSL_CTR_MOD_40, FSL_CTR_MOD_48, FSL_CTR_MOD_56, FSL_CTR_MOD_64,
  FSL_CTR_MOD_72, FSL_CTR_MOD_80, FSL_CTR_MOD_88, FSL_CTR_MOD_96,
  FSL_CTR_MOD_104, FSL_CTR_MOD_112, FSL_CTR_MOD_120, FSL_CTR_MOD_128,
  FSL_CTR_MOD_8, FSL_CTR_MOD_16, FSL_CTR_MOD_24, FSL_CTR_MOD_32,
  FSL_CTR_MOD_40, FSL_CTR_MOD_48, FSL_CTR_MOD_56, FSL_CTR_MOD_64,
  FSL_CTR_MOD_72, FSL_CTR_MOD_80, FSL_CTR_MOD_88, FSL_CTR_MOD_96,
  FSL_CTR_MOD_104, FSL_CTR_MOD_112, FSL_CTR_MOD_120, FSL_CTR_MOD_128
}
enum  fsl_shw_cypher_mode_t { FSL_SHW_CYPHER_MODE_ECB = 1, FSL_SHW_CYPHER_MODE_CBC = 2, FSL_SHW_CYPHER_MODE_ECB = 1, FSL_SHW_CYPHER_MODE_CBC = 2 }
enum  fsl_shw_hash_alg_t {
  FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA1, FSL_HASH_ALG_SHA224, FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA1, FSL_HASH_ALG_SHA224, FSL_HASH_ALG_SHA256
}
enum  fsl_shw_hash_ctx_flags_t {
  FSL_HASH_FLAGS_INIT = 0x01, FSL_HASH_FLAGS_SAVE = 0x02, FSL_HASH_FLAGS_LOAD = 0x04, FSL_HASH_FLAGS_FINALIZE = 0x08,
  FSL_HASH_FLAGS_INIT = 0x01, FSL_HASH_FLAGS_SAVE = 0x02, FSL_HASH_FLAGS_LOAD = 0x04, FSL_HASH_FLAGS_FINALIZE = 0x08
}
enum  fsl_shw_hmac_ctx_flags_t {
  FSL_HMAC_FLAGS_INIT = 1, FSL_HMAC_FLAGS_SAVE = 2, FSL_HMAC_FLAGS_LOAD = 4, FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16, FSL_HMAC_FLAGS_INIT = 1, FSL_HMAC_FLAGS_SAVE = 2, FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8, FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16
}
enum  fsl_shw_key_alg_t {
  FSL_KEY_ALG_HMAC, FSL_KEY_ALG_AES, FSL_KEY_ALG_DES, FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4, FSL_KEY_ALG_HMAC, FSL_KEY_ALG_AES, FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES, FSL_KEY_ALG_ARC4, FSL_KEY_PK_PRIVATE
}
enum  fsl_shw_key_flags_t {
  FSL_SKO_KEY_IGNORE_PARITY = 1, FSL_SKO_KEY_PRESENT = 2, FSL_SKO_KEY_ESTABLISHED = 4, FSL_SKO_USE_SECRET_KEY = 8,
  FSL_SKO_KEY_SW_KEY = 16, FSL_SKO_KEY_SELECT_PF_KEY = 32, FSL_SKO_KEY_IGNORE_PARITY = 1, FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4, FSL_SKO_KEY_SW_KEY = 8
}
enum  fsl_shw_key_wrap_t {
  FSL_KEY_WRAP_CREATE, FSL_KEY_WRAP_ACCEPT, FSL_KEY_WRAP_UNWRAP, FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT, FSL_KEY_WRAP_UNWRAP
}
enum  fsl_shw_partition_status_t {
  FSL_PART_S_UNUSABLE, FSL_PART_S_UNAVAILABLE, FSL_PART_S_AVAILABLE, FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED, FSL_PART_S_UNUSABLE, FSL_PART_S_UNAVAILABLE, FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED, FSL_PART_S_ENGAGED
}
enum  fsl_shw_permission_t {
  FSL_PERM_NO_ZEROIZE = 0x80000000, FSL_PERM_TRUSTED_KEY_READ = 0x40000000, FSL_PERM_HD_S = 0x00000800, FSL_PERM_HD_R = 0x00000400,
  FSL_PERM_HD_W = 0x00000200, FSL_PERM_HD_X = 0x00000100, FSL_PERM_TH_R = 0x00000040, FSL_PERM_TH_W = 0x00000020,
  FSL_PERM_OT_R = 0x00000004, FSL_PERM_OT_W = 0x00000002, FSL_PERM_OT_X = 0x00000001, FSL_PERM_NO_ZEROIZE = 0x80000000,
  FSL_PERM_TRUSTED_KEY_READ = 0x40000000, FSL_PERM_HD_S = 0x00000800, FSL_PERM_HD_R = 0x00000400, FSL_PERM_HD_W = 0x00000200,
  FSL_PERM_HD_X = 0x00000100, FSL_PERM_TH_R = 0x00000040, FSL_PERM_TH_W = 0x00000020, FSL_PERM_OT_R = 0x00000004,
  FSL_PERM_OT_W = 0x00000002, FSL_PERM_OT_X = 0x00000001
}
enum  fsl_shw_pf_key_t {
  FSL_SHW_PF_KEY_IIM, FSL_SHW_PF_KEY_PRG, FSL_SHW_PF_KEY_IIM_PRG, FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND, FSL_SHW_PF_KEY_IIM, FSL_SHW_PF_KEY_PRG, FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND, FSL_SHW_PF_KEY_RND
}
enum  fsl_shw_return_t {
  FSL_RETURN_OK_S = 0, FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_KEY_LENGTH_S, FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S, FSL_RETURN_AUTH_FAILED_S, FSL_RETURN_MEMORY_ERROR_S, FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S, FSL_RETURN_POINT_NOT_AT_INFINITY_S, FSL_RETURN_GCD_IS_ONE_S, FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S, FSL_RETURN_NOT_PRIME_S, FSL_RETURN_EVEN_MODULUS_ERROR_S, FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S, FSL_RETURN_OSCILLATOR_ERROR_S, FSL_RETURN_STATISTICS_ERROR_S, FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_BAD_ALGORITHM_S, FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_KEY_LENGTH_S, FSL_RETURN_BAD_KEY_PARITY_S, FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S, FSL_RETURN_MEMORY_ERROR_S, FSL_RETURN_INTERNAL_ERROR_S, FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S, FSL_RETURN_GCD_IS_ONE_S, FSL_RETURN_GCD_IS_NOT_ONE_S, FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S, FSL_RETURN_EVEN_MODULUS_ERROR_S, FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S, FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S, FSL_RETURN_STATISTICS_ERROR_S
}
enum  fsl_shw_sym_ctx_flags_t {
  FSL_SYM_CTX_INIT = 1, FSL_SYM_CTX_LOAD = 2, FSL_SYM_CTX_SAVE = 4, FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1, FSL_SYM_CTX_LOAD = 2, FSL_SYM_CTX_SAVE = 4, FSL_SYM_CTX_PROTECT = 8
}
enum  fsl_shw_sym_mode_t {
  FSL_SYM_MODE_STREAM, FSL_SYM_MODE_ECB, FSL_SYM_MODE_CBC, FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM, FSL_SYM_MODE_ECB, FSL_SYM_MODE_CBC, FSL_SYM_MODE_CTR
}
enum  fsl_shw_tamper_t {
  FSL_SHW_TAMPER_NONE, FSL_SHW_TAMPER_WTD, FSL_SHW_TAMPER_ETBD, FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD, FSL_SHW_TAMPER_SAD, FSL_SHW_TAMPER_TTD, FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD, FSL_SHW_TAMPER_MCO, FSL_SHW_TAMPER_TCO, FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD, FSL_SHW_TAMPER_ETBD, FSL_SHW_TAMPER_ETAD, FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD, FSL_SHW_TAMPER_TTD, FSL_SHW_TAMPER_CTD, FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO, FSL_SHW_TAMPER_TCO
}
enum  fsl_shw_user_ctx_flags_t {
  FSL_UCO_BLOCKING_MODE = 0x01, FSL_UCO_CALLBACK_MODE = 0x02, FSL_UCO_SAVE_DESC_CHAIN = 0x04, FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10, FSL_UCO_CONTEXT_CHANGED = 0x20, FSL_UCO_USERMODE_USER = 0x40, FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02, FSL_UCO_SAVE_DESC_CHAIN = 0x04, FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08, FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20, FSL_UCO_USERMODE_USER = 0x40
}

Functions

fsl_shw_return_t do_scc_decrypt_region (fsl_shw_uco_t *user_ctx, void *partition_base, uint32_t offset_bytes, uint32_t byte_count, const uint8_t *black_data, uint32_t *IV, fsl_shw_cypher_mode_t cypher_mode)
fsl_shw_return_t do_scc_encrypt_region (fsl_shw_uco_t *user_ctx, void *partition_base, uint32_t offset_bytes, uint32_t byte_count, uint8_t *black_data, uint32_t *IV, fsl_shw_cypher_mode_t cypher_mode)
fsl_shw_return_t do_scc_engage_partition (fsl_shw_uco_t *user_ctx, void *address, const uint8_t *UMID, uint32_t permissions)
fsl_shw_return_t do_system_keystore_slot_alloc (fsl_shw_uco_t *user_ctx, uint32_t key_lenth, uint64_t ownerid, uint32_t *slot)
fsl_shw_return_t do_system_keystore_slot_dealloc (fsl_shw_uco_t *user_ctx, uint64_t ownerid, uint32_t slot)
fsl_shw_return_t do_system_keystore_slot_decrypt (fsl_shw_uco_t *user_ctx, uint64_t ownerid, uint32_t slot, uint32_t key_length, const uint8_t *black_data)
fsl_shw_return_t do_system_keystore_slot_encrypt (fsl_shw_uco_t *user_ctx, uint64_t ownerid, uint32_t slot, uint32_t key_length, uint8_t *black_data)
fsl_shw_return_t do_system_keystore_slot_load (fsl_shw_uco_t *user_ctx, uint64_t ownerid, uint32_t slot, const uint8_t *key, uint32_t key_length)
fsl_shw_return_t do_system_keystore_slot_read (fsl_shw_uco_t *user_ctx, uint64_t ownerid, uint32_t slot, uint32_t key_length, const uint8_t *key)
fsl_shw_return_t fsl_shw_add_entropy (fsl_shw_uco_t *user_ctx, uint32_t length, uint8_t *data)
fsl_shw_return_t fsl_shw_auth_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *ct, const uint8_t *auth_value, uint8_t *payload)
 Authenticate and decrypt a (CCM) stream.
fsl_shw_return_t fsl_shw_deregister_user (fsl_shw_uco_t *user_ctx)
fsl_shw_return_t fsl_shw_diminish_perms (fsl_shw_uco_t *user_ctx, void *address, uint32_t permissions)
fsl_shw_return_t fsl_shw_establish_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_key_wrap_t establish_type, const uint8_t *key)
fsl_shw_return_t fsl_shw_extract_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, uint8_t *covered_key)
fsl_shw_return_t fsl_shw_gen_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *payload, uint8_t *ct, uint8_t *auth_value)
 Generate a (CCM) auth code and encrypt the payload.
static fsl_shw_return_t fsl_shw_gen_random_pf_key (fsl_shw_uco_t *user_ctx)
fsl_shw_pco_tfsl_shw_get_capabilities (fsl_shw_uco_t *user_ctx)
fsl_shw_return_t fsl_shw_get_random (fsl_shw_uco_t *user_ctx, uint32_t length, uint8_t *data)
fsl_shw_return_t fsl_shw_get_results (fsl_shw_uco_t *user_ctx, unsigned result_size, fsl_shw_result_t results[], unsigned *result_count)
fsl_shw_return_t fsl_shw_hash (fsl_shw_uco_t *user_ctx, fsl_shw_hco_t *hash_ctx, const uint8_t *msg, uint32_t length, uint8_t *result, uint32_t result_len)
fsl_shw_return_t fsl_shw_hmac (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_hmco_t *hmac_ctx, const uint8_t *msg, uint32_t length, uint8_t *result, uint32_t result_len)
fsl_shw_return_t fsl_shw_hmac_precompute (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_hmco_t *hmac_ctx)
fsl_shw_return_t fsl_shw_read_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, uint8_t *key)
static fsl_shw_return_t fsl_shw_read_tamper_event (fsl_shw_uco_t *user_ctx, fsl_shw_tamper_t *tamperp, uint64_t *timestampp)
fsl_shw_return_t fsl_shw_register_user (fsl_shw_uco_t *user_ctx)
fsl_shw_return_t fsl_shw_release_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info)
fsl_shw_return_t fsl_shw_sfree (fsl_shw_uco_t *user_ctx, void *address)
void * fsl_shw_smalloc (fsl_shw_uco_t *user_ctx, uint32_t size, const uint8_t *UMID, uint32_t permissions)
fsl_shw_return_t fsl_shw_sstatus (fsl_shw_uco_t *user_ctx, void *address, fsl_shw_partition_status_t *status)
fsl_shw_return_t fsl_shw_symmetric_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_scco_t *sym_ctx, uint32_t length, const uint8_t *ct, uint8_t *pt)
fsl_shw_return_t fsl_shw_symmetric_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_scco_t *sym_ctx, uint32_t length, const uint8_t *pt, uint8_t *ct)
fsl_shw_return_t sah_Append_Desc (const sah_Mem_Util *mu, sah_Head_Desc **desc_head, const uint32_t header, sah_Link *link1, sah_Link *link2)
 Create and append descriptor chain, inserting header and links pointing to link1 and link2.
fsl_shw_return_t sah_Append_Link (const sah_Mem_Util *mu, sah_Link *link, uint8_t *p, const size_t length, const sah_Link_Flags flags)
 Allocate Memory for Link structure and append it to the end of the link chain.
fsl_shw_return_t sah_Create_Key_Link (const sah_Mem_Util *mu, sah_Link **link, fsl_shw_sko_t *key_info)
 Allocate Memory for Link structure and populate using key info object.
fsl_shw_return_t sah_Create_Link (const sah_Mem_Util *mu, sah_Link **link, uint8_t *p, const size_t length, const sah_Link_Flags flags)
 Allocate Memory for Link structure and populate using input parameters.
void sah_Descriptor_Chain_Destroy (const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
 Destroy a descriptor chain and free memory of associated links.
fsl_shw_return_t sah_Descriptor_Chain_Execute (sah_Head_Desc *desc_chain, fsl_shw_uco_t *user_ctx)
 Execute a descriptor chain.
void sah_Destroy_Link (const sah_Mem_Util *mu, sah_Link *link)
void sah_Postprocess_Results (fsl_shw_uco_t *user_ctx, sah_results *result_info)
fsl_shw_return_t system_keystore_get_slot_info (uint64_t owner_id, uint32_t slot, uint32_t *address, uint32_t *slot_size_bytes)


Generated by  Doxygen 1.6.0   Back to index