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

# How to Manage SFTP Encryption Keys

> Generate, import, rotate and review the PGP keys for your encrypted SFTP folders on the SFTP page.

For how encryption works, encrypting and decrypting files, strict mode and generating a key pair, see [SFTP File Encryption](https://docs.mention-me.com/developer-docs/integration/sftp-encryption.md).

Dedicated keys are managed from the [Encryption keys tab on the SFTP page](https://mention-me.com/merchant/~/sftp/encryption-keys). Keys are split into an **Inbound keys** table and an **Outbound keys** table, with one row per scope (a folder, or **Default (all folders)**). Each row shows:

* **Public key** - a **Copy key** button for the scope's current public key.
* **Status** - **Active**, **Grace period** with its end date while an inbound rotation is running, or **No active key**.
* **Created** - when the current key was created, and by whom.

The fingerprint is not shown in the table. Use **Copy fingerprint** in the row's menu to copy it.

![Inbound keys table showing a folder-scoped key marked Active and the default
key showing a grace period end
date](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/inbound-table-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=358ca4952439367e22fa3bc6c7f67160)

The Inbound keys table, with one folder-scoped key active and the default key inside a rotation grace period.

Each row's **...** menu holds that scope's actions: **Rotate key**, **View key history** and **Copy fingerprint**, plus **End grace period early** while a grace period is running.

![Row actions menu open, listing Rotate key, View key history and Copy
fingerprint](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/key-menu-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=9200fc1883a6a9f0f355bcfa3150ef4b)

The actions available on a key's row.

Keys can be set at two levels:

* A **default key** covers every inbound (or outbound) folder that does not have its own key.
* A **dedicated key** applies to a single folder, so different data feeds can use different keys.

A folder's own key is always used before the default key.

> [!NOTE]
>
> It works the other way round from what you might expect: a folder has to be
> marked as encrypted *before* it can be given a key. Only encrypted folders
> that do not have a key yet appear in the folder picker when you generate or
> import one. Mark the folder as encrypted first (see&#x20;
> [SFTP Setup](https://docs.mention-me.com/knowledge/integrations/data-feeds/sftp-setup.md#add-your-folders)), then give it a
> key.

## Generate an inbound key

For files you send to Mention Me, generate a dedicated inbound key:

**1. Open Generate inbound key**

In the **Inbound keys** section, click **Generate inbound key**.

![Inbound keys section with no keys yet and the Generate inbound key button highlighted](https://mintcdn.com/mentionme/rXBw3H1uUJxdhyDt/images/knowledge/integrations/data-feeds/encryption/generate-inbound-key-button-v1.png?fit=max\&auto=format\&n=rXBw3H1uUJxdhyDt\&q=85\&s=7eff940716a499f22a69384e65acde69)

The Inbound keys section, before any keys have been generated.

**2. Choose the key's scope**

Turn on **Set as your default key** to cover every inbound folder without its own key, or leave it off and choose a folder. Then click **Generate key**. Mention Me generates a 4096-bit key pair, which can take up to 30 seconds, so keep the window open.

![Generate inbound encryption key panel with Set as your default key turned on and the Generate key button](https://mintcdn.com/mentionme/rXBw3H1uUJxdhyDt/images/knowledge/integrations/data-feeds/encryption/generate-inbound-key-form-v1.png?fit=max\&auto=format\&n=rXBw3H1uUJxdhyDt\&q=85\&s=cffad82f80874a4c34c0a15998afdb59)

Generating a default inbound key.

**3. Copy or download the public key**

Once the key is generated, click **Copy key to clipboard**, or **Download public key** to save it as an `.asc` file.

![Key generated confirmation with Copy key to clipboard and Download public key buttons](https://mintcdn.com/mentionme/rXBw3H1uUJxdhyDt/images/knowledge/integrations/data-feeds/encryption/generate-inbound-key-result-v1.png?fit=max\&auto=format\&n=rXBw3H1uUJxdhyDt\&q=85\&s=8dce79c2f35df83262b8a8705a77da71)

The generated key, ready to copy or download.

You can copy the public key again at any time with **Copy key** on the scope's row. Use **Copy fingerprint** in the row's menu if you need the fingerprint.

The private key is held securely by Mention Me and is never displayed or downloadable. Encrypt your uploads with the public key shown here (see [Inbound encryption](https://docs.mention-me.com/developer-docs/integration/sftp-encryption.md#inbound-encryption-you-to-mention-me)).

## Import an outbound key

For files Mention Me sends to you, import your own public key:

**1. Open Import outbound key**

In the **Outbound keys** section, click **Import outbound key**.

![Outbound keys section with no keys yet and the Import outbound key button highlighted](https://mintcdn.com/mentionme/rXBw3H1uUJxdhyDt/images/knowledge/integrations/data-feeds/encryption/import-outbound-key-button-v1.png?fit=max\&auto=format\&n=rXBw3H1uUJxdhyDt\&q=85\&s=3de7b9bf61bef780d9798fca881d81c4)

The Outbound keys section, before any keys have been imported.

**2. Choose the key's scope**

Turn on **Set as your default key** to cover every outbound folder without its own key, or leave it off and choose a folder.

**3. Paste your public key**

Paste your ASCII-armoured **public key** and click **Import key**. Only the public key is accepted. If you don't have a key pair yet, see [Generating a PGP key pair](https://docs.mention-me.com/developer-docs/integration/sftp-encryption.md#generating-a-pgp-key-pair).

Mention Me validates the key, then encrypts your outbound files with it so you can decrypt them with your private key.

Only ever share your public key. Never send anyone your private key.

> [!NOTE]
>
> Generate and import only create a scope's first key. Once your default key is
> set and every encrypted folder has its own key, **Generate inbound key** or
> **Import outbound key** is greyed out. Use **Rotate key** on the row to
> replace an existing key, or mark another folder as encrypted to add a key for
> it.

![Outbound keys table showing a single default key marked
Active](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/outbound-table-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=debc52d357fc05608f8132a95dc10cbc)

The Outbound keys table. Outbound keys never show a grace period, because delivery always uses the newest key.

## Key history

Every key a scope has ever had is kept. Use **View key history** on the scope's row to see them, newest first, with the status of each: **Active** for the live key, **Active until \[date]** for one inside a grace period, and **Expired \[date]** or **Inactive** for a retired one. Each key also shows when it was created and last modified.

Keys are never deleted, so the history stays a complete record of which key was valid when.

![Key history dialog listing three keys, one Active and two Expired with their
retirement
dates](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/key-history-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=0efd21a26c4cc26baa49e602e0228ba9)

Key history for a folder-scoped key, showing the live key above two retired ones.

## Rotate a key

Use **Rotate key** on a key's row to replace it. See [Rotating keys](https://docs.mention-me.com/developer-docs/integration/sftp-encryption.md#rotating-keys) for how inbound and outbound rotation behave.

![Rotate inbound key dialog with a 7 day grace period selected and a note
giving the date the current key
deactivates](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/inbound-key-rotation-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=2653df6537b9e977dd8435cf481485b8)

Choosing a grace period when rotating an inbound key. The dialog confirms the date the old key retires.

![Rotate outbound key dialog with a field for the new public key and a warning
to keep the old private
key](https://mintcdn.com/mentionme/1XGRKsNLnNvxblEq/images/knowledge/integrations/data-feeds/encryption/outbound-key-rotation-v1.png?fit=max\&auto=format\&n=1XGRKsNLnNvxblEq\&q=85\&s=09ccd5395c5cb19eee6fe17fa18a624b)

Rotating an outbound key. You supply the new public key, and delivery switches to it immediately.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.