如何将 ECDSA secp256k1 PEM 格式的私钥转换为二进制?

问题描述

我正在尝试将我的 secp256k1 私有密钥导入 AWS KMS。我的密钥是 PEM 格式的,AWS KMS 显示 'The key material must be in binary format' 。如何将 ECDSA secp256k1 PEM 格式的私钥转换为二进制?

解决方法

对于正在寻找的其他人,请在 GCP 上找到。

openssl pkcs8 -topk8 -nocrypt -inform PEM -outform DER \
    -in /path/to/asymmetric-key-pem \
    -out /path/to/formatted-key

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...