# Only FIPS approved or allowed algorithms. It does not provide FIPS compliance
# by itself, the FIPS validated crypto modules must be properly installed
# and the machine must be booted into the FIPS mode.

# MACs: all HMAC with SHA1 or better
# Curves: all prime >= 256 bits, hybrid ML-KEM
# Signature algorithms: with SHA224 hash or better (no DSA), pure ML-DSA
# TLS Ciphers: >= 128-bit key, >= 128-bit block (AES, including AES-CBC)
# non-TLS Ciphers: same
# key exchange: ECDHE, RSA, DHE (no DHE-DSS)
# DH params size: >= 2048
# RSA params size: >= 2048
# TLS protocols: TLS >= 1.2, DTLS >= 1.2

mac = AEAD HMAC-SHA2-256 HMAC-SHA1 HMAC-SHA2-384 HMAC-SHA2-512
mac@krb5 = -HMAC-SHA2-384
mac@krb5 = +HMAC-SHA2-384
mac@krb5 = -HMAC-SHA1
mac@krb5 = HMAC-SHA1+

group = X25519-MLKEM768 P256-MLKEM768 P384-MLKEM1024 \
        SECP256R1 SECP521R1 SECP384R1 \
        FFDHE-2048 FFDHE-3072 FFDHE-4096 FFDHE-6144 FFDHE-8192
group@openssl = \
        P256-MLKEM768 X25519-MLKEM768 P384-MLKEM1024 \
        SECP256R1 SECP521R1 SECP384R1 \
        FFDHE-2048 FFDHE-3072 FFDHE-4096 FFDHE-6144 FFDHE-8192
        # deprioritize X25519-MLKEM768
group@{openssh,sequoia,rpm} = -X25519-MLKEM768

hash = SHA2-256 SHA2-384 SHA2-512 SHA2-224 SHA3-256 SHA3-384 SHA3-512 SHAKE-256

sign = MLDSA44 MLDSA65 MLDSA87 \
       ECDSA-SHA3-256 ECDSA-SHA2-256 \
       ECDSA-SHA3-384 ECDSA-SHA2-384 \
       ECDSA-SHA3-512 ECDSA-SHA2-512 \
       RSA-PSS-SHA3-256 RSA-PSS-SHA2-256 \
       RSA-PSS-SHA3-384 RSA-PSS-SHA2-384 \
       RSA-PSS-SHA3-512 RSA-PSS-SHA2-512 \
       RSA-PSS-RSAE-SHA3-256 RSA-PSS-RSAE-SHA2-256 \
       RSA-PSS-RSAE-SHA3-384 RSA-PSS-RSAE-SHA2-384 \
       RSA-PSS-RSAE-SHA3-512 RSA-PSS-RSAE-SHA2-512 \
       RSA-SHA3-256 RSA-SHA2-256 \
       RSA-SHA3-384 RSA-SHA2-384 \
       RSA-SHA3-512 RSA-SHA2-512 \
       ECDSA-SHA2-224 RSA-PSS-SHA2-224 RSA-SHA2-224
sign@*sequoia = MLDSA65-ED25519+ MLDSA87-ED448+  # Standardized in OpenPGP

tls_cipher = AES-256-GCM AES-256-CCM \
    AES-256-CBC \
    AES-128-GCM AES-128-CCM \
    AES-128-CBC

cipher = AES-256-GCM AES-256-CCM \
         AES-256-CTR AES-256-CBC \
         AES-128-GCM AES-128-CCM \
         AES-128-CTR AES-128-CBC

# CBC ciphers in SSH are considered vulnerable to plaintext recovery attacks
# and disabled in client OpenSSH 7.6 (2017) and server OpenSSH 6.7 (2014).
ssh_cipher = AES-256-GCM AES-256-CTR AES-128-GCM AES-128-CTR

cipher@{RPM,sequoia} = AES-*-CFB AES-*-GCM
cipher@*sequoia = -*-192-CFB

key_exchange = KEM-ECDH ECDHE DHE DHE-RSA PSK DHE-PSK ECDHE-PSK

protocol = TLS1.3 TLS1.2 DTLS1.2
ike_protocol = IKEv2

cipher@{pkcs12,smime} = AES-256-CBC AES-128-CBC
hash@{pkcs12,smime} = SHA*-256 SHA*-384 SHA*-512 SHA2-224
key_exchange@smime = *

min_tls_version = TLS1.2
min_dtls_version = DTLS1.2

# Parameter sizes
min_dh_size = 2048
min_dsa_size = 2048
min_rsa_size = 2048

# GnuTLS only for now
sha1_in_certs = 0

# For BIND
sha1_in_dnssec = 0

arbitrary_dh_groups = 1
ssh_certs = 1
ssh_etm = 1

__ems = ENFORCE
