# Adding Keys and CSR source: https://developer.mastercard.com/mdes-pre-digitization/documentation/tutorial-and-guides/addkey/index.md 1. Login to Mastercard Developers. 2. Select your existing project. 3. Select the Production Credentials option from the left navigation bar. 4. Select Add Key ## 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/mdes-pre-digitization/documentation/tutorial-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/mdes-pre-digitization/documentation/tutorial-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/mdes-pre-digitization/documentation/tutorial-and-guides/images1/pre-diz-mastercard-encryption-key.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/mdes-pre-digitization/documentation/tutorial-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/mdes-pre-digitization/documentation/tutorial-and-guides/images/MA_Key_Download.png) 5. After successulf downlaod key file, it downloads the key information as follows: 1. P12 file for Masterard 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/mdes-pre-digitization/documentation/tutorial-and-guides/images1/pre-diz-mastercard-encryption-key.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/mdes-pre-digitization/documentation/tutorial-and-guides/images/select_client_encKey.png) 2. Select **Create Key** . ![Create Key](https://static.developer.mastercard.com/content/mdes-pre-digitization/documentation/tutorial-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/mdes-pre-digitization/documentation/tutorial-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/mdes-pre-digitization/documentation/tutorial-and-guides/images1/pre-diz-mastercard-encryption-key.png) Please share the fingerprint as part of encryption payload so Mastercard can identify coresponding key and is able to decrypt the sensitive data from the response.