Skip to main content

Overview

Allows the client to get the current server public key, or the public key of one of its own cryptographic keys. The client can use this key to validate signatures server in relation to legal identities, smart contracts, tokens, etc. Note: If a Key ID is provided, information about one of the keys of the client account is returned. If not Key ID is provided, information about the the public server key is returned. Note 2: If no Key ID is provided, resource requires no authentication. If a Key ID is provided, a Bearer token identifying the client account must be provided.

HTTP request

POST /Agent/Crypto/GetPublicKey

Authentication

Requires a valid JWT bearer token.

Request (JSON)

{
	"keyId": Optional(Str(PKeyId))
}

Input parameters

ParameterDescription
PKeyIdOptional Key ID. If not provided, the server public key is returned. If provided, the public key of the corresponding cryptographic key of the client is returned.

Response (JSON)

{
	"key": Required(Str(PKey)),
	"Algorithm": 
	{
		"localName":Required(Str(PLocalName)),
		"namespace":Required(Str(PNamespace)),
		"securityStrength":Required(Int(PSecurityStrength)),
		"safe":Required(Boolean(PSafe)),
		"slow":Required(Boolean(PSlow)),
		"pqc":Required(Boolean(PPqc)),
		"score":Required(Int(PScore))
	}
}

Response parameters

ParameterDescription
PKeyBase64-encoded public key of the server.
PLocalNameLocal Name of the algorithm.
PNamespaceNamespace, defining the algorithm.
PSecurityStrengthSecurity strength of algorithm (in bits).
PSafeIf the algorithm is considered safe according to https://safecurves.cr.yp.to/.
PSlowIf the algorithm is slow (i.e. computation intensive).
PPqcIf the algorithm represents Post Quantum Cryptography (PQC).
PScoreAlgorithm score. Can be used, together with PSecurityStrength to order algorithms.

Notes

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