# Adding Keys and CSR
source: https://developer.mastercard.com/authentication-facilitator/documentation/tutorials-and-guides/addkey/index.md

1. Login to Mastercard Developers.
2. Select your existing project.
3. Select **Production Credentials** option from the left bar.
4. Select **Add Key** for Authentication Facilitator MTF or Authentication Facilitator API.

## Add Mastercard Encryption Key {#add-mastercard-encryption-key}

1. Select **Mastercard Encryption Key** from the list, this key is used to decrypt the sensitive data encrypted by Mastercard in the payload sent by Mastercard. ![KEY Type Selection](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/key_selection_MA_Key.png)

#### Option 1: Use your existing private key {#option-1-use-your-existing-private-key}

1. If you want to use your existing private key (generated and managed by you), then select option **Use an existing private key** or **Paste in a CSR file** . ![Use Existing Key](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/existing_private_key.png)
2. Please provide key alias and upload/paste CSR file and Select Create Key
3. After signing and storing certificate, will be redirected to project credential page; where you can see Mastercard Encryption Key has been added. ![Key Success](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/MA_Key_Success.png)

#### Option 2: Generate a new private key {#option-2-generate-a-new-private-key}

1. Please select **Generate a new private key** option.
2. Provide **Key alias** and **Keystore password** and click **Proceed** . ![Generate New Key](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/RequestProdAccess_MTF_ProjectCredentials.png)
3. Key creation process starts and completes in a few seconds.
4. Download key information by clicking **Download Key File** . ![Download Keys](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/MA_Key_Download.png)
5. After successful download key file, it downloads the key information as follows:
   1. P12 file for Mastercard encryption key - Issuer will use this to decrypt encrypted (encrypted by Mastercard) data that receives in the request.
6. By selecting **Open Project** , you will be redirected to the project credential page; where you can see Mastercard Encryption Key has been added.  
   ![Key Success](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/MA_Key_Success.png)

Please map the key fingerprint with private key, so you can use correct key to decrypt sensitive data from the request.

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

Please add Client Encryption Key if you decide to provide sensitive data in the response that is required to be encrypted as per the specification.

1. Select **Client Encryption Key** from the list. This key is used to decrypt sensitive data from the request. ![KEY Type Selection](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/select_client_encKey.png)
2. Select **Create Key** . ![Create Key](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/create_client_encKey.png)
3. Key Creation process starts and completes in few seconds.
4. Download key information by clicking **Download Key File** . ![Download Keys](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/save_client_EncKey.png)
5. By selecting **Open Project** , will be redirected to project credential page; where you can see Client Encryption Key has been added.  
   ![Key Success](https://static.developer.mastercard.com/content/authentication-facilitator/documentation/tutorials-and-guides/images/view_clinet_encKey.png)

Please share the fingerprint as part of encryption payload so Mastercard can identify corresponding key and is able to decrypt the sensitive data from the response.
