> ## Documentation Index
> Fetch the complete documentation index at: https://docs.futurex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an application partition for Microsoft SignTool

> Create an application partition to isolate Microsoft SignTool keys and permissions on the HSM.

To segregate applications on the HSM, you must create an application partition specifically for your use case. Application partitions segment the permissions and keys between applications on an HSM.

Choose one of the following methods to create an application partition:

## Excrypt Manager

Perform the following steps to create a partition in Excrypt Manager:

**Step 1**

Go to the **Application** **Partitions** menu and select **\[ Add ]**.

**Step 2**

In the **Basic** **Information** tab, configure all of the fields as follows:

<table>
  <thead>
    <tr>
      <th>***Option***</th>
      <th>***Required configuration***</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**Role Name**</td>
      <td>Specify any name that you would like for this new application partition.</td>
    </tr>

    <tr>
      <td>\*\*Logins Required \*\*</td>
      <td>Set to **1**\[!NOTE] If the HSM is in FIPS mode, you must set Logins Required to 2.\\</td>
    </tr>

    <tr>
      <td>**Ports**</td>
      <td>Set to **Prod.**</td>
    </tr>

    <tr>
      <td>**Connection Sources**</td>
      <td>Set to **Ethernet**.</td>
    </tr>

    <tr>
      <td>**Managed Roles**</td>
      <td>Leave blank because you specify the exact **Permissions**, **Key Slots**, and **Commands** for this application partition or role to have access to.</td>
    </tr>

    <tr>
      <td>**Use Dual Factor**</td>
      <td>Set to **Never**.</td>
    </tr>

    <tr>
      <td>**Upgrade Permissions**</td>
      <td>Leave unchecked.</td>
    </tr>
  </tbody>
</table>

**Step 3**

In the **Permissions** tab, select the following **key** permissions:

<table>
  <thead>
    <tr>
      <th>***Permission***</th>
      <th>***Description***</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**Keys**</td>
      <td>Top-level permission</td>
    </tr>

    <tr>
      <td>**Authorized**</td>
      <td>Allows for keys that require login</td>
    </tr>

    <tr>
      <td>**Import** **PKI** </td>
      <td>Allows trusting an external PKI. Generally not recommended, but some applications use this option for PKI symmetric key wrapping.</td>
    </tr>

    <tr>
      <td>**No** **Usage** **Wrap** </td>
      <td>Enables interoperable key wrapping without defining key usage as part of the wrapped key. Use this only if you want to exchange keys with external entities or use the HSM to wrap externally used keys.</td>
    </tr>
  </tbody>
</table>

**Step 4**

In the **Key** **Slots** tab, we recommend you create a range of 1000 total keys that do not overlap with another application partition. Within the specified range, you should have ranges for both symmetric and asymmetric keys. If the application requires more keys, configure it accordingly.

**Step 5**

To use the HSM functionality, you must enable particular functions on the application partition based on application requirements. Enable the following commands under **Commands**:

**CNG communication commands**:

<table>
  <thead>
    <tr>
      <th>***Command***</th>
      <th>***Description***</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**ECHO**</td>
      <td>Communication Test/Retrieve Version</td>
    </tr>

    <tr>
      <td>**HASH**</td>
      <td>Retrieve device serial</td>
    </tr>

    <tr>
      <td>**GPKM**</td>
      <td>Retrieve key table information</td>
    </tr>
  </tbody>
</table>

**Key operations commands**:

<table>
  <thead>
    <tr>
      <th>***Command***</th>
      <th>***Description***</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**RPFP**</td>
      <td>Get public components from RSA private key</td>
    </tr>

    <tr>
      <td>**APFP**</td>
      <td>Generate PKI Public Key from Private Key</td>
    </tr>
  </tbody>
</table>

**Signing Commands**:

<table>
  <thead>
    <tr>
      <th>***Command***</th>
      <th>***Description***</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>**RSAS**</td>
      <td>Generate a Signature Using a RSA Private Key</td>
    </tr>

    <tr>
      <td>**ASYS**</td>
      <td>Generate a signature using PKI private key</td>
    </tr>
  </tbody>
</table>

## FXCLI

Run the following **role** FXCLI commands to create the new application partition and enable all needed functions:

```shell title="FXCLI" expandable lines wrap theme={null}
  role add --name Role_Name --application --key-range (0,999) --perm "Keys:Authorized" --perm "Keys:Import PKI" --perm "Keys:No Usage Wrap"
```

```shell title="FXCLI" expandable lines wrap theme={null}
  role modify --name [role_name] --add-perm Excrypt:ECHO --add-perm Excrypt:HASH --add-perm Excrypt:GPKM --add-perm Excrypt:RPFP --add-perm Excrypt:APFP --add-perm Excrypt:RSAS --add-perm Excrypt:ASYS
```
