可信密钥服务(Trusted Key Service,TKS),旨在为用户提供基于硬件保护的高安全、高可用的密钥管理和代理服务。
python3.7+
cryptography
(安装pip install cryptography
)secret-key.bin
# 作为示例,以下命令将会生成一个长度为16 Bytes (128bits) 的随机密钥到secret-key.bin文件中 openssl rand -out secret-key.bin 16 # 作为示例,以下命令将会生成一个长度为32 Bytes (256 bits) 的随机密钥到secret-key.bin文件中 openssl rand -out secret-key.bin 32
tks-import-material.txt
wget https://jeddak-cc-infra.tos-cn-beijing.volces.com/tks/tks-client-script.py
python tks-client-script.py -s=secret-key.bin -m=tks-import-material.txt
client-import-param.txt
以及加密密钥client-encrypted-key.txt
,通过可信密钥服务页面找到对应的密钥名称,点击「导入密钥」,分别填写导入参数和加密密钥两个素材,完成密钥导入。