/Crypto/GetAlgorithms

Allows the client to retrieve a list of available cryptographic algorithms on the server. These algorithms can be used to create keys. These keys are necessary in order to apply for legal identities, which are then used to sign smart contracts.

JSON

Request
{
}
Response (if successful)
{
	"Algorithms": 
	{
		"localName":Required(Str(PLocalName)),
		"namespace":Required(Str(PNamespace)),
		"securityStrength":Required(Int(PSecurityStrength)),
		"safe":Required(Boolean(PSafe)),
		"slow":Required(Boolean(PSlow)),
		"score":Required(Int(PScore))
	}?[]
}

XML

Request
<GetAlgorithms xmlns="https://waher.se/Schema/BrokerAgent.xsd" />
Response (if successful)
<AlgorithmsResult xmlns="https://waher.se/Schema/BrokerAgent.xsd">
	<Algorithms>
		<[
		<Algorithm localName=(Required(Str(PLocalName)))
		           namespace=(Required(Str(PNamespace)))
		           securityStrength=(Required(Int(PSecurityStrength)))
		           safe=(Required(Boolean(PSafe)))
		           slow=(Required(Boolean(PSlow)))
		           score=(Required(Int(PScore))) />?[]
		]>
	</Algorithms>
</AlgorithmsResult>

Response Parameters

Parameter Description
PLocalName Local Name of the algorithm.
PNamespace Namespace, defining the algorithm.
PSecurityStrength Security strength of algorithm (in bits).
PSafe If the algorithm is considered safe according to https://safecurves.cr.yp.to/.
PSlow If the algorithm is slow (i.e. computation intensive).
PScore Algorithm score. Can be used, together with PSecurityStrength to order algorithms.

Javascript Library

Use the following asynchronous method in the Javascript Library, to call this resource.

var Response = await AgentAPI.Crypto.GetAlgorithms();
Test

Request Payload:

   

Response Payload: