Security
FIPS 140-3
On this page
- Introduction
- The short version
- The two modes are not the same thing
- What cannot work under
fips140=only - SHA-1 one-time codes (
internal/mfa) - A vendor's token file (
internal/importer) - RADIUS (
internal/radius) - The breached-password check (
internal/passwords) - A certificate's thumbprint in a client assertion (
internal/federation) - Verifying passwords from another IdP (
internal/passwords) - Passwords hashed here
- AES-GCM in an encrypted response
- Encryption that works under
fips140=only - Other AES-GCM seals
- SAML assertion encryption (
internal/saml) - What this page does not claim
Introduction
Federal Information Processing Standard (FIPS) 140-3 is the United States government's standard for cryptographic modules. Some organisations accept only software whose cryptography runs through a module validated against it.
Signari builds and runs against Go's FIPS 140-3 cryptographic module. Not every feature works against it. This page says which features work and which cannot.
Read it if you have been asked for FIPS compliance, or if you review such a claim. Start with the two modes, because the answer depends on which mode the requirement means.
The short version
These commands build against the validated snapshot, serve with only approved algorithms, and build a pinned release with its image:
ShellGOFIPS140=certified go build ./cmd/signari # the validated snapshotGODEBUG=fips140=only ./signari servescripts/build-release.sh -fips -image REPO:TAG # a pinned release and a REPO:TAG-fips image
signari version says which module a binary was built against
(fips140 enabled, module v1.0.0-c2097c7c). module none means it was not
built against a snapshot at all, whatever GODEBUG says. The release script's
-fips refuses a binary or image that does not report the snapshot.
certified selects the snapshot Go lists as certified (v1.0.0-c2097c7c, in
$GOROOT/lib/fips140/certified.txt of the go1.26 toolchains), and the engine
builds against it.
Do not use GOFIPS140=latest for this: latest is the module's code as it
stands, not a validated snapshot. The package counts below are for certified.
internal/passwords and internal/mfa pass under fips140=only. Their tests of
what is refused in that mode run there, and the tests whose fixtures need SHA-1
skip. signari doctor reports the mode and
what it would refuse.
The module refuses a nonce the caller chooses for AES-GCM (the Advanced Encryption
Standard in Galois/Counter Mode): "use of GCM with arbitrary IVs is not allowed".
So the root key and each subject key let the module make the nonce
(NewGCMWithRandomNonce). Under fips140=only with the certified module, serve
starts and a password sign-in works. The stored hash moves from Argon2id to PBKDF2
on the first sign-in.
60 of 67 packages pass their tests under fips140=only, against a database,
with the certified module. None of the seven failures is a request path
panicking.
Five fail only in test fixtures that build with an algorithm the module refuses:
clientauthmakes RSA keys under 2048 bits to prove they are refused.httpapiandstorecompute time-based one-time password (TOTP) codes.importerbuilds a short-salted PBKDF2 hash.outboxsigns with an HMAC key shorter than the 112 bits the module allows. The engine's own webhook and provider secrets are 32 random bytes.
Two fail by design, as described below: radius, and saml, whose tests cover
the interoperable default as well as the FIPS configuration.
Core OpenID Connect (OIDC) is unaffected: the authorization code flow, token issue and verification, sessions, refresh, introspection and revocation. So are the JSON Web Key Set (JWKS), Demonstrating Proof of Possession (DPoP), mutual Transport Layer Security (TLS), Pushed Authorization Requests (PAR) and the device flow.
Where a feature cannot work, the reason is the same every time: a protocol or a stored format mandates an algorithm the module refuses.
The two modes are not the same thing
GODEBUG=fips140=on runs approved algorithms through the validated module, and
still allows everything else. Almost anything passes in this mode, so passing in
it shows little about FIPS support.
GODEBUG=fips140=only makes algorithms that are not approved fail: with an
error where the API allows one, and with a panic where it does not. That is the
mode this page is about, and the numbers above are from it.
If you are being asked for FIPS compliance, find out which of these two the requirement means before you plan anything.
What cannot work under fips140=only
SHA-1 one-time codes (internal/mfa)
One-time codes default to HMAC-SHA1, the variant every authenticator app computes. HMAC is a hash-based message authentication code. SHA-1 in HMAC is not a collision-resistance claim, and is not broken in the way SHA-1 signatures are. But the module does not make that distinction. It refuses HMAC with anything outside SHA-2 and SHA-3, and with a key shorter than 112 bits.
RFC 6238 also defines SHA-256 and SHA-512 variants, and those run inside the
module. An organisation that sets signari instance totp-policy -totp-algorithm SHA256 enrols new authenticator apps with SHA-256, and signari user assign-otp -totp-algorithm SHA256 assigns a hardware token that computes it.
Not every authenticator app computes SHA-256. One that does not shows codes that never match, so choose authenticator apps or tokens that state it. Each credential keeps the algorithm it was enrolled with.
Consequence: no SHA-1 codes. Use SHA-256 authenticator apps or tokens, or
WebAuthn, which
is unaffected: passkeys are ECDSA P-256 or RSA with SHA-256, and pass. A
YubiKey's Yubico OTP (user assign-otp -yubico) is unaffected too. Each OTP is
one AES-128 block, decrypted inside the module.
serve refuses to start under fips140=only while anyone has a SHA-1 code
authenticator as a second factor. It says how many, because none of them could
finish signing in. Move them to a SHA-256 authenticator or a passkey, and remove
the factor (DELETE /admin/users/{id}/factors/totp) first.
While an organisation still enrols SHA-1 authenticator apps, its enrolment page
says why it
cannot add one, instead of showing a secret no code could confirm. signari doctor warns as well.
A code checked anyway, or one from a token seed under 112 bits, is refused with an error rather than a panic.
A vendor's token file (internal/importer)
A Portable Symmetric Key Container (PSKC) file carries the secrets of one-time
password tokens from their vendor. RFC 6030 recommends implementing HMAC-SHA1 for
a PSKC file, and it is what the RFC's own example uses, so signari import pskc
reads it.
Under fips140=only such a file is refused, with a sentence saying so. Read it
once on a build without that setting, or ask the vendor for HMAC-SHA256, which
works in either. AES-CBC and the file's plain secrets are unaffected.
RADIUS (internal/radius)
Remote Authentication Dial In User Service (RADIUS) is how network equipment asks whether someone may connect. RFC 2865 builds the Response Authenticator from MD5, and RFC 2548 derives MPPE keys with MD5. Both are structural. An implementation that used anything else would not be RADIUS, and no network access server would talk to it.
Consequence: no RADIUS, and therefore no EAP-TLS through it. EAP-TLS lets a
device join a network with a certificate. In a FIPS environment, 802.1X needs a
RADIUS server built against a module that carries an MD5 exception for this
purpose. Go's module does not carry one. serve refuses to start under fips140=only
with SIGNARI_RADIUS_ADDR set.
The breached-password check (internal/passwords)
The corpus is indexed by SHA-1, and the range API takes a SHA-1 prefix, so the
check cannot run under fips140=only. serve refuses to start with
SIGNARI_PASSWORD_BREACH_CHECK or SIGNARI_PASSWORD_BREACH_LIST set. A check
reached anyway reports itself unavailable, instead of panicking.
A certificate's thumbprint in a client assertion (internal/federation)
signari idp auth -method private_key_jwt with a certificate names it in the
assertion's header by x5t, which is defined over SHA-1, as well as by
x5t#S256. It is a name and protects nothing. But SHA-1 is not available under
fips140=only, so there only x5t#S256 is sent. A provider that looks a key up
by x5t alone will not find it.
Verifying passwords from another IdP (internal/passwords)
Signari can import the password hashes of the system people are moving from, and check each one when that person first signs in. Several of those formats are built on MD5 or SHA-1, or on a salt shorter than the module allows, and the module refuses to compute them.
Consequence: people migrated from those systems can be imported, but cannot
sign in under fips140=only until they have set a password here. The delegated
authentication path is unaffected. It proxies the credential to the old identity
provider (IdP) and stores a local Argon2id hash. So a migration that uses shadow
authentication, instead of hash import, works.
Imported hashes the module refuses fail with an error that says to reset the
password. They are phpass and WordPress (MD5), MD5-crypt and Apache's apr1,
yescrypt, and the Lightweight Directory Access Protocol (LDAP) {SSHA}, {SHA},
{SMD5} and {MD5} schemes. PBKDF2
imports with SHA-1 or a salt shorter than 128 bits, as many Django salts are,
fail the same way.
SHA-crypt ($5$, $6$) and the SHA-2 LDAP schemes are SHA-2 throughout, and
verify.
Passwords hashed here
Argon2id, bcrypt, scrypt and yescrypt live outside the validated module. The
module does not refuse them, but it does not cover them. So with FIPS enabled
(on or only), a new
password is hashed with PBKDF2-HMAC-SHA256 through crypto/pbkdf2, which is
inside the module.
The hash uses 600,000 iterations, a 128-bit salt and a 256-bit key. The
iterations take 66 ms on a machine where Argon2id takes 25 ms. It is written
$pbkdf2-sha256$i=600000$<salt>$<key>.
An Argon2id password is checked once more at its next sign-in, outside the
module, and rehashed to PBKDF2 in the same transaction. A password nobody signs in
with stays Argon2id, and signari doctor reports how many are left. With FIPS off
again, a PBKDF2 password moves back to Argon2id at its next sign-in.
PBKDF2 has no memory hardness, so it is a weaker password hash than Argon2id. Its cost is all CPU, which is what guessing hardware is best at. If the requirement is a FIPS boundary around password storage, tell whoever asks for it about this trade-off.
AES-GCM in an encrypted response
Encrypting a response to a client goes through the JSON Object Signing and Encryption (JOSE) library. That library chooses GCM's nonce itself, and the module refuses a nonce the caller chose.
So under fips140=only the content encryptions on offer are A128CBC-HS256 and
A256CBC-HS512, in discovery and in the setting alike. RSA-OAEP-256 and
ECDH-ES work with both. A client set
to a GCM value before the move answers a 500, rather than send anything in the
clear.
A wallet's credential request is the same in the other direction. The metadata offers the CBC values, and those are what open.
A wallet sign-in set to direct_post.jwt cannot work in this
mode. The wallet's answer is encrypted with A128GCM or A256GCM, which the JOSE
library cannot open there, and the wallet offers no other. direct_post works.
Encryption that works under fips140=only
Other AES-GCM seals
These values go through NewGCMWithRandomNonce, as the root key and each
subject key do. In that form of AES-GCM the module owns the nonce, so each works
under fips140=only:
- An opaque access token's handle.
- A refresh token's successor, kept for a client with a retry window.
- A wallet presentation waiting for the browser.
- The AES-GCM step of reading an encrypted assertion from an upstream Security Assertion Markup Language (SAML) provider.
SAML assertion encryption (internal/saml)
Encrypted SAML works under FIPS, once it is configured for it. The package
still fails its tests under fips140=only, because those tests cover the
default configuration as well as the FIPS one.
GCM with an initialisation vector (IV) the caller supplies. The module
refuses it, because a nonce reused under one key breaks GCM's security. Signari
uses NewGCMWithRandomNonce, so the module chooses the IV. XML Encryption
carries the IV as a prefix of the cipher value, which is the layout that
function emits.
RSA-OAEP with SHA-1. XML Encryption's original rsa-oaep-mgf1p fixes SHA-1
as OAEP's hash and mask generation function. sp_key_transport selects between
that and xmlenc11 rsa-oaep with SHA-256. To select SHA-256 for an
application, which SAML calls a "service provider":
Shellsignari saml add-sp … -sp-encryption-cert sp.pem -sp-key-transport rsa-oaep-sha256
The default is rsa-oaep-mgf1p, because every SAML application implements it.
xmlenc11 rsa-oaep is widely but not universally supported. An application that
cannot read it cannot decrypt the assertions, so choose it only for an application
you know supports it.
When SHA-256 is selected, the EncryptedKey names both the digest and the mask
generation function (MGF) explicitly. Naming the MGF is required, because
rsa-oaep defaults to MGF1-SHA1. Declaring SHA-256 and omitting the MGF describes
a combination that was not produced. The far end then fails to unwrap, with no
indication of which half disagreed.
What this page does not claim
Signari has not been submitted for validation, and running against a validated
module is not the same as being validated. This page claims only that Signari
builds with GOFIPS140, and that under GODEBUG=fips140=only the packages
listed above fail for the reasons given, while the rest pass their tests.