我尝试使用 openssl 为 ecdsa 生成对密钥。
为什么公钥长度是65字节而不是64字节?
创建私钥
openssl ecparam -genkey -name secp256r1 -noout -out private.pem
生成公钥
openssl ec -in private.pem -text -noout
读取 EC 密钥
私钥:(256 位)
私人:13:10:bc:9c:a8:3d:8b:fa:91:b2:a4:f8:e5:d1:5f:53:56:eb:16:91:86:aa:6b:c5:16:8b:16:e9:04:4e:03:a9
出版:04:51:02:22:75:dd:3d:25:ee:b6:aa:a5:c6:c6:27:5c:07:c5:e6:e9:75:40:4a:b3:e4:cd:22:e5:cc:9a:bd:1b:14:0e:53:6a:57:9a:26:98:d2:2f:6b:a4:9b:a4:47:fe:ab:76:99:59:26:39:ac:2b:2e:93:b3:ef:f0:8b:f5:3b:86
ASN1 OID: prime256v1
NIST 曲线:P-256