# Adding Keys and CSR
source: https://developer.mastercard.com/mdes-customer-service/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 Production Project Key - Using CSR {#add-production-project-key---using-csr}

1. To add production keys, navigate the project.
2. On the left navigation, click **Production credentials**.
3. In the upper-right corner of the screen, click **Add Production credentials** . ![Add Production credentials alert](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/csmissingprodcreds.png)
4. To add the consumer key, click **Add project key** . ![Add Production project key screen](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/add_proj_key_new.png)
5. Two methods are available when using a CSR. ![Set private key selection screen](https://static.developer.mastercard.com/content/mdes-customer-service/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** . ![Upload CSR file for private key](https://static.developer.mastercard.com/content/mdes-customer-service/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. ![Set private key selection screen](https://static.developer.mastercard.com/content/mdes-customer-service/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** . ![Paste in CSR content as private key](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/create-key-existing-csr.png)
     * Click **Create key** . ![Create project loading icons and download key button](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/tutorial-5/creating-project.png)
6. To Download the key information, click **Download key file**. The downloaded key file contains the Production key information.
7. To return to the project dashboard, click **Open Project** . ![Production consumer key shown on Production credentials screen](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/prod_cred_new.png)

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

1. To add production credentials, in the upper-right corner of the screen, click **Add Production credentials** . ![Add Production credentials alert](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/csmissingprodcreds.png)
2. Click **Add project key** . ![Add Production project key screen](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/add_proj_key_new.png)
3. If you are generating a new private key using OAuth1.0, select **Generate a new private key** from the list. ![Set private key selection screen](https://static.developer.mastercard.com/content/mdes-customer-service/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. ![Generate CSR file for private key](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/create-project-sandbox-key.png)
5. Click **Create key** . ![Create project loading icons and download key button](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/tutorial-5/creating-project.png)
6. To Download the key information, click **Download key file**. The downloaded key file contains the Production key information.
7. To return to the project dashboard, click **Open Project** . ![Production consumer key shown on Production credentials screen](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/prod_cred_new.png)

Note: It is the same process when you request for Sandbox 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 Sandbox API. 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 encryption key, on the left navigation, click **Sandbox Credentials**.
3. Under API keys, for MDES Customer Service API, click **Add Key**.
4. Select the **Client Encryption Key** option and click **Proceed** . ![Add client encryption key modal](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/select-client-enckey.png)
5. Click **Create Key** . The key creation process starts and completes in a few seconds. ![Add client encryption key confirmation step](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/create-new-client-encrp-key.png)
6. To download the key information, click **Download Key File** . ![Generate and download client encryption key](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/creating-key.png)
7. To return to the project dashboard, click **Open Project** . ![Client encryption key shown on credentials screen](https://static.developer.mastercard.com/content/mdes-customer-service/documentation/tutorials/addkeys/csaddkeys.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.
