Skip to main content

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:

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

Hardware-based keys are device-bound

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:

Use SECURE_ELEMENT as the storageType when generating keys with hardware storage.

Hardware-based keys are device-bound

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​

Key operations
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 the keyAlgorithm object of your configuration, written exactly as it appears there. For example, with this configuration, EDDSA and ECDSA are valid values:

    keyAlgorithm:
    EDDSA:
    display: "keyAlgorithm.eddsa"
    order: 0
    params: null
    holderPriority: 50
    ECDSA:
    display: "keyAlgorithm.ecdsa"
    order: 1
    params: null
    holderPriority: 100

    See the key algorithms reference for the algorithms Procivis One supports. To generate a CSR or use a key for a certificate, use ECDSA or EDDSA.

  • 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:

GoalPathGuide
Get a certificate signed by an external CAGenerate a CSR with the GENERIC or MDL profile, get it signed, then import the certificateImport a certificate
Get a CA certificate signed by an external CAGenerate a CSR with the CA profile, get it signed, then import the chainImport a CA certificate chain
Create a certificate signed by a CA in the systemReference the key and an existing CA identifier. No CSR is needed.Create a certificate using an internal CA
Create your own root CAReference 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 DIDCreate a DID identifierDIDs
Use the key directly as an identifierCreate a key identifierCreating a key identifier

Generating Certificate Signing Requests​

CSR operations

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:

ProfileUse for
GENERICCertificates for issuing and verifying credentials in most cases, including EUDI access certificates and signing certificates
MDLCertificates that sign ISO mDL (DocType: org.iso.18013.5.1.mDL)
CACertificate 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:

  1. Retrieve the credential format configuration

  2. Check for these capabilities:

  • "issuanceIdentifierTypes": "KEY"
  • "verificationIdentifierTypes": "KEY"

To create a key identifier:

  1. Create a key

  2. 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.