Expected result
Procedure
- Call
POST /Agent/Crypto/GetAlgorithmswith the documented empty JSON body. - Select an algorithm accepted by the relying identity or contract workflow; do not hard-code an algorithm merely because one Neuron returns it.
- Choose a unique
idfor the key. This caller-supplied value is thekeyIdused by later identity and signing operations. - Calculate the signatures using the formulas below.
- Submit the request and retain the submitted
id,localName, andnamespace. - Retrieve the public key through
POST /Agent/Crypto/GetPublicKeywhen the relying workflow needs verification material.
State to retain
Never store a key password or account password beside these identifiers.
CreateKey returns created and updated; it does not return a generated keyId.
Construct the request
The signed messages use colon separators with no whitespace:HTTP-Host is the exact value sent in the HTTP Host header, including a non-default port. Generate nonce from at least 32 cryptographically random bytes, encode it as Base64, and do not reuse it.
Referer. Use the same id in the signed message and JSON body. Store that submitted identifier with the account and Legal Identity that will use it. See Create key reference.