Camel Spring Boot

PQC (Post-Quantum Cryptography)

Encrypt and decrypt messages using Post-Quantum Cryptography Key Encapsulation Mechanisms (KEM)

What’s inside

Please refer to the above links for usage and configuration details.

Maven coordinates

<dependency>
    <groupId>org.apache.camel.springboot</groupId>
    <artifactId>camel-pqc-starter</artifactId>
</dependency>

Spring Boot Auto-Configuration

The starter supports 40 options, which are listed below.

Name Description Default Type

camel.component.pqc.allow-shared-stateful-key

Whether to sign with a stateful key (XMSS, XMSSMT, LMS/HSS) that the configured KeyLifecycleManager cannot claim for this process alone. These are one-time-signature schemes: when two processes load the same key from a shared store, both sign from the same index and the key is broken. Only enable it when something outside Camel guarantees a single signer.

false

Boolean

camel.component.pqc.autowired-enabled

Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc.

true

Boolean

camel.component.pqc.classical-k-e-m-algorithm

The classical key agreement algorithm of the hybrid key encapsulation operations. When classicalKeyAgreement is not set, the KeyAgreement is created for it: ECDH for the ECDH values, X25519 or X448. The curve is the one of classicalKeyPair; only X25519 and ECDH_P256 with keyEncapsulationAlgorithm MLKEM get a default key pair.

String

camel.component.pqc.classical-key-agreement

The classical javax.crypto.KeyAgreement of the hybrid key encapsulation operations. When not set, the producer creates one for classicalKEMAlgorithm. The option is a javax.crypto.KeyAgreement type.

KeyAgreement

camel.component.pqc.classical-key-pair

The classical key pair of the hybrid operations: an EC, EdDSA or RSA key pair for hybridSign and hybridVerify, an EC or XDH key pair for the hybrid key encapsulation operations. The option is a java.security.KeyPair type.

KeyPair

camel.component.pqc.classical-signature-algorithm

The classical signature algorithm of hybridSign and hybridVerify. When classicalSigner is not set, the Signature is created for it: SHA256withECDSA, SHA384withECDSA and SHA512withECDSA for the ECDSA values, Ed25519 and Ed448, and SHA256withRSA, SHA384withRSA and SHA512withRSA for the RSA values. The curve or RSA key size is the one of classicalKeyPair; only ECDSA_P256 and ED25519 with signatureAlgorithm MLDSA get a default key pair.

String

camel.component.pqc.classical-signer

The classical java.security.Signature of hybridSign and hybridVerify. When not set, the producer creates one for classicalSignatureAlgorithm. The option is a java.security.Signature type.

Signature

camel.component.pqc.configuration

Component configuration. The option is a org.apache.camel.component.pqc.PQCConfiguration type.

PQCConfiguration

camel.component.pqc.enabled

Whether to enable auto configuration of the pqc component. This is enabled by default.

Boolean

camel.component.pqc.health-check-consumer-enabled

Used for enabling or disabling all consumer based health checks from this component

true

Boolean

camel.component.pqc.health-check-producer-enabled

Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true.

true

Boolean

camel.component.pqc.hybrid-kdf-algorithm

The HKDF (RFC 5869) variant that combines the classical and the PQC shared secrets into the secret key of the hybrid key encapsulation operations. Both sides must use the same value.

HKDF-SHA256

String

camel.component.pqc.key-encapsulation-algorithm

The PQC key encapsulation mechanism (KEM). When keyGenerator is not set, the KeyGenerator is created for this algorithm, and when neither keyPair, keyStore nor keyPairAlias is set, a default key pair of this algorithm is generated in memory and shared by the endpoints of the JVM that use the same algorithm. KYBER creates ML-KEM keys, as MLKEM does. CMCE is deprecated.

String

camel.component.pqc.key-generator

The javax.crypto.KeyGenerator of the key encapsulation operations, and of the PQC part of the hybrid ones. When not set, the producer creates one for keyEncapsulationAlgorithm. A configured instance is shared by the exchanges, which then use it one at a time. The option is a javax.crypto.KeyGenerator type.

KeyGenerator

camel.component.pqc.key-lifecycle-manager

The KeyLifecycleManager that stores the keys and their metadata. Required by the key lifecycle operations (generateKeyPair, exportKey, importKey, rotateKey, getKeyMetadata, listKeys, expireKey, revokeKey and deleteKeyState). The signing operations use it to record the usage of the key named in the CamelPQCKeyId header, and to store the state of a stateful key. The option is a org.apache.camel.component.pqc.lifecycle.KeyLifecycleManager type.

KeyLifecycleManager

camel.component.pqc.key-pair

The key pair of the signature and key encapsulation operations (the PQC key pair of the hybrid ones): the private key signs and decapsulates, the public key verifies and encapsulates. The exportKey, getRemainingSignatures and getKeyState operations use it too. When neither this option, keyStore nor keyPairAlias is set, a default key pair is generated in memory for signatureAlgorithm or keyEncapsulationAlgorithm. The option is a java.security.KeyPair type.

KeyPair

camel.component.pqc.key-pair-alias

The alias of the entry in keyStore that holds the key pair.

String

camel.component.pqc.key-rotation-check-interval

How often the key rotation scheduler checks the keys, when keyRotationSchedulerEnabled is true. Must be positive. The first check runs one interval after the component starts. The option is a long type.

3600000

Long

camel.component.pqc.key-rotation-max-age

When the scheduler is enabled, rotate keys older than this age. The age is compared in whole days. If not set, age is not used as a rotation signal. The option is a long type.

Long

camel.component.pqc.key-rotation-max-usage

When the scheduler is enabled, rotate keys whose recorded usage count reaches this value. The usage count of a key grows with each sign and hybridSign operation that names it in the CamelPQCKeyId header. 0 disables usage-based rotation.

0

Long

camel.component.pqc.key-rotation-scheduler-enabled

Whether to start a background scheduler that rotates the keys of the keyLifecycleManager set on the component, which is then required. On each check it rotates the ACTIVE and PENDING_ROTATION keys that reach keyRotationMaxAge or keyRotationMaxUsage, or whose metadata marks them for rotation.

false

Boolean

camel.component.pqc.key-store

A loaded java.security.KeyStore to read the key pair from: the private key and the certificate (for the public key) of the keyPairAlias entry. Used only when keyPairAlias and keyStorePassword are set too, and then it takes precedence over keyPair. The option is a java.security.KeyStore type.

KeyStore

camel.component.pqc.key-store-password

The password of the private key of the keyPairAlias entry in keyStore.

String

camel.component.pqc.lazy-start-producer

Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.

false

Boolean

camel.component.pqc.operation

The operation to perform

PQCOperations

camel.component.pqc.parameter-spec

The NIST parameter set (security level) to use for the configured signature or key encapsulation algorithm, using the BouncyCastle parameter-set names: for example ML-DSA-44, ML-DSA-65 or ML-DSA-87 for MLDSA, and ML-KEM-512, ML-KEM-768 or ML-KEM-1024 for MLKEM. Names are case-insensitive and the underscore form (ml_dsa_87) is accepted as an alias. When set, the key material is generated with this parameter set instead of the algorithm default. Not supported for the stateful signature algorithms (XMSS, XMSSMT, LMS, HSS) nor for the hybrid operations: for those, register a KeyPair bean in the registry instead.

String

camel.component.pqc.signature-algorithm

The PQC signature algorithm. When signer is not set, the Signature is created for this algorithm, and when neither keyPair, keyStore nor keyPairAlias is set, a default key pair of this algorithm is generated in memory and shared by the endpoints of the JVM that use the same algorithm. DILITHIUM and SPHINCSPLUS create ML-DSA and SLH-DSA keys, as MLDSA and SLHDSA do.

String

camel.component.pqc.signer

The java.security.Signature of the sign and verify operations, and of the PQC part of hybridSign and hybridVerify. When not set, the producer creates one for signatureAlgorithm. A configured instance is shared by the exchanges, which then use it one at a time. The option is a java.security.Signature type.

Signature

camel.component.pqc.stateful-key-warning-threshold

The warning threshold for stateful key exhaustion as a fraction of total signatures (0.0 to 1.0). When the remaining signatures for a stateful key (XMSS, XMSSMT, LMS/HSS) drop to this fraction of the total capacity or below, a WARN is logged on signing and the producer health check reports a warning. When remaining signatures reach zero, an exception is thrown to prevent key reuse. Set to 0 to disable warnings.

Double

camel.component.pqc.store-extracted-secret-key-as-header

Whether the extractSecretKeyFromEncapsulation and hybridExtractSecretKeyFromEncapsulation operations set the extracted secret key in the CamelPQCSecretKey header instead of the message body.

false

Boolean

camel.component.pqc.strict-key-lifecycle

Whether to enforce key status checks before cryptographic operations. When enabled, REVOKED keys are rejected for all operations, EXPIRED keys are rejected for signing/encapsulation but allowed for verification/extraction, and DEPRECATED keys produce a warning but still function. Requires a KeyLifecycleManager and a CamelPQCKeyId header to be set.

true

Boolean

camel.component.pqc.symmetric-key-algorithm

The symmetric algorithm of the secret key that the key encapsulation operations derive from the shared secret, such as AES. Required by the key encapsulation operations and their hybrid forms.

String

camel.component.pqc.symmetric-key-length

The length in bits of the secret key that the key encapsulation operations derive from the shared secret. It must be a length that symmetricKeyAlgorithm accepts: the fixed-size ciphers, such as SEED and SM4, only accept 128, and GOST3412-2015 and CHACHA7539 only accept 256. The default of 256 keeps the strength of the shared secret the KEM produces.

256

Integer

camel.dataformat.pqc.enabled

Whether to enable auto configuration of the pqc data format. This is enabled by default.

Boolean

camel.dataformat.pqc.key-encapsulation-algorithm

The Post-Quantum KEM algorithm to use for key encapsulation.

MLKEM

String

camel.dataformat.pqc.key-generator

Refers to a custom KeyGenerator to lookup from the registry for KEM operations. The option is a javax.crypto.KeyGenerator type.

String

camel.dataformat.pqc.key-pair

Refers to the KeyPair to lookup from the registry to use for KEM operations. The option is a java.security.KeyPair type.

String

camel.dataformat.pqc.provider

The JCE security provider to use.

String

camel.dataformat.pqc.symmetric-key-algorithm

The symmetric encryption algorithm to use with the shared secret. Only algorithms that support authenticated encryption (AEAD) are allowed: AES, ARIA, CAMELLIA, CAST6, DSTU7624, GOST3412_2015, SEED and SM4 are encrypted with GCM, and CHACHA7539 with ChaCha20-Poly1305.

AES

String

camel.dataformat.pqc.symmetric-key-length

The length (in bits) of the symmetric key. SEED and SM4 only accept 128; GOST3412_2015 and CHACHA7539 only accept 256.

256

Integer