# PQC Monitoring and Alerting Strategies

**Source**: https://quantumsequrity.com/blog/pqc-monitoring-alerting
**Category**: Operations

---

[← Back to Blog](../../blog) Operations

# PQC Monitoring and Alerting Strategies

11 min read

If you ship cryptographic software, you cannot tell whether it is working correctly without monitoring. The cryptographic operations themselves succeed or fail invisibly from the user's perspective, and when they fail, the failure mode is often subtle: a key rotation that did not propagate, a TLS handshake that fell back to a weaker algorithm, a signature verification that quietly skipped its checks.

Post-quantum cryptography raises the monitoring bar. The migration introduces new algorithms with new failure modes, new performance characteristics, and new operational concerns. This piece walks through what to monitor in a PQC deployment, what alerts to set, and how to integrate PQC telemetry into existing observability stacks.

## What to Monitor

The first question is what data to collect. For cryptographic operations, useful telemetry includes:

Operation count by algorithm. How many ML-KEM encapsulations per second? How many ML-DSA signatures? How many ECDSA verifications? Tracking counts by algorithm reveals whether your deployment is moving toward post-quantum or still relying on classical paths.

Operation latency by algorithm. ML-DSA verification is faster than RSA verification. ML-KEM encapsulation is faster than RSA encryption. SLH-DSA signing is much slower than ML-DSA signing. Tracking latencies catches performance regressions and sets a baseline for capacity planning.

Failure rate by algorithm. Cryptographic operations should rarely fail. When they do, the failure rate spike is a signal: either a software bug, a configuration drift, or an attack. Tracking failure rates by algorithm catches each.

Key age and rotation events. How old is each key in active use? When was the last rotation? Tracking key lifecycle catches expired keys before they cause outages and confirms that rotation policies are being followed.

Algorithm distribution in TLS handshakes. For a server, what fraction of inbound handshakes negotiate which key exchange? This reveals adoption pace by clients. For a client, what fraction of outbound handshakes negotiate which key exchange? This reveals server side adoption.

Certificate expiration timelines. When do the certificates expire? Are renewals on track? This is not new, but PQC adds the dimension of which certificate type is being renewed, classical or hybrid.

For more on hybrid encryption, see [hybrid-encryption](hybrid-encryption.md).

## SIEM Integration

A Security Information and Event Management system aggregates logs from across the infrastructure. Adding PQC telemetry to a SIEM lets you correlate cryptographic events with broader security events.

Useful PQC events for SIEM include:

Cryptographic operation failures. Failed signature verifications, failed decapsulations, KEM combiner errors. Each of these is worth logging with enough context to investigate.

TLS protocol downgrades. If a client offered ML-KEM hybrid but the negotiation fell back to ECDSA-only, that fact is worth logging. Repeated downgrades from a specific peer can indicate a misconfiguration or a downgrade attack.

Key access events. Every use of a long-lived signing key (intermediate CA key, code signing key) is worth recording. The rate of access tells you whether the key is being used as expected or by an unexpected party.

Configuration changes. When the cryptographic policy changes (a new algorithm allowed, an old one deprecated), the change event in the SIEM lets investigators correlate later events with the policy timeline.

The SIEM should also normalize the events. A PQC event from your application server, your TLS terminator, your code signing system, and your key management system should all be queryable using consistent fields. Normalization is one of the harder parts of SIEM operation but it pays back in investigation speed.

For more on PQC migration generally, see [hybrid-migration-strategy-step-by-step](hybrid-migration-strategy-step-by-step.md).

## Prometheus Metrics

For metrics-based monitoring, Prometheus is the de facto standard in cloud-native environments. PQC integration with Prometheus involves exposing cryptographic counters and gauges from the application.

Useful Prometheus metrics for PQC include:

A counter `crypto_operations_total{algorithm, operation, status}` that increments on every cryptographic operation. The labels let you slice by algorithm (ml_kem_768, ecdsa_p256, ml_dsa_65), operation (encapsulate, sign, verify), and status (success, failure).

A histogram `crypto_operation_duration_seconds{algorithm, operation}` that records the duration of each operation. Histograms let you compute percentiles for latency analysis.

A gauge `crypto_active_keys{algorithm, role}` that tracks how many keys are active by algorithm and role (signing, encryption). The gauge moves as keys are added and removed.

A gauge `crypto_key_age_seconds{key_id, algorithm}` that tracks the age of each key. Alerts can fire when ages exceed thresholds.

A counter `tls_handshake_total{cipher_suite, kex_algorithm}` that breaks down handshakes by negotiated parameters. This is the headline metric for TLS PQC adoption.

The application code instruments these metrics at the relevant call sites. Most production crypto libraries do not emit metrics natively, so the instrumentation is a wrapper layer.

## Anomaly Detection

Beyond basic monitoring, anomaly detection identifies patterns that should not be there. For PQC, useful anomalies include:

A sudden increase in cryptographic failures. If your application normally sees one decapsulation failure per million operations and you start seeing one per thousand, something is wrong. The increase could be a software bug, a peer with a misbehaving implementation, or an attack.

A sudden change in algorithm distribution. If your TLS server normally sees 60% ML-KEM hybrid handshakes and the fraction drops to 30%, something changed. Maybe a CDN deployed an old TLS version. Maybe a client population is on a different network. Investigating the cause is worth the effort.

Long-tail latency. PQC operations have predictable performance, and a sudden spike in tail latency suggests resource contention or an algorithm being run on inappropriate hardware. ML-DSA on a CPU without AES-NI is much slower than ML-DSA on a CPU with the instruction set; if your fleet is heterogeneous, the slow nodes show up in long-tail analysis.

Key usage anomalies. A code signing key that normally signs ten times a day suddenly signs a thousand times in an hour is a serious signal. The signal could be a legitimate burst (a release of many components) or an unauthorized use of the key.

Anomaly detection works best with a baseline. The first weeks of operation are about establishing what normal looks like. After that, deviations from the baseline are actionable signals.

For more on key management and rotation, see [crypto-agility-explained](crypto-agility-explained.md).

## Telemetry from PQC Libraries

The major PQC libraries differ in their built-in telemetry support.

OpenSSL has hooks for tracing cryptographic operations, but the hooks are designed for debugging rather than production telemetry. Production deployments typically wrap the library at the call site to emit metrics.

liboqs provides a benchmarking framework but does not emit production telemetry directly. Adding metrics to liboqs requires modification or wrapper code.

Language-specific PQC libraries (pqcrypto for Rust, pq-crystals for various) typically have minimal built-in telemetry. The application is responsible for instrumentation.

The takeaway: do not expect production-grade observability to come for free with the cryptographic library. Plan to add it at the application layer.

## Alerting Thresholds

The hardest part of monitoring is choosing alert thresholds. Too high, and you miss real problems. Too low, and you generate noise that gets ignored.

Some practical thresholds:

Cryptographic operation failure rate above 0.1% sustained for 5 minutes. Most operations should succeed; 1 in 1000 failure suggests something is wrong.

TLS handshake fallback to non-PQ-protected cipher suites accounts for more than 5% of new handshakes (assuming you normally see strong PQC adoption). A sudden increase suggests a configuration drift.

Code signing key access not from approved infrastructure. Even one such event is worth investigating immediately.

Certificate or key rotation past its scheduled date. The buffer should be days, not minutes, to allow operational response time.

Latency above 99th percentile of historical baseline by more than 50%. Slow operations may not break things immediately but they accumulate technical debt.

Each threshold should be tied to a runbook entry that tells the on-call engineer what to do when the alert fires. Alerts without runbooks are alerts that get muted.

## Telemetry Privacy and Security

Cryptographic telemetry is itself sensitive data. The fact that a particular operation is happening at a particular time can reveal information about user behavior.

Best practices include:

Avoid logging the cryptographic content. Never log private keys, plaintexts, or full ciphertexts. Log metadata like algorithm, operation, success/failure, and timing.

Avoid logging user-identifiable information alongside crypto operations unless necessary. If you need to correlate user behavior with crypto behavior, do so in a separate audit log with appropriate access controls.

Encrypt telemetry in transit and at rest. Telemetry pipelines should use TLS to the metrics backend. The backend storage should use disk encryption.

Limit access to crypto telemetry. The on-call engineer needs to see failure rates and latencies. They do not necessarily need to see specific user-level events.

For more on the threat of harvested crypto data, see [harvest-now-decrypt-later](harvest-now-decrypt-later.md).

## Dashboards

A well-designed PQC dashboard helps operators answer common questions at a glance:

What fraction of cryptographic operations are now post-quantum?
What is the failure rate for each algorithm?
What is the latency profile?
Which keys are in use, and what are their ages?
Are there any expiring certificates?
How does today compare to last week?

The dashboard should be the entry point for both operational monitoring and adoption tracking. As the migration progresses, the dashboard tells the story of what changed and how it is going.

For broader migration context, see [hybrid-migration-strategy-step-by-step](hybrid-migration-strategy-step-by-step.md).

## Tracing for Cryptographic Calls

Distributed tracing tools like Jaeger, Zipkin, and OpenTelemetry can include cryptographic operations as spans. A trace that shows a TLS handshake span with sub-spans for the key exchange and signature verification gives a clear picture of where time is spent.

For PQC specifically, tracing helps debug performance issues. A slow TLS handshake might be due to ML-KEM key generation, network round-trip, or downstream operations. Tracing decomposes the latency.

Tracing is most useful in environments where requests cross multiple services. For monolithic deployments, simpler metrics-based monitoring is usually sufficient.

## Audit Logging

For high-assurance environments, an audit log records every significant cryptographic event. The audit log is separate from operational metrics: it is append-only, immutable, and reviewed for compliance rather than performance.

For PQC, audit log entries include:

Every signature operation by long-lived keys (code signing, CA keys, intermediate CA keys).
Every key generation event.
Every rotation event.
Every failed verification with sufficient context to investigate.
Every policy change.

The audit log should itself be cryptographically protected: signed entries, append-only storage, off-machine replication. The PQC migration touches the audit log too: the signatures protecting the audit log entries should themselves be PQ-resistant.

For more on supply-chain audit, see [software-supply-chain-pqc](software-supply-chain-pqc.md).

## On-Call Runbooks for PQC Issues

Every alert needs a runbook. A runbook is a short document that tells the on-call engineer what to do when the alert fires. For PQC, useful runbooks cover:

What to do when KEM decapsulation failures spike. The first check is whether a peer is sending malformed ciphertexts. Logging a sample of failed decapsulations (without exposing key material) helps identify the source. Common causes include peers running incompatible library versions and intermediate proxies that corrupt traffic.

What to do when TLS handshakes downgrade unexpectedly. Check the peer's offered cipher suites and the negotiated ones. If a hybrid-capable peer suddenly negotiates a non-PQ cipher, something between the peer and your server changed. CDN configuration drift is a common cause.

What to do when a code signing operation fails. Code signing failures should be rare; any failure deserves immediate investigation. Check whether the signing infrastructure is reachable, whether the key material is intact, and whether the operation that triggered the signing was authorized.

What to do when a long-lived key approaches expiration. The runbook should cover the rotation procedure, the testing required before swapping the key into production, and the rollback path if something goes wrong.

The runbooks should be kept current. As the PQC posture evolves, the runbooks evolve too. A runbook that references the wrong tooling or assumes an older configuration is worse than no runbook at all.

## Frequently Asked Questions

**Do I need a SIEM to monitor PQC operations?**
Not strictly. A SIEM is helpful for correlation and long-term retention, but Prometheus or similar metrics tooling is sufficient for many use cases.

**How granular should my crypto telemetry be?**
Per-operation granularity is overkill for most deployments. Aggregate counters and histograms with second or minute resolution are usually enough.

**What metrics should I alert on first?**
Failure rate is the most important. Latency comes second. Algorithm distribution shifts come third.

**Can I get PQC telemetry from existing TLS libraries?**
Yes for some, no for others. OpenSSL exposes some information through its API. Rustls exposes cipher suite information through callbacks. The exact telemetry varies by library.

**How long should I retain crypto telemetry?**
For metrics, the standard 30 to 90 days is usually fine. For audit logs of long-lived key operations, multi-year retention is appropriate to support compliance audits.

## Sources

- [NIST FIPS 203: ML-KEM Standard](https://csrc.nist.gov/pubs/fips/203/final)
- [NIST FIPS 204: ML-DSA Standard](https://csrc.nist.gov/pubs/fips/204/final)
- [NIST SP 800-218 SSDF](https://csrc.nist.gov/publications/detail/sp/800-218/final)
- [NIST Cybersecurity Framework](https://www.nist.gov/cyberframework)
- [CISA Best Practices for Operational Technology](https://www.cisa.gov/topics/industrial-control-systems)
- [NIST National Vulnerability Database](https://nvd.nist.gov/)

## Related Articles

- [Crypto Agility Explained](crypto-agility-explained.md)
- [Hybrid Encryption Explained](hybrid-encryption.md)
- [Hybrid Migration Strategy Step by Step](hybrid-migration-strategy-step-by-step.md)
- [Harvest Now, Decrypt Later](harvest-now-decrypt-later.md)
- [Software Supply Chain Cryptography and PQC](software-supply-chain-pqc.md)

---

### Protect Your Data Before Q-Day Arrives

QNSQY's NIST-standardized post-quantum encryption protects files against both current and quantum-era threats.

[Try QNSQY](../../pricing)
