Best Practices Guide

Encrypting LLM Audit Logs and Assigning Encryption Key Custody

Encrypt LLM audit logs in transit and at rest, because they can hold prompts, model outputs, tool-call parameters, retrieved context, and agent identity metadata. Then decide who holds the keys based on separation of duties.

Why LLM audit logs warrant encryption

LLM audit logs can hold sensitive material beyond simple event records. Depending on what the platform captures, a log may contain:

  • Prompts
  • Model outputs
  • Tool-call parameters
  • Retrieved context
  • Agent identity metadata

For this reason, audit logs should be encrypted both in transit and at rest.

Encryption is one control among several

Encryption protects log data, but it does not replace other controls. When reviewing a logging design, consider these alongside encryption:

  • Integrity: tamper evidence or integrity protection for audit records is separate from encryption.
  • Minimization: sensitive content in prompts, outputs, tool-call parameters, and retrieved context can be redacted or minimized before logging.
  • Retention: retention can be configured per log type, and should apply to backups and exports.
  • Key lifecycle: rotation and revocation procedures determine what happens to log readability when a key is revoked or lost.

Comparing key custody models

The four common models differ in who creates, stores, and controls the key material.

Key custody models at a glance
ModelDescription
Provider-managedThe service operator creates, stores, and rotates keys on your behalf.
Customer-managedKeys live in a KMS you administer, and the service uses them under your policy.
Bring your own keyYou generate or import key material and supply it to the platform.
Hold your own keyKey material stays outside the platform, which requests cryptographic operations as needed.

Choosing a custody model

Base the decision on separation of duties. As a baseline, the key owner should not be the team that writes the logs or the party that stores them.

Vendor evaluation criteria for log encryption and key management

Use these questions when evaluating how a platform handles log encryption and key custody.

  1. Which custody models does the platform support for log data: provider-managed, customer-managed, bring-your-own-key, or external key management?
  2. Who can decrypt logs under each model, and are decrypt and key-use events logged and exportable to your own systems?
  3. How does the platform provide tamper evidence or integrity protection for audit records, separate from encryption?
  4. What are the rotation and revocation procedures, and what happens to log readability when a key is revoked or lost?
  5. Can sensitive content in prompts, outputs, tool-call parameters, and retrieved context be redacted or minimized before logging?
  6. Can retention be configured per log type, and does it apply to backups and exports?

Consistent, attributable records come first

Encryption and key custody protect audit records, but the records themselves should be consistent and attributable to the agents that produced them. Runtime governance can support this for enterprise AI agents.

Review how your agent audit records are produced

Talk with our team about how runtime governance can support consistent, attributable audit logging for enterprise AI agents.

Talk to an Expert