Skip to main content

Overview

Allows the client to create a cryptographic key on the server, and protect it with a password. The key will be stored encrypted on the server, protected with the key password. The creation of a key will require the user to provide the account password again.

HTTP request

POST /Agent/Crypto/CreateKey

Authentication

Requires a valid JWT bearer token.

Request (JSON)

{
	"localName": Required(Str(PLocalName)),
	"namespace": Required(Str(PNamespace)),
	"id": Required(Str(PId)),
	"nonce": Required(Str(PNonce)),
	"keySignature": Required(Str(PKeySignature)),
	"requestSignature": Required(Str(PRequestSignature))
}

Input parameters

ParameterDescription
PLocalNameLocal Name of the algorithm to use for the new key.
PNamespaceNamespace, defining the algorithm.
PIdID of the key. The ID must be unique, for the current account. Different accounts can have keys with the same ID.
PNonceA unique random string, at least 32 characters long, with sufficient entropy to not be reused again. If reused, an error will be returned.
PKeySignatureCryptographic signature of the key ID, using the key password. (Password is not stored with the key, instead this signature will be the base for the cryptographic key used to encrypt the key on the server.
PRequestSignatureCryptographic signature of the requesut, using the account password.

Response (JSON)

{
	"created": Required(DateTime(PCreated)),
	"updated": Required(DateTime(PUpdated))
}

Response parameters

ParameterDescription
PCreatedWhen the information record was first created.
PUpdatedWhen the information record was last updated.

Notes

This endpoint uses the request schema notation described in Pattern matching.