▸ SHE (Secure Hardware Extension, HIS SHE spec v1.1): automotive-specific security module for microcontrollers; provides hardware-isolated AES-128 engine, 17 dedicated key slots (MASTER_ECU_KEY, BOOT_MAC_KEY, KEY_1…KEY_10, RAM_KEY, plus wildcard slots); all key slots are write-once after production lock; SHE commands via CMD register: CMD_LOAD_KEY, CMD_LOAD_PLAIN_KEY (RAM_KEY only), CMD_EXPORT_RAM_KEY, CMD_GET_ID, CMD_INIT_RNG, CMD_GENERATE_MAC, CMD_VERIFY_MAC, CMD_ENC_ECB/CBC, CMD_DEC_ECB/CBC; key loading uses Miyaguchi-Preneel KDF-based protocol (M1–M5 message sequence)
▸ HSM (full Hardware Security Module, e.g., Infineon SLx 9670, NXP SE050, STM32 TrustZone + SE): more capable than SHE - supports RSA-2048/4096, ECDSA P-256/P-384/P-521, AES-256, SHA-256/384/512, multiple key types (symmetric, asymmetric, certificate storage), secure key generation with internal TRNG, FIPS 140-2/3 Level 2+ certification; automotive MCUs with embedded HSM: Infineon Aurix TC3xx (eHSM), NXP S32K (CSEc+ HSM), Renesas RH850 (HSM); HSM runs isolated firmware on dedicated CPU core with no shared memory with main application
▸ Secure boot using HSM: boot ROM (immutable, in OTP or masked ROM) → loads Boot Software from flash → before executing, requests HSM to verify CMAC/signature of Boot SW image; SHE-based secure boot: Boot ROM computes AES-128-CMAC of entire application flash region using BOOT_MAC_KEY → compares to stored BOOT_MAC in protected SHE slot → mismatch halts execution and asserts ERROR_PIN; HSM-based secure boot: verify ECDSA-P256 signature over SHA-256 hash of each boot stage (Boot Manager, MCAL, BSW, Application) - each stage chained to next via signed manifest
▸ AUTOSAR Crypto Stack integration: AUTOSAR CryptoStack = CryptoDriver (hardware abstraction) → CryIf (Crypto Interface, PDU routing) → Csm (Crypto Service Manager, job management); configure CryptoDriverObject pointing to HSM or SHE driver; define CsmJob (e.g., CsmJob_AES128_CMAC_Generate) with algorithm = AES-128/CMAC/16-byte MAC, processing mode = SYNC, key reference = HSM_SLOT_KEY1; application calls Csm_MacGenerate(jobId, inputBuffer, length, macBuffer) → CryIf dispatches to correct CryptoDriver primitive → result available synchronously or via callback