我有一个 API,我需要在其中传递根据 API Docs 用于的“KeyMaterial”:
Contains the cryptographic parameters that are required to perform End-to-End encryption for sharing the information between the producer and the consumer in a secure manner.
这是他们分享的示例
"KeyMaterial": {
"cryptoAlg": "ECDHE",
"curve": "Curve25519",
"params": "string",
"DHPublicKey": {
"expiry": "2018-12-23T11:39:57.153Z",
"Parameters": "string",
"KeyValue": "683938505ec529a700fcceab66273d1aa78d494208a4769930f0818872159265"
},
"Nonce": "R4s6vNI7I/JfdeA3/6dMMQ==",
"Signature": "jFJcYCOTVV6iiLPlM7qY+Zz+3PF8oUPFg1byb1GNr+k="
}
他们还提到
“签名”字段:参考签名标准了解更多信息:https ://www.w3.org/TR/xmldsig-core1/
"KeyValue" : 包含临时公钥的值
但是,我对应该如何填写这些参数感到困惑。我找不到任何 ECDHE + Curve25519 的参考实现。谁能解释我该如何填写这些参数?如何生成签名字段?和“DHPublicKey”中的 KeyValue 字段