# Manage Key Profiles

When creating certificates, key profiles are used to specify details such as key length, encryption algorithms, and other cryptographic parameters. emCA has options such as High-Security Module (HSM) and Public-Key Cryptography Standards #12 (PKCS12) profiles that can be applied to ensure that the generated certificates meet specific security standards and are compatible with the cryptographic infrastructure in place.

The term "Key Profiles" is defined by emCA, which can be accessed through the sub-menu Key Profiles.

When "Key Profiles" is selected, the dialog page for managing key profiles will open.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FnXYSVnbWmTH8V8XZ0Rke%2Fimage.png?alt=media&#x26;token=c9d264e3-0944-4dd3-840b-96f7578a9fe0" alt=""><figcaption></figcaption></figure>

The Administrator can choose from the following actions to administer Key profiles:

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2F3CvX3qI6O5uwjUjOAwj9%2Fimage.png?alt=media&#x26;token=a4ecb610-e01a-4b24-ac6e-059549517a62" alt=""><figcaption></figcaption></figure>

You can use the "Manage Key Profile" feature to create profiles for HSM and PKCS12.

A Key profile can describe either the PKCS11 information needed to connect to an HSM or the PKCS12 information required to generate private keys into PKCS12 key stores.

**Create a Key Profile for HSM**

Click on + New Profile to open the Key Profile Edit Dialog.

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2FckKT7Nwo8dJG7tHpdm39%2Fimage.png?alt=media&#x26;token=a58857ff-ee2f-4e27-aa9d-e48ba6f36a60" alt=""><figcaption></figcaption></figure>

Select Profile Type HSM for the following dialog:

<figure><img src="https://2804668976-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOwstGDJbR4yGRTr2aEFp%2Fuploads%2F4uRiRC9sfsEXQSvaBFqc%2Fimage.png?alt=media&#x26;token=d39b5580-8305-47a9-84b5-3f5c1f247b8a" alt=""><figcaption></figcaption></figure>

Please enter a unique name for the new key profile in the "Profile Name" field.

For Configuration Type  Choose

* Upload           – to upload a PKCS11 configuration file.
* Text Area       – to open a text area for manual creation of a PKCS11 configuration file

To upload the PKCS11 configuration file from your system, simply click on the "Choose file" button.

Insert the PKCS11 configuration and password for HSM communication.

To ensure that your credentials and configuration are correct, please click on the "Test connection" button.

If the connection is successful, you will be prompted to "authenticate" with your Administrator token. After authentication, click "Confirm" to "save" the key profile.

Similarly, the user has the ability to create a key profile for PKCS 12.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://emca.emudhra.com/previous-release-versions/v4.2.2/user-manual/administrator/manage-profiles/manage-key-profiles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
