# Adding Keys and CSR
source: https://developer.mastercard.com/mdes-digital-enablement/documentation/tutorials/add-key/index.md

If you haven't added the project and encryption keys during project creation, you can follow the steps given below to add these keys.

## Add Sandbox Project Key - Using CSR {#add-sandbox-project-key---using-csr}

1. To add sandbox keys, navigate the project.
2. On the left navigation, click **Sandbox credentials**.
3. In the upper-right corner of the screen, click **Add Sandbox credentials** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/add-sandbox-credentail.png)
4. To add the consumer key, click **Add project key** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/add-sandbox-project-key.png)
5. Two methods are available when using a CSR. ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/use-existing-private-key.png)
   * **Uploading a CSR** - To upload a certificate signing request (CSR) generated in your system, select the **Use an existing private key** option.
     * Enter **Key alias** (A key alias is a label for specific key within a keystore.) and upload a **CSR File** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/sandbox-upload-csr-file.png)
     * Click **Create key**.
   * **Copying a CSR file** - To copy the CSR file, select the **Paste in a CSR file** option. ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/paste-in-csr-file.png)
     * Enter **Key alias** (A key alias is a label for specific key within a keystore.) and copy the **CSR File** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/create-key-existing-csr.png)
     * Click **Create key** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/tutorial-5/creating-project.png)
6. To Download the key information, click **Download key file**. The downloaded key file contains the Sandbox key information.
7. To return to the project dashboard, click **Open Project** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/sandbox-credentials.png)

## Add Sandbox Project Key - Using OAuth1.0 {#add-sandbox-project-key---using-oauth10}

1. To add sandbox credentials, in the upper-right corner of the screen, click **Add Sandbox credentials** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/add-sandbox-credentail.png)
2. Click **Add project key** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/add-sandbox-project-key.png)
3. If you are generating a new private key using OAuth1.0, select **Generate a new private key** from the list. ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/sandbox-new-private-key.png)
4. Enter **Key alias** and **Keystore password** . A key alias is a label for specific key within a keystore. Ensure that you make a note of the key alias and the keystore password as you will need this information when you send the API request to Mastercard. ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/create-project-sandbox-key.png)
5. Click **Create key** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/tutorial-5/creating-project.png)
6. To Download the key information, click **Download key file**. The downloaded key file contains the Sandbox key information.
7. To return to the project dashboard, click **Open Project** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/sandbox-credentials.png)

Note: It is the same process when you request for MTF project key.

## Add Client Encryption Key {#add-client-encryption-key}

Add the Client Encryption Key to provide sensitive data in the request to Mastercard that is required to be encrypted as per the specification. In the following example, we will add encryption keys for the MTF service. Similarly, you can add the encryption keys for the Production API.

1. Login to Mastercard Developers and select an existing project to add the key.
2. To add the MTF encryption key, on the left navigation, click **Production Credentials**.
3. Under API keys, for MDES Digital Enablemen MTF API, click **Add Key**.
4. Select the **Client Encryption Key** option and click **Proceed** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/select-client-enckey.png)
5. Click **Create Key** . The key creation process starts and completes in a few seconds. ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/create-new-client-encrp-key.png)
6. To download the key information, click **Download Key File** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/creating-key.png)
7. To return to the project dashboard, click **Open Project** . ![](https://static.developer.mastercard.com/content/mdes-digital-enablement/documentation/tutorials/addkeys/mdes-token-connect-client-key.png)

Share the fingerprint as part of the encryption payload, so Mastercard can identify the corresponding key and decrypt the sensitive data from the response.
