vHsmGeneral
-
Ram Loop Callout:使能后允许hsm在ram中运行,ram中运行时不提供安全服务,方法:
vHsmIpc
-
hsm和host通过ipc通讯(interprocessor communication )
-
ipc仅存储用于处理job的指针
-
每个需要与hsm通讯的核都需要配置一个ipcInstance,每个instance都需要分配自己的ipc address,ipc memory需要连接到这个地址上。
-
如果使用中断通知,需要配置中断标志的地址,在hsm完成一个crypto job时会产生一个通知
-
根据应用场景不同,可以将某些driver objects映射到此ipc instance
-
vHsmDriverPreconfigDestination 指定pre.arxml文件地址,不指定则默认存储在$(GenDataFolder)/vHsmPreconfig_$(InstanceName)/
Input/Output Memory Area Whitelisting
-
hsm仅能访问白名单内指定的地址范围,访问权限有ro和rw两种
-
至少有一个memory area需要配置为rw权限供ipc数据访问和加密服务请求
vHsm Published Information
包含硬件相关的信息如:中断信息,host2hsm,hsm2host寄存器等,寄存器说明:
vHsm Internal Scheduling
hsm可以仲裁job的优先级,可以在vHsmSchedulableEntities 中配置,host中请求的job将会由配置的优先级仲裁
Crypto Primitive and Driver Objects in vHsm Configuration
-
vHsm_Hal/vHsm_Core/Crypto_30_LibCv/vHsm_Custom这些driver都能提供特定的加密算法(所谓的加密原语primitives)。
-
primitive 是加密服务的基础描述,可以在CryptoDriver中配置。每个primitive由算法modes 和 crypto algorithm families 的集合构成,但一般不需要配置,代码中已经预置了一系列的primitive
-
primmitive需要map到driver object 才能被上层使用,driver object中map的primmitive才代表这个driver object的能力
Crypto Key Configuration
-
配置CryptoKeys 需要ref到CryptoKeyType
-
CryptoKeyType由一系列的KeyElements组成
-
每个KeyElements有以下属性:
-
Size
-
Allow Partial Access:This feature must be activated if more memory shall be reserved than initially required. For instance, you want to use AES128 with the option to migrate to AES256 later
-
Read / Write Access
-
Persist
-
Init Value (optional)
-
CryptoKey需要在CryptoNvStorage / CryptoNvBlocks 中存储:
CryptoKey属性:
-
Internal Only Keys:仅hsm可以访问
-
Secure Boot Protected Keys: secure boot运行期间不可访问,secure boot成功结束后才能访问
-
Secure Boot Protected Keys: 仅可写入一次
-
Random Init Keys:随机初始值的key,也可以用来生成唯一的key