Keys
Keys are cryptographic key pairs used to create signatures and enable authentication in decentralized identity ecosystems. This page explains how keys work in Procivis One and how to use them.
Overview
Procivis One enables you to create asymmetric key pairs that can be used to:
- Authenticate between parties
- Generate Certificate Signing Requests (CSRs)
- Create DIDs (Decentralized Identifiers)
- Serve as direct identifiers for credential issuance (where supported)
Each key pair consists of a public key (visible through the API as
publicKey) and a private key (used for signatures, never exported or
visible).
Supported algorithms
For the complete list of supported key algorithms and their configuration values, see:
- Configuration reference
- Supported standards for links to cryptographic standards
Key storage
Keys can be stored in different locations depending on your deployment and security requirements.
Internal storage
An encrypted internal database solution suitable for evaluation and non-critical use cases. See the keyStorage reference for configuration details.
Azure Key Vault
A cloud-based solution backed by software and hardware-security modules (HSM). Keys stored in HSM-backed solutions offer enhanced security but cannot be exported or transferred.
Learn more: Azure Key Vault documentation
Keys stored in hardware security modules are cryptographically tied to their storage device and cannot be backed up or transferred. Credentials signed with hardware-based keys are bound to that device.
Mobile device storage
Software storage: Keys stored in the device's encrypted internal database can be backed up and transferred to another device.
Hardware storage: Mobile devices with supporting hardware can use chip-based storage for enhanced security:
- iOS: Secure Enclave
- Android: Keystore
Use SECURE_ELEMENT as the storageType when generating keys with
hardware storage.
Keys stored in device hardware cannot be exported or transferred. Credentials signed with hardware-based keys are bound to that device.
Remote Secure Element (RSE)
Available for Procivis One Wallet, RSE provides HSM-backed security with device portability. A secure link connects the mobile device to tamper-resistant hardware in a data center, where keys are stored. Users authenticate each key use with a PIN or biometrics.
Unlike other HSM solutions, RSE connections can be transferred to a new device, allowing you to change devices while retaining your keys.
Creating key pairs
POST /api/key/v1
{
"name": "My key",
"keyType": "EDDSA", // A key algorithm from your configuration
"keyParams": {}, // Required, but no parameters are currently supported
"storageType": "INTERNAL", // A key storage type from your configuration
"storageParams": {} // Required, but no parameters are currently supported
}
All fields are required.
-
keyType: the name of an entry in thekeyAlgorithmobject of your configuration, written exactly as it appears there. For example, with this configuration,EDDSAandECDSAare valid values:keyAlgorithm:EDDSA:display: "keyAlgorithm.eddsa"order: 0params: nullholderPriority: 50ECDSA:display: "keyAlgorithm.ecdsa"order: 1params: nullholderPriority: 100See the key algorithms reference for the algorithms Procivis One supports. To generate a CSR or use a key for a certificate, use
ECDSAorEDDSA. -
keyParams: send an empty object. -
storageType: the name of a key storage configured in your system. Available storage types depend on your deployment. See the key storage reference. -
storageParams: send an empty object.
The response contains the ID of the new key.
Using a key
What you do with a key depends on what you need to create:
| Goal | Path | Guide |
|---|---|---|
| Get a certificate signed by an external CA | Generate a CSR with the GENERIC or MDL profile, get it signed, then import the certificate | Import a certificate |
| Get a CA certificate signed by an external CA | Generate a CSR with the CA profile, get it signed, then import the chain | Import a CA certificate chain |
| Create a certificate signed by a CA in the system | Reference the key and an existing CA identifier. No CSR is needed. | Create a certificate using an internal CA |
| Create your own root CA | Reference the key. The system generates and self-signs the CA certificate. No CSR is needed. | Create a self-signed root CA |
| Use the key in a DID | Create a DID identifier | DIDs |
| Use the key directly as an identifier | Create a key identifier | Creating a key identifier |
Generating Certificate Signing Requests
Generate a certificate signing request (CSR) for a key. The key must use
ECDSA or EDDSA.
POST /api/key/v1/{id}/generate-csr
{
"profile": "GENERIC",
"subject": {
"commonName": "My Issuer"
}
}
Set profile according to the certificate you need:
| Profile | Use for |
|---|---|
GENERIC | Certificates for issuing and verifying credentials in most cases, including EUDI access certificates and signing certificates |
MDL | Certificates that sign ISO mDL (DocType: org.iso.18013.5.1.mDL) |
CA | Certificate authority certificates |
After you submit the CSR and received the signed certificate, see Using a key.
Creating a key identifier
Some credential formats support using keys directly as identifiers, without requiring a DID or certificate. To check if a credential format supports this:
Retrieve the credential format configuration
Check for these capabilities:
"issuanceIdentifierTypes": "KEY""verificationIdentifierTypes": "KEY"
To create a key identifier:
Create a key
Create an identifier referencing that key:
POST /api/identifier/v1
{
"key": {
"keyId": "{{KEY-ID}}"
},
"name": "My key identifier"
}
Editing key identifiers
You can change the key a key identifier uses:
PATCH /api/identifier/v1/{id}
{
"key": {
"keyId": "<NEW-KEY-ID>"
},
}
The new key replaces the old key in the identifier. Note that this is a breaking change for any credentials where the old key was used for holder binding.