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

shw_driver.h File Reference


Detailed Description

Header file to use the SHW driver.

The SHW driver is used in two modes: By a user, from the FSL SHW API in user space, which goes through /dev/fsl_shw to make open(), ioctl(), and close() calls; and by other kernel modules/drivers, which use the FSL SHW API, parts of which are supported directly by the SHW driver.

Testing is performed by using the apitest and kernel api test routines developed for the Sahara2 driver.

Definition in file shw_driver.h.

#include <inttypes.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <memory.h>
#include <stdio.h>
#include "../../sahara2/include/fsl_platform.h"

Go to the source code of this file.

Classes

struct  add_entropy_req
struct  capabilities_req
struct  fsl_sho_ibo
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  get_random_req
struct  results_req
struct  scc_partition_info_t
struct  scc_region_t
struct  shw_queue_entry_t
struct  shw_queue_t
struct  shw_req_header

Defines

#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_gen_random_pf_key(user_ctx)   FSL_RETURN_NO_RESOURCE_S
#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)   0
#define fsl_shw_pco_check_black_key_supported(pcobject)   0
#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)   0
#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_read_tamper_event(user_ctx, tamperp, timestampp)   FSL_RETURN_NO_RESOURCE_S
#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)   memcpy(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)
#define fsl_shw_uco_init(ucontext, usize)
#define fsl_shw_uco_set_callback(ucontext, ucallback)
#define fsl_shw_uco_set_flags(ucontext, uflags)   (ucontext)->flags |= (uflags) | FSL_UCO_CONTEXT_CHANGED
#define fsl_shw_uco_set_reference(ucontext, uref)
#define SHW_IOCTL_REQUEST   21

Typedefs

typedef struct fsl_sho_ibo fsl_sho_ibo_t
typedef uint64_t key_userid_t

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
}
enum  shw_user_request_t {
  SHW_USER_REQ_REGISTER_USER, SHW_USER_REQ_DEREGISTER_USER, SHW_USER_REQ_GET_RESULTS, SHW_USER_REQ_GET_CAPABILITIES,
  SHW_USER_REQ_GET_RANDOM, SHW_USER_REQ_ADD_ENTROPY, SHW_USER_REQ_DROP_PERMS, SHW_USER_REQ_SSTATUS,
  SHW_USER_REQ_SFREE, SHW_USER_REQ_SCC_ENCRYPT, SHW_USER_REQ_SCC_DECRYPT
}
enum  shw_work_type_t { SHW_WORK_GET_RANDOM = 1, SHW_WORK_ADD_RANDOM }

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 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.
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)
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)
static void init_req (struct shw_req_header *hdr, fsl_shw_uco_t *user_ctx)
static fsl_shw_return_t send_req (shw_user_request_t type, struct shw_req_header *req, fsl_shw_uco_t *ctx)
fsl_shw_return_t validate_uco (fsl_shw_uco_t *uco)
 Verify the user context object.


Generated by  Doxygen 1.6.0   Back to index