> For the complete documentation index, see [llms.txt](https://ispectra.gitbook.io/mutamad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ispectra.gitbook.io/mutamad/reference/projects/mutamad_crypto.md). Agents can also search and read this documentation through its [MCP server](https://ispectra.gitbook.io/mutamad/~gitbook/mcp).

# Mutamad Crypto

Encryption, key management and multi-factor authentication for Mutamad, with keys held outside the database and the web root.

{% hint style="info" %}
**Machine name:** `mutamad_crypto` · **Type:** General project · **In Mutamad:** Applied on every Mutamad site
{% endhint %}

Cryptography, key management and multi-factor authentication for Mutamad:

* authenticated AES-256 encryption (Real AES), with keys held outside the database and the web root
* multi-factor authentication with an authenticator app and recovery codes, whose secrets those keys protect

No key, salt or credential is shipped: each site generates its own. Aligned to NCA ECC-2:2024 2-2-3-2 and 2-8 (cryptography).

<figure><img src="https://171036656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQSekKpxOCXC1q6G2NRy9%2Fuploads%2Fgit-blob-4b7295a78f3cd64f359d8f4d00f0c5ba685f5691%2Ftfa-en.jpg?alt=media" alt="Two-factor authentication: an authenticator app and recovery codes."><figcaption><p>Two-factor authentication: an authenticator app and recovery codes.</p></figcaption></figure>

## Requirements

* Drupal 11.4
* [Encrypt](https://www.drupal.org/project/encrypt)
* [Key](https://www.drupal.org/project/key)
* [Real AES](https://www.drupal.org/project/real_aes)
* [Two-factor Authentication (TFA)](https://www.drupal.org/project/tfa)
* a private file path and its key file

## Installation

Mutamad is in alpha. A site started from the [Mutamad project template](https://www.drupal.org/project/mutamad_project) is ready for it; on any other Drupal 11.4 site, allow alpha releases first:

```bash
composer config minimum-stability alpha
composer config prefer-stable true
```

Set a private file path in `settings.php` first, outside the web root: `$settings['file_private_path'] = '../private';`

Then create the key file: see "Keys are not configuration" in [Mutamad Crypto](https://www.drupal.org/project/mutamad_crypto)'s README.

```bash
composer require drupal/mutamad_crypto
drush recipe ../recipes/mutamad_crypto
```

## Links

* [Project page on drupal.org](https://www.drupal.org/project/mutamad_crypto)
* [README](https://git.drupalcode.org/project/mutamad_crypto/-/blob/1.0.x/README.md): every setting, and why
* [Changelog](https://git.drupalcode.org/project/mutamad_crypto/-/blob/1.0.x/CHANGELOG.md)
* [Issue queue](https://www.drupal.org/project/issues/mutamad_crypto)
