# FIPS mode

CrushMFT 27 can run in **FIPS 140-3 mode**. Started that way, it does all of its cryptography with a validated cryptographic module and refuses what that module and the standards behind it do not allow. This page says what FIPS mode is, how to turn it on, how to see that it is on, and what it changes. Every single item it turns off, limits or sets has a heading of its own on [What FIPS mode changes](FIPS-Mode-Changes.md).

[[toc]]

## What FIPS mode is

FIPS 140-3 is the US and Canadian standard for cryptographic modules. It validates **modules**, not products. So the sentence that is true for CrushMFT is:

> With the FIPS launch parameter, CrushMFT 27 performs its cryptography with Bouncy Castle FIPS Java (BC-FJA) 2.1.1, FIPS 140-3 certificate #4943, operating in approved mode.

**CrushMFT itself is not a validated module**, and it is not "FIPS certified". What FIPS mode gives you is that every key, hash, signature, cipher and TLS connection of the server goes to that validated module, in its approved-only mode, and that nothing falls back to Java's own cryptography.

- The module: [NIST certificate #4943](https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4943), BC-FJA 2.1.1, FIPS 140-3.
- It comes as a **FIPS pack**, the download of FIPS extras: the unmodified jars of the module (`bc-fips-2.1.1.jar`), its utilities (`bcutil-fips-2.1.8.jar`) and its TLS provider (`bctls-fips-2.1.25.jar`), and `CrushFipsBc.jar`, CrushMFT's bridge to them. The pack is not part of the normal download (`CrushMFT27.zip`), and CrushMFT is never built against it.
- CrushMFT knows each jar of the pack by its SHA-256 and the module also by the checksum the module reports about itself at start. A missing or changed jar, another version of one, or two versions side by side stop the server before it does anything else.
- FIPS 140-2 is not offered: every 140-2 certificate became historical in September 2026, and the 140-2 version of this module does not run on the Java CrushMFT 27 needs.

## What you need first

### Java

CrushMFT 27 needs **Java 25** or later. Here is the position, so that you hear it from us first:

- Certificate #4943 lists the Java versions the module was tested on: **8, 11, 17 and 21**. The module's security policy adds a table of environments the vendor affirms, again with Java 8, 11, 17 and 21. **Java 25 is in neither.**
- The policy says the module stays compliant on a compatible platform as long as its code is not changed, and that the certificate makes no statement about platforms it does not list.
- The module's maker says the 2.1 line supports Java 8 and later. We ran the module, unmodified, on Java 25 and Java 27: it comes up in approved-only mode, its self-tests pass, and it gave the same answer to every test on both.
- So: on Java 25 and later the module is unmodified and supported by its maker, but **Java 25 is not listed** on its certificate. Many buyers accept that; an auditor who requires a listed Java version will not, today.
- CrushMFT says so wherever it reports FIPS mode: "Java 25: not listed on the module's certificate (listed: 8, 11, 17, 21)". When a later revision of the certificate lists Java 25, that line changes with a CrushMFT update and nothing else does.

### The operating system's own FIPS mode

Operating systems have a FIPS mode of their own: RHEL `fips-mode-setup --enable`, Ubuntu Pro `pro enable fips-updates`, and on Windows the security policy "System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing".

- It does nothing for a Java program by itself. CrushMFT's FIPS mode does not need it and does not depend on it.
- Some auditors ask for it. CrushMFT shows its state in the status block (Linux: `/proc/sys/crypto/fips_enabled`; Windows: the policy above).
- The module takes its seed from the operating system's random source, through Java's native generator (`NativePRNGBlocking`; on Windows, `Windows-PRNG`). On a virtual machine, give the guest a random source (for example a virtio-rng device), as for any server that makes keys.

### The pack

The FIPS pack is a separate download beside CrushMFT 27, the FIPS extras [CrushMFT27_FIPS.zip](https://www.crushftp.com/early27/CrushMFT27_FIPS.zip). Unzip it in the server's folder, the one that holds `CrushMFT.jar`:

```bash
unzip CrushMFT27_FIPS.zip -d /var/opt/CrushMFT27
```

(on Windows and macOS, extract it into the CrushMFT 27 folder). Its four jars go **straight into `plugins/lib/`**, the folder for jars you add, beside anything you put there yourself (a JDBC driver, for example). Beside `CrushMFT.jar` it leaves `CrushMFT27_FIPS_README.txt` and `CrushMFT27_FIPS_SHA256SUMS.txt`, the SHA-256 of each jar (`sha256sum -c CrushMFT27_FIPS_SHA256SUMS.txt` in that folder checks them).

- Change, rename or remove none of the four jars, and keep no other version of them beside them: FIPS mode starts only with the exact jars it knows.
- In FIPS mode, `plugins/lib/` and `plugins/` may hold **no other Bouncy Castle jar** (`bcprov`, `bcpkix` and the like, or a jar that bundles them, such as some database drivers): crypto through them would not be the module's, so the server does not start while one is there, and `-FIPS_CHECK` names each one.
- A server started without the launch parameter never loads the four jars: it runs as if they were not there. CrushMFT's updater never replaces or removes them: a new pack is a new download, with a new CrushMFT version when the module's certificate changes.
- A pack unzipped by a test build before November 2026 made a folder `plugins/lib/fips/`. That folder is not used: the jars go straight into `plugins/lib/`, and the server's reason for not starting says so.
- The server loads the pack's jars itself, only in FIPS mode. Leave them off any class path you give Java yourself (a `-cp` naming `plugins/lib/*`), and keep the preference "allow unsigned plugins" off while they are in `plugins/lib/` (and do not start with `-UNSIGNED`): each of these puts them on CrushMFT's class path, where FIPS mode does not start (exit code 78, "Bouncy Castle classes are already on CrushMFT's class path") and a server without the parameter loads the module as one more provider.

## Turning it on

> [!IMPORTANT]
> FIPS mode is **not a setting**. Nothing in CrushMFT, no preference, page, command or API call, can turn it on, turn it off or weaken it. It is a launch parameter, read once when the program starts.

1. **Stop the server.**
2. **Unzip the FIPS extras** (`CrushMFT27_FIPS.zip`) in the server's folder: the four jars go straight into `plugins/lib/`.
3. **Check** what FIPS mode would refuse on this server: `java -jar CrushMFT.jar -FIPS_CHECK` in the server's folder (next section).
4. **Prepare** what has to be converted once: `java -jar CrushMFT.jar -FIPS_PREPARE`.
5. **Fix** the blockers the check still names (a user with an old password form, a partner's RSA PGP key, a Radius plugin, ...), and run the check again until it reports no blocker.
6. **Add the launch parameter** `-Dcrushmft.fips=true` where your server is started, and start it.

| How the server is started | Where the parameter goes |
|---|---|
| Linux and BSD, `crushmft_init.sh` (and the service it installs) | `JAVA_OPTS` at the top of the script |
| The Windows service | `java_params=` in `service\CrushMFTService.conf` |
| The Windows program (`CrushMFT.exe`), the macOS app and its daemon | `java_params=` in `CrushMFT.conf` |
| By hand | `java -Dcrushmft.fips=true -jar CrushMFT.jar -d` |
| Docker, Kubernetes | see [Docker and Helm](#docker-and-helm) |

- Only `true` turns it on. Without the parameter, or with `false`, the server runs as always. Any other value (a typo) does not start the server, so that a server meant to run in FIPS mode never runs without it.
- If FIPS mode can not start (no pack, a changed jar, another version of one, another Bouncy Castle jar in `plugins/lib/` or `plugins/`, a module that does not come up in approved mode), the program says why on its error output and ends with **exit code 78**. It never goes on with Java's own cryptography, and **nothing of CrushMFT starts it again** until you fix the reason and start it yourself:
  - `crushmft_init.sh start` prints Java's reason and ends with 78. The systemd service it installs runs Java as its own process and does not restart it on 78; the reason is in `journalctl -u crushmft`. (A service installed by an earlier version keeps its old settings until `crushmft_init.sh uninstall` and `install`.)
  - The Windows service writes the reason into its log and into the Application event log, and stops without an error code, so that Windows' recovery does not start it every minute. `CrushMFT.exe` shows the reason in a message.
  - The macOS app shows the reason in an alert; its daemon writes it to `CrushMFT_launcher.log` in the CrushMFT folder.
  - A job engine or runner that can not start FIPS mode is not started again by the server; the server's log says why.
  - Containers: see [Docker and Helm](#docker-and-helm).
- Every program CrushMFT starts for itself (its job engine and runners, an orchestrator) gets the same launch parameter, so a child can never differ from its parent.
- FIPS mode **never rewrites your settings**. A setting it can not honour is overridden while it runs, and the admin pages show it locked with the value in force. Start without the parameter and every setting is as you left it.

## The check and the preparation

Both are run from the command line, in the server's folder, **without** the launch parameter: they read what FIPS mode itself does not read.

### -FIPS_CHECK: the readiness report

```bash
java -jar CrushMFT.jar -FIPS_CHECK
java -jar CrushMFT.jar -FIPS_CHECK json
```

It reads this folder's files (the preferences, users, their folders, jobs, key stores, keys) and **changes nothing**. It names every item of [What FIPS mode changes](FIPS-Mode-Changes.md) this server would meet, each by its catalog id, with what it found and where (the file, the user, the port, the job, the key store, the plugin), and what to use instead:

- **Start**: whether the pack is the one FIPS mode knows, the Java version against the certificate's list, the operating system's FIPS flag, the parameter in your launch files.
- **Blockers**: the server would not start, or something in use would be refused. Fix these first; most of them `-FIPS_PREPARE` fixes.
- **Notices**: works in FIPS mode, differently (a setting overridden, a port without encryption).
- **Not judged from files**: items that are decided by the other side, when it connects (which partner sends AS2 v1, which mail server offers which login), each with why.
- **Always**: what every server in FIPS mode meets (the TLS suites, the extended master secret, how new keys are made).

`json` gives the same report for a tool. The exit code is **0** when there is no blocker, **1** with blockers, **2** when the check could not run.

### -FIPS_PREPARE: the conversions

```bash
java -jar CrushMFT.jar -FIPS_PREPARE
```

Run it once with the server stopped. It does what has to be converted, and changes only one setting:

- **The server's own key for stored secrets.** FIPS mode stores a password or other secret only under a key of this server's own. When the server has none, it makes the key file `secret.key` and sets `at_rest_key_mode` to `keyfile`: the one setting it changes. Back that file up apart from the preferences. If your key is under a passphrase, give it in the environment variable `CRUSHFTP_SECRETS_PASSPHRASE` or at the prompt.
- **Stored secrets in the old DES form** in the preferences, the DMZ preferences, every user, every user's folder items and every job are sealed again under that key. If the server asks for an old encryption password at its start, give it in `CRUSHFTP_ENCRYPTION_PASSWORD` or at the prompt. Each file it changes is copied first into `fips/prepare-backup-<time>/`; delete that folder once FIPS mode works, because it holds the old secrets. Users kept in a database are not converted: set their reversible passwords again.
- **A BCFKS copy beside every JKS and PKCS#12 key store** the server uses: the SSL settings, each port, the registered key stores and their client trust stores, the DMZ's ports, AS2 stations and partners, the AS2, CMS, MQ, Kafka and JMS tasks, the LetsEncrypt and SAML plugins, and the client certificates of folder items. `X.bcfks` beside `X.jks`, `X.p12` or `X.pfx`, under the same passwords. FIPS mode reads the copy; your settings still name the original.
- **A certificate of this server's own** where the settings say `builtin`: a self-signed RSA 3072 certificate in `fips/builtin.bcfks`, which FIPS mode serves in place of the built-in one. Browsers warn about it as about any self-signed certificate: import one from a CA when you can.
- **The public key of each OpenID Connect issuer key** made by an earlier version on elliptic curves: such a key was stored without its public point, which FIPS mode does not work out with CrushMFT's own code. The command stores it in the key file (the private key stays as it was; the file as it was is copied into `fips/prepare-backup-<time>/` first). Keys made by CrushMFT 27 now carry it already.

What it can not do it reports as a blocker: a key store password under 14 characters (give the store a longer one, then run it again), a key store at a URL (put a BCFKS copy beside it by hand), a value that looks like an old secret and does not open. Its exit code is **0** done, **1** with blockers, **2** could not run.

## The launch properties

Besides `-Dcrushmft.fips=true`, one launch property makes FIPS mode stricter. Like the parameter, it is not a setting, and child programs get it too.

| Property | What it does |
|---|---|
| `-Dcrushmft.fips.tls12only=true` | TLS 1.2 only, on every port, every outgoing connection and the links between cluster servers. For an auditor who reads the module's security policy strictly: it names its AES-GCM rule for TLS 1.2, and FIPS mode otherwise offers TLS 1.3 as the module's own TLS provider does. |

Nothing gives back what FIPS mode leaves out. SSH offers HMAC with SHA-256 and SHA-512 only, and no property brings `hmac-sha1` back. A `-Dcrushmft.fips.` property that FIPS mode does not have changes nothing: the log's **FIPS ignored** line names it, and child programs are not given it.

## The preferences

FIPS mode has two settings of its own, side by side on **Preferences, Encryption, Password**. They show only on a server in FIPS mode; without the launch parameter they do nothing and no page shows them. A change takes effect at once, without a restart.

### Messages partners wrapped with RSA PKCS#1 v1.5

**Read what partners wrapped with RSA PKCS#1 v1.5** (`fips_allow_rsa_pkcs1_v15_receive`):

- **Off (the default)**: what a partner wrapped with RSA PKCS#1 v1.5 is refused, with the reason and the partner or key named: a PGP message encrypted to an RSA key of yours, an AS2 message or a CMS file whose content key was wrapped that way, a SAML assertion the identity provider encrypted that way. NIST's SP 800-131A disallows RSA PKCS#1 v1.5 key transport since 2023, and its strict reading refuses receiving it too.
- **On**: those are read. The validated module still decrypts them, and the four items of [What FIPS mode changes](FIPS-Mode-Changes.md) become notices. Use it while your partners move to keys on a NIST curve (PGP) or to RSA-OAEP (AS2, CMS, SAML).
- Sending with RSA PKCS#1 v1.5 stays refused either way: the module will not do it.
- A change takes effect at once, without a restart, on the server and its job engines. `-FIPS_CHECK` reads the stored value: with it off, a PGP key of yours on RSA that partners encrypt to and a SAML decryption cipher of RSA PKCS#1 v1.5 are blockers; with it on, notices. The status block and `GET /server/fips` (`rsa15_receive`) say which way it is set.

### Who is told the server runs in FIPS mode

**Tell everyone, on the login page and in the Files app** (`fips_show_mode_publicly`):

- **Off (the default)**: only accounts that hold an admin right or a role are told that the server runs in FIPS mode: the chip and the status block on the admin pages, and the line at the foot of the Files app. The login page says nothing about it, and users without an admin right are not told, in the Files app or in the session information every page reads.
- **On**: the login page and the Files app say "This server runs in FIPS 140-3 mode." to everyone.
- What FIPS mode refuses is refused with its reason either way, so a user whose action is refused learns why. The algorithms a port offers (TLS, SSH) and the checksums the server answers in (SHA-256) are visible to anyone who looks, whatever the setting.

## How you know it is on

- **Every admin page** shows a chip **FIPS 140-3 mode** in its top bar. A click shows the status block: the module, its certificate and version, approved-only, the self-tests, the jars, the Java and whether it is listed, the operating system's flag, TLS and SSH in force, and the items in force on this server.
- **Server Admin** has the same block as a card on the dashboard and in About; the cluster page marks each server's mode.
- **The Files app** says "This server runs in FIPS 140-3 mode." to an admin; the login page and users without an admin right are told only while [the preference](#who-is-told-the-server-runs-in-fips-mode) is on.
- **The log** has the block at every start:

```text
FIPS 140-3 mode: on (launch parameter -Dcrushmft.fips=true), started in 1051 ms
FIPS module: BC-FJA 2.1.1, FIPS 140-3 certificate #4943, approved-only: yes, self-tests: READY
FIPS Java: 27 (Oracle Corporation), Java 27: not listed on the module's certificate (listed: 8, 11, 17, 21)
FIPS watch: on; crypto calls not answered by the module since start: 0 (...)
FIPS catalog: 87 rows, 0 in force on this server
```

- **The API** answers `GET /WebInterface/api/v1/server/fips` (permission `server.status.view`) with the status block and the list of items. Every CrushMFT 27 server answers it: one without the launch parameter says `{"fips": false, "mode": "off"}` and nothing more.
- **Prometheus** `/metrics` has `crushmft_fips_mode` (1, with the module and certificate as labels), `crushmft_fips_crypto_not_module_total`, `crushmft_fips_restrictions_in_force` and the counts of refused job engines and DMZs.
- **The watch**: CrushMFT counts every cryptographic call that the module did not answer. It has to stay at 0, and the status block shows it.

A locked control on an admin page says **Not available in FIPS mode** or **Set by FIPS mode**, with the reason, what to use instead, and a **What FIPS mode changes** link to its item. Without the launch parameter there is nothing about FIPS on any page: no chip, no line, no lock; only the API's `GET /server/fips` answers that FIPS mode is off.

## What changes for your users and partners

The full list, item by item, is [What FIPS mode changes](FIPS-Mode-Changes.md). What most people notice:

- **PGP and AS2 encryption to RSA keys.** OpenPGP and classic S/MIME wrap the message key with RSA PKCS#1 v1.5, which NIST disallows since 2023, and the module refuses to do it. Signing with RSA still works. To send encrypted, a PGP partner needs a key on a NIST curve (P-256, P-384 or P-521), and an AS2 partner has to read RSA-OAEP. Messages partners encrypt to your RSA keys are refused too, unless you turn on [the preference](#messages-partners-wrapped-with-rsa-pkcs1-v15).
- **Old clients.** TLS 1.0 and 1.1 are gone; a TLS 1.2 client has to send the extended master secret (every current browser and TLS library does); only AES-GCM suites are offered. SSH clients that know only `ssh-rsa` signatures, curve25519 or chacha20 can not connect. OpenSSH's client was tested against the list; other clients were not.
- **Users whose stored password is MD5, MD4, crypt, bcrypt or Argon2** can not log in until they are given a new password, which is stored as PBKDF2. Passwords stored as a SHA digest still log in and are stored again as PBKDF2 at that login. Passwords shorter than 14 characters still work; we recommend a password policy of 14 characters or more.
- **SSH keys**: DSA keys and RSA keys under 2048 bits do not log anyone in, and are not offered as host keys. PuTTY version 3 key files are not read; export the key in OpenSSH's format.
- **Turned off**: HTTP/3, SMB over QUIC, SMB logins by password (NTLM: SMB takes Kerberos logins only, SMB 3 and later), SMB 1, the Radius plugin, AS2 v1, PGP with a passphrase alone, LDAP binds with DIGEST-MD5 or CRAM-MD5, SNMPv3 with MD5 or DES, MagicDirectory with MD5 passwords.
- **Key stores**: JKS and PKCS#12 are read as their BCFKS copies (made once by `-FIPS_PREPARE`), key store passwords need 14 characters, and the built-in certificate is replaced by the server's own.
- **New keys** are made by the module: TLS keys RSA 3072 or EC P-256/P-384, PGP keys on P-384.
- **PGP version 3 keys** (PGP 2.x) are used for nothing: their fingerprint is MD5 by definition. They are still listed, and the PGP app marks them.
- **Checksums are SHA-256**: see [Checksums](#checksums).

## Checksums

Where CrushMFT itself chooses the hash of a checksum, FIPS mode uses SHA-256, computed by the module: the checksum of every upload and download (the setting `hash_algorithm`: a stored MD5 or SHA-1 is used as SHA-256, a SHA-2 or SHA-3 one as it is; the setting itself is not changed), the `md5` and `sfv` variables, the Copy and Unzip tasks' checksums, the chunk check of new chunked encrypted files, PDF document ids, cache keys. The operating system's `md5sum` (`md5sum_native_exec`) is not run.

CrushMFT's own clients (CrushClient, the tunnel, CrushSync and CrushMFT Drive, with a current `CrushTunnel.jar`) tell the server they know SHA-256, and a server in FIPS mode answers them in SHA-256: the check after an upload, and the chunk lists a resume compares. Without FIPS mode, or with a server from before, they work in MD5 as always.

MD5 stays where someone else's format defines it and offers nothing newer. CrushMFT computes it with code of its own, as a checksum of data that TLS or SSH already protects, because the module has no MD5:

- the **S3 server**: ETags and `Content-MD5` (an S3 client's SHA-256 checksum, `x-amz-checksum-sha256`, is checked by the module);
- the FTP commands **MD5, XMD5 and MD5S**, and the MD5 column of CrushMFT's full path FTP listing;
- the file checksum the API or `getMD5` is asked for **by name as MD5** (SHA-256 is offered beside it);
- the fingerprint a **PGP version 3 key** is listed by;
- **CrushMFT's own clients from before** this change (an older `CrushTunnel.jar`): they compare MD5, so they are answered in MD5. The log says so once a day for each client, so you can see who still needs the new version.

## What does not change

- **Your settings.** Nothing stored is rewritten by FIPS mode; locked controls keep their stored values.
- **The licence code**: it is read by a small DES of CrushMFT's own that protects none of your data and is used for nothing else.
- **The S3 server** (its signatures are HMACs, checked by the module), **TOTP two-factor codes**, **passkeys** (ES256 and RS256), **Kerberos** with AES keys.
- **MD5 where someone else's format names it**, as a checksum: S3's ETags and Content-MD5, FTP's MD5 commands, older clients of CrushMFT's (see [Checksums](#checksums)). CrushMFT computes it with code of its own, because the module has no MD5 and the standards allow a checksum outside it.
- **What your users see**: nothing about FIPS mode, unless you turn on [the preference](#who-is-told-the-server-runs-in-fips-mode).
- **Outgoing TLS** of other features (syslog over TLS, the update check) runs on the module's TLS provider, trusting the same certificate authorities as Java.

## What is done outside the module

FIPS mode keeps the cryptography in the module wherever it can. These are the places where it does not, named so that you can judge them:

1. **SSH session keys** are derived by the SSH library's own code (Synergy), from hashes the module computes.
2. **Kerberos** key derivation runs in Java's own Kerberos code, over the module's AES and HMAC.
3. **Passphrase-protected key files** that are read: an OpenPGP key ring's passphrase (OpenPGP's own key derivation) and an OpenSSH key file's passphrase (bcrypt, in the SSH library). FIPS treats such a file as a key stored in the clear.
4. **MD5 where someone else's format names it** (S3, FTP's MD5 commands, older clients of CrushMFT's: see [Checksums](#checksums)) and **DES for the licence code**.
5. **Trust anchors**: Java's list of certificate authorities is read with Java's own code at start, before the module is engaged. They are public certificates.
6. **Entropy**: the module is seeded from the operating system through Java's native generator (`NativePRNGBlocking`; on Windows, `Windows-PRNG`). The module's maker has a certified entropy source for Linux; it is not used.
7. **The Java version** (above).
8. **Login passwords under 14 characters**: the module refuses an HMAC key that short, so the password is padded with zero bytes, which gives exactly the same PBKDF2 result. Nothing stored changes.
9. **Other people's code**: database drivers, Kafka and JMS client libraries, and plugins of your own run on the module's algorithms, and fail where they ask for MD5 or DES. A program a task starts is outside FIPS mode.
10. **Browsers and client programs** do their own cryptography. FIPS mode is the server, its DMZ and its job engines.
11. **TLS 1.3**, which the module's own TLS provider offers: the module's security policy names its AES-GCM rule for TLS 1.2 and for random nonces only. `-Dcrushmft.fips.tls12only=true` leaves TLS 1.3 out.
12. **Rules the policy states and the module does not enforce**, so CrushMFT keeps them: no AES-GCM with a nonce of CrushMFT's own making (SSH uses AES-CTR, stored secrets AES key wrap, SMB AES-CCM), 14 characters for a key store password, the extended master secret in TLS 1.2.
13. **Messages partners wrapped with RSA PKCS#1 v1.5**, while the preference `fips_allow_rsa_pkcs1_v15_receive` is on: the module decrypts them, though SP 800-131A disallows the scheme (off by default, so refused).
14. **SNMPv3 keys**: the module's own SNMP key derivation gives the standard key only for passwords whose length divides 2^20 bytes (8, 16, 32, 64); for other lengths, and for the SHA-2 protocols, CrushMFT works the key out over the module's hash.
15. **The public point of an EC key** is no longer worked out by CrushMFT's own code in FIPS mode: keys are stored with it, and one stored without it is refused with the reason (`-FIPS_PREPARE` stores it for the OpenID Connect issuer's keys of earlier versions). What is left: a public point stored with a key is checked to lie on its curve by CrushMFT's own arithmetic before the module is given it.

## DMZ, cluster and job engines

Each machine is started with its own launch parameter. FIPS mode checks the other end of every link:

- **A DMZ, a job engine (on this machine or another), its runners and an orchestrator of its own** run in FIPS mode at both ends or at neither. A server in FIPS mode refuses a peer that is not, and a peer in FIPS mode refuses a server that is not; each says why in its own log, and the admin pages show the refusal. Engines started by the CrushMFT apps have no FIPS mode, so a server in FIPS mode refuses them.
- **The servers of a cluster** are not refused for their mode: they still link, replicate and show each other, and the cluster page marks every server whose mode differs. What a server in FIPS mode is sent by one that is not is held to its own rules where it is used: a password stored as MD5 does not log in there.
- **Between cluster servers in FIPS mode** the links use FIPS mode's TLS; under `-Dcrushmft.fips.tls12only=true`, TLS 1.2.
- **A DMZ in FIPS mode** gets its key stores from its server: run `-FIPS_PREPARE` on the internal server, which converts the stores the DMZ's preferences name, and the server sends the BCFKS copies and its own certificate to the DMZ.

**The key for stored secrets between machines.** In FIPS mode every stored secret is sealed under the server's own key, and there is no built-in key to fall back on:

- **A DMZ** is handed its server's key over the paired link: it needs nothing of its own.
- **The servers of a cluster** each need **a copy of the same `secret.key`** (or the same passphrase). The cluster page shows an id of each server's key (never the key) and marks keys that differ or are missing; a server that meets a secret it can not open says so in its log.
- **A job engine on another machine** is never given the key. In FIPS mode a run there keeps its working key unsealed on that engine, and jobs whose tasks hold stored secrets run on the server's own engine.

## Docker and Helm

The CrushMFT 27 image has a FIPS variant of every tag, with `-fips` at its end: `crushftp/crushmft27:latest-fips` beside `latest`, `27.0.0_0-255-fips` beside `27.0.0_0-255`, and `latest-dev-fips` and `27.0.0_0-255-dev-fips` for the image with a shell. It is the same image, made from the same CrushMFT build, with two things more:

- the FIPS extras of that build in its program folder `/app`: the four jars in `/app/plugins/lib/`, the readme and the checksums beside `CrushMFT.jar`;
- the launch parameter `-Dcrushmft.fips=true` on the image's own java line.

The images without `-fips` hold none of it. A `-fips` image is published only after its own tests passed: FIPS mode on with the module in approved-only mode, HTTPS, SFTP and the API answering, the preparation below on a new volume and on a volume of the image without `-fips`, and a start with one of the module's jars taken away refused.

```bash
docker run -d --name crushmft27 -p 8080:8080 -p 443:443 -p 2222:2222 -v crushmft27:/app/CrushMFT27 crushftp/crushmft27:latest-fips
docker logs crushmft27 | grep -E 'first admin|FIPS'
```

### The first start

A server folder has to be prepared once for FIPS mode, with the server stopped ([-FIPS_PREPARE](#-fips_prepare-the-conversions)). The image's start does that by itself: when the volume is not prepared for the version that starts (a new volume, a volume the image without `-fips` ran on, a new version), it runs `-FIPS_PREPARE` in a Java process without the launch parameter, and then starts the server in FIPS mode. Its lines in the log begin with `CrushContainer: FIPS mode:`.

- **A new volume** has no settings yet for `-FIPS_PREPARE` to read. So first a short start in FIPS mode, in a process of its own, makes them (the preferences and the first admin) and is stopped again. The very first start takes a little longer.
- **What it changes on the volume** (`/app/CrushMFT27`): the server's own key for stored secrets, `secret.key`, unless one is there, and `at_rest_key_mode` set to `keyfile` in `prefs.XML`; a certificate of the server's own in `fips/builtin.bcfks`, which FIPS mode serves where the settings say `builtin`; a `.bcfks` copy beside each JKS and PKCS#12 key store; every stored secret still in the old DES form sealed again under the key, each file it changes copied first into `fips/prepare-backup-<time>/` (delete that folder once FIPS mode works: it holds the old secrets); and the mark `fips/container-prepared.txt` with the version, so that later starts of that version skip the step.
- **Blockers**: when `-FIPS_PREPARE` names something that needs a person (a key store password under 14 characters, for example), the server still starts in FIPS mode and refuses what it names, and the step runs again at the next start. `-FIPS_CHECK` lists them.
- **By hand instead**: with `CRUSHFTP_FIPS_PREPARE=false` (in the chart `fips.prepare: false`) nothing is prepared, and FIPS mode refuses by itself what it can not use: without a key of its own the server stores no secret, and HTTPS and FTPS on the built-in certificate do not start. Run the two commands in the same image, on the same volume, with the server stopped; the image runs them without the launch parameter and starts no server:

```bash
docker run --rm -v crushmft27:/app/CrushMFT27 crushftp/crushmft27:latest-fips -FIPS_CHECK
docker run --rm -v crushmft27:/app/CrushMFT27 crushftp/crushmft27:latest-fips -FIPS_PREPARE
```

### The key for stored secrets

Everything the server stores as a secret is sealed under `secret.key`, and without that file it can not be read again. Keep a copy apart from the volume. The servers of a cluster all need the same key, and in Kubernetes a Secret is the place for it: mounted read-only as `/app/CrushMFT27/secret.key`, `-FIPS_PREPARE` takes that key as it is instead of making one. A mounted key can not be changed from the admin pages. Keep it mounted once you use it: the volume then holds only an empty file at its place.

The image without a shell has no tool to copy the key out of a volume; the `-dev-fips` image has:

```bash
docker run --rm --entrypoint cat -v crushmft27:/app/CrushMFT27 crushftp/crushmft27:latest-dev-fips /app/CrushMFT27/secret.key > secret.key
kubectl create secret generic crushmft27-secret-key --from-file=secret.key
```

### Helm

The chart `crushmft27` has the value `fips.enabled`. Its default, `false`, changes nothing.

```yaml
fips:
  enabled: true
  prepare: true                              # CRUSHFTP_FIPS_PREPARE: the image prepares the volume
  secretKey:
    existingSecret: crushmft27-secret-key    # optional: without it the key is made on the volume
    existingSecretKey: secret.key
```

With it the pod runs the `-fips` image of `image.tag` (`latest` becomes `latest-fips`; `image.tag` stays the version), its java line carries `-Dcrushmft.fips=true` (after `javaOptions`, or the image's own heap setting), the Secret's key is mounted at `/app/CrushMFT27/secret.key`, and the container's `terminationMessagePolicy` is `FallbackToLogsOnError`. Readiness and liveness are the same as without FIPS mode: a pod in FIPS mode that answers `/WebInterface/api/readyz` has its module engaged. A `command` of your own is used as it is: put the parameter into it yourself.

### When FIPS mode can not start

The container ends with **exit code 78** and Java's reason on its error output, with the preparation on or off, for example:

```
FIPS mode can not start: /app/plugins/lib has no tls jar of the FIPS pack (bctls-fips-2.1.25.jar).
```

The jars in the image are the ones FIPS mode knows, so this happens only when the image's `/app/plugins/lib/` was changed, for example by a volume mounted over it. Docker starts the container again under `--restart always` or `unless-stopped`; `--restart on-failure:3` stops after three tries. Kubernetes restarts a StatefulSet's container after every exit, with a growing wait: the pod never becomes ready, so no traffic reaches it, and `kubectl describe pod crushmft27-0` shows Java's line under *Last State: Terminated*, *Message*.

### Job engines

The server's job engine and its runners are Java processes of their own in the same container. Each is given the launch parameter and the image's FIPS pack by the server, so they run in FIPS mode as well.

## Speed

The module is written in Java. It has native code only for Linux on Intel and AMD processors; everywhere else it is slower than Java's own cryptography. These are measurements on one machine, not promises: an Apple M1 Ultra (20 cores) with macOS 26 and Java 27, the server and the client on the same machine over the loopback, the same server folder started without and with the launch parameter, a 1 GiB file, the middle of three runs.

| | Without FIPS mode | FIPS mode |
|---|---|---|
| HTTPS upload / download (curl, TLS 1.3, AES-256-GCM) | 114 / 124 MB/s | 71 / 59 MB/s |
| FTPS upload / download (explicit TLS 1.3, AES-256-GCM) | 161 / 367 MB/s | 47 / 60 MB/s |
| SFTP upload / download, AES-128-CTR with HMAC-SHA-256 (OpenSSH) | 161 / 155 MB/s | 66 / 60 MB/s |
| SFTP upload / download, AES-256-CTR with HMAC-SHA-256 | 135 / 132 MB/s | 59 / 54 MB/s |
| SFTP upload / download, the client's own first choice | 239 / 234 MB/s (AES-128-GCM) | 66 / 60 MB/s (AES-128-CTR) |
| PGP encrypt / decrypt of the file to a P-384 key (AES-256, integrity packet, no compression) | 249 / 196 MB/s | 64 / 61 MB/s |
| Logins, each a full PBKDF2 check (100,000 rounds), 20 at a time | about 395 a second | about 95 a second |
| Logins of a user whose password was checked in the last 15 minutes | about 400 to 500 a second | about 400 to 500 a second |
| Server start, from launching Java to the first login | about 0.7 s | about 1.9 s |

The HTTPS figures without FIPS mode are held back by the client (curl with LibreSSL); FTPS shows what the server does with a faster client. One thread of the same machine, Java's own cryptography against the module:

| | Java's own | The module |
|---|---|---|
| AES-256-CTR | about 415 MB/s | about 125 MB/s |
| AES-256-GCM | about 110 MB/s | about 80 MB/s |
| SHA-256, HMAC-SHA-256 | about 2,200 MB/s | about 200 MB/s |
| PBKDF2-SHA-256, 100,000 rounds (one login) | about 21 ms | about 66 ms |
| New TLS 1.3 handshakes, one client after another, RSA 3072 | about 145 a second | about 112 a second |

The same on Linux (arm64, Java 25, in a container on that machine) gave figures within about ten percent of these: the module has no native code there either. So on such a machine one SFTP, FTPS or HTTPS connection in FIPS mode moves about 50 to 70 MB/s, and a login costs about 65 ms of one core (CrushMFT lets half the cores check passwords at once). TLS 1.3 sessions are not resumed in FIPS mode (the module's TLS provider sends no session ticket), so every TLS 1.3 connection is a full handshake; TLS 1.2 sessions are resumed. Figures for Linux on Intel or AMD (with the module's native code) and for Windows have not been measured yet.

## Turning it off

Remove the launch parameter and start the server again. Your settings were never changed, so the server is what it was:

- The `.bcfks` copies and `fips/builtin.bcfks` stay where they are; without FIPS mode the settings' own files are used again.
- Secrets sealed under the server's key stay readable: CrushMFT 27 reads them with or without FIPS mode, and `at_rest_key_mode` stays `keyfile`.
- Passwords stored as PBKDF2 while FIPS mode ran stay PBKDF2.

## What has been tested so far

FIPS mode was built and tested on macOS (Apple silicon) with Java 27: the start and its refusals, HTTPS, FTPS, WebDAV and SFTP with OpenSSH and OpenSSL as clients, stored secrets and every password form, PGP with GnuPG, AS2 between two CrushMFT servers and with OpenSSL, SMB and NFS with Kerberos, SNMPv3, S3 with the AWS command line, a DMZ, job engines and a two-server cluster, each machine as its own program on one computer, and `-FIPS_CHECK` and `-FIPS_PREPARE` on prepared test folders. The FIPS pack as the build makes it was unpacked into fresh server folders and passed the start's check, `-FIPS_CHECK` and a start in FIPS mode.

On **Linux** (Ubuntu 26.04 on arm64, Java 25, in a container): `-FIPS_CHECK`, `-FIPS_PREPARE`, the start in FIPS mode with its status block, HTTPS and SFTP from another program, the TLS and SSH refusals, logins, the program in a read-only folder with its state on another volume (with the job engine and a job, with and without the parameter), and `crushmft_init.sh` stopping on exit code 78 with the reason.

On macOS the server was also started through `CrushLauncher.jar` itself, in FIPS mode, with its job engine and runners started from copies of it: jobs ran, a PGP message to an RSA key was refused and read as the preference said, and the watch stayed at 0.

The FIPS extras as the build server's recipe makes them (`CrushMFT27_FIPS.zip` from the same sources as `CrushMFT.jar`) were unzipped into fresh folders made from `CrushMFT27.zip`, on macOS and in the Linux container with the program read-only: `-FIPS_CHECK`, `-FIPS_PREPARE`, the start in FIPS mode from `plugins/lib/`, HTTPS and SFTP, a job on the job engine and its runner, the watch at 0; in each of those Java processes every Bouncy Castle class was loaded once, by FIPS mode's own loader. The same folders started without the parameter behaved exactly as folders without the four jars: Java's own providers, no Bouncy Castle class loaded, nothing about FIPS anywhere. Each refused start (a jar missing, changed, of another version, two versions, the jars only in the old `plugins/lib/fips/`, another Bouncy Castle jar, the jars on the class path) ended with exit code 78 and its reason.

Checksums and the second preference (November 2026): CrushMFT's current clients against a server in FIPS mode (uploads with their check, downloads, resumed uploads and downloads, the tunnel's and CrushSync's resume comparison, CrushMFT Drive's uploads), the same clients from before (answered in MD5, said in the log once a day), both against a server without FIPS mode (MD5 throughout), CrushClient's own upload check, the Files app in a browser, the AWS command line against the S3 server (ETags and Content-MD5 as before), FTP's XMD5, and the login page, the Files app and the session information with the preference off and on. A server in FIPS mode started with the launch property an earlier test build had for giving `hmac-sha1` back refused OpenSSH asking for `hmac-sha1`, and named the property as ignored. A DMZ on port 9000, two servers as a cluster (also with TLS 1.2 only) and a job engine in another folder ran again on one computer, each in FIPS mode, with every refusal of a peer that was not.

The `-fips` image's start (November 2026), on the program and the FIPS extras the build server's recipe made from the same sources, laid out as the image holds them, on Linux (arm64, Java 25, in a container) and as the image's own user: a new volume (the short first start, `-FIPS_PREPARE`, then the server in FIPS mode with HTTPS on its own certificate, SFTP and the API), a restart (nothing prepared again), a volume the image without `-fips` ran on (its old secrets sealed again, its admin logging in), the key mounted read-only from outside, the preparation turned off with `-FIPS_CHECK` and `-FIPS_PREPARE` run by hand, and a jar of the module taken away (exit code 78 with Java's reason, with the preparation on and off).

**Not run yet**: Windows (the service, the Windows program, WinSCP and FileZilla), Linux on Intel or AMD with the module's native code, systemd itself, an operating system in its own FIPS mode, links across two real machines, client programs of other vendors beyond OpenSSH, OpenSSL, curl, GnuPG and the AWS command line, the `-fips` images as the build server makes them, and the chart's FIPS value on a Kubernetes cluster.
