Remote Key Provision (RKP)

Android RemoteProvisioner

Android RemoteProvisioning

Android Keymint v1

概要

rkp的核心在于替换原有的工厂预置attestation key的模式,达到device unique level的远程provision。

工厂收集device info & DK_pub (BCC 上游 public key,或者随机生成的自签名public key),同步给google。

google通过识别 DK_pub ,确认终端attestation cert request的合法性;通过检查bcc中的device信息,确认device的安全状态;最终决策是否签发attestation certificate。

attestation certificate为短周期(30天)有效,定期resume。

device info.aidl

attestation certificate 签发流程

测试: EEK response 如果没有传入Google的证书链,则为测试场景下使用的EEK。

算法

  • 签发的attestation certificates为P-256,格式x.509v3。

  • 执行RKP签发过程时使用 ED25519签名/X25519通信,格式COSE/CBOR。

信任关系

BCC Root = DK_pub -> … -> BCC Leaf = KM_pub -> mac key -> public keys

  • 过渡: DK_pub 工厂随机生成,BCC Root=DK_pub = KM_pub

  • BCC: DK_pub 通过DICE机制生成,BCC Root = DK_pub -> … -> KM_pub

DK_pub同步

DK_pub 可以直接工厂同步。

DK_pub 还可以在出厂后首次boot时,与google server联网上报。上报 DK_pub 的流程与联网签发attestation certificates流程类似,区别主要在于:此时没有需要签发的pubKeys,即N=0; google server不返回attestation cert,而是登记 DK_pub

  • DK_pub 可以由SoC Vendor Root签名/Strongbox Vendor Root签名/OEM 签名/自签名,参考[ProtectedData.aidl]中的AdditionalDKSignatures。

  • 工厂提前向google server同步对应的root public key;工厂签发DKCertChain。