External Mailbox (MCI Mailbox) Commands Spec

Overview

This document outlines the external mailbox commands that enable SoC agents to interact with the MCU via MCI mailbox. These commands support common Caliptra management functions, including querying firmware information, retrieving debug and attestation logs, exporting attested CSRs, utilizing cryptographic services, secure debug unlock, and in-field fuse provisioning.

  • Device Identification and Capabilities

    • Retrieve firmware versions and device capabilities to ensure compatibility and proper configuration.
  • Debugging and Diagnostics

    • Retrieve debug logs to analyze device behavior, diagnose issues, and monitor runtime states.
    • Clear logs to reset diagnostic data and maintain storage efficiency.
  • Certificate Management

    • Export attested Certificate Signing Requests (CSRs) for device keys to facilitate secure provisioning.
  • Cryptographic Services

    • AES encryption and decryption
    • SHA hashing
    • Random number generation
    • Digital signing
    • Signature verification
    • Key exchange
  • Debug Unlock Mechanisms

    • Facilitate secure debugging in production environments
    • Ensure controlled access to debugging features
  • In-Field Fuse Provisioning

Mailbox Commands List

NameCommand CodeDescription
MC_FIRMWARE_VERSION0x4D46_5756 ("MFWV")Retrieves the version of the target firmware.
MC_DEVICE_CAPABILITIES0x4D43_4150 ("MCAP")Retrieve the device capabilities.
MC_EXPORT_ATTESTED_CSR0x4D45_4143 ("MEAC")Exports an attested CSR for a specified device key, wrapped in a CoseSign1 structure.
MC_GET_ATTESTATION0x4D47_4154 ("MGAT")Retrieves signed attestation evidence in a requester-selected format.
MC_GET_CERT_CHAIN0x4D47_4343 ("MGCC")Reserved for future certificate-chain retrieval; not implemented.
MC_SET_CERT_CHAIN0x4D53_4343 ("MSCC")Reserved for future certificate-chain updates; not implemented.
MC_GET_LOG0x4D47_4C47 ("MGLG")Retrieves the debug log
MC_CLEAR_LOG0x4D43_4C47 ("MCLG")Clears the debug log
MC_FIPS_SELF_TEST_START0x4D46_5354 ("MFST")Starts the FIPS self-test to exercise the crypto engine.
MC_FIPS_SELF_TEST_GET_RESULTS0x4D46_4752 ("MFGR")Retrieves the results of the FIPS self-test.
MC_FIPS_PERIODIC_ENABLE0x4D46_5045 ("MFPE")Enables or disables periodic FIPS self-test.
MC_FIPS_PERIODIC_STATUS0x4D46_5053 ("MFPS")Retrieves the status of periodic FIPS self-test.
MC_SHA_INIT0x4D43_5349 ("MCSI")Starts the computation of a SHA hash of data.
MC_SHA_UPDATE0x4D43_5355 ("MCSU")Continues a SHA computation started by MC_SHA_INIT or another MC_SHA_UPDATE.
MC_SHA_FINAL0x4D43_5346 ("MCSF")Finalizes the computation of a SHA and produces the hash of all the data.
MC_HMAC0x4D43_484D ("MCHM")Computes an HMAC according to RFC 2104.
MC_HMAC_KDF_COUNTER0x4D43_4B43 ("MCKC")Computes HMAC KDF in Counter Mode as specified in NIST SP800-108.
MC_HKDF_EXTRACT0x4D43_4B54 ("MCKT")Implements HKDF-Extract as specified in RFC 5869.
MC_HKDF_EXPAND0x4D43_4B50 ("MCKP")Implements HKDF-Expand as specified in RFC 5869.
MC_AES_ENCRYPT_INIT0x4D43_4349 ("MCCI")Starts an AES encryption operation.
MC_AES_ENCRYPT_UPDATE0x4D43_4355 ("MCCU")Continues an AES encryption operation started by MC_AES_ENCRYPT_INIT.
MC_AES_DECRYPT_INIT0x4D43_414A ("MCAJ")Starts an AES-256 decryption operation.
MC_AES_DECRYPT_UPDATE0x4D43_4155 ("MCAU")Continues an AES decryption operation started by MC_AES_DECRYPT_INIT.
MC_AES_GCM_ENCRYPT_INIT0x4D43_4749 ("MCGI")Starts an AES-256-GCM encryption operation.
MC_AES_GCM_ENCRYPT_UPDATE0x4D43_4755 ("MCGU")Continues an AES-GCM encryption operation started by MC_AES_GCM_ENCRYPT_INIT.
MC_AES_GCM_ENCRYPT_FINAL0x4D43_4746 ("MCGF")Finalizes the AES-GCM encryption operation and produces the final ciphertext and tag.
MC_AES_GCM_DECRYPT_INIT0x4D43_4449 ("MCDI")Starts an AES-256-GCM decryption operation.
MC_AES_GCM_DECRYPT_UPDATE0x4D43_4455 ("MCDU")Continues an AES-GCM decryption operation started by MC_AES_GCM_DECRYPT_INIT.
MC_AES_GCM_DECRYPT_FINAL0x4D43_4446 ("MCDF")Finalizes the AES-GCM decryption operation and verifies the tag.
MC_ECDH_GENERATE0x4D43_4547 ("MCEG")Computes the first half of an Elliptic Curve Diffie-Hellman exchange.
MC_ECDH_FINISH0x4D43_4546 ("MCEF")Computes the second half of an Elliptic Curve Diffie-Hellman exchange.
MC_ECDSA_CMK_PUBLIC_KEY0x4D43_4550 ("MCEP")Generates an ECDSA public key from a CMK.
MC_ECDSA_CMK_SIGN0x4D43_4553 ("MCES")Creates an ECDSA signature using a CMK.
MC_ECDSA_CMK_VERIFY0x4D43_4556 ("MCEV")Validates an ECDSA signature using a CMK.
MC_MLDSA_CMK_PUBLIC_KEY0x4D4D_4C50 ("MMLP")Generates an ML-DSA public key from a CMK.
MC_MLDSA_CMK_SIGN0x4D4D_4C53 ("MMLS")Creates an ML-DSA signature using a CMK.
MC_MLDSA_CMK_VERIFY0x4D4D_4C56 ("MMLV")Validates an ML-DSA signature using a CMK.
MC_RANDOM_STIR0x4D43_5253 ("MCRS")Adds additional entropy to the internal deterministic random bit generator.
MC_RANDOM_GENERATE0x4D43_5247 ("MCRG")Generates random bytes from the internal RNG.
MC_IMPORT0x4D43_494D ("MCIM")Imports a specified key and returns a CMK for it.
MC_DELETE0x4D43_444C ("MCDL")Deletes the object stored with the given mailbox ID.
MC_CM_STATUS0x4D43_5354 ("MCST")Reports cryptographic mailbox key-storage usage.
MC_ECDSA384_SIG_VERIFY0x4D45_4356 ("MECV")Verifies an ECDSA P-384 signature.
MC_LMS_SIG_VERIFY0x4D4C_4D56 ("MLMV")Verifies an LMS signature.
MC_PROD_DEBUG_UNLOCK_REQ0x4D50_5552 ("MPUR")Requests debug unlock in a production environment.
MC_PROD_DEBUG_UNLOCK_TOKEN0x4D50_5554 ("MPUT")Sends the debug unlock token.
MC_GET_AUTH_CMD_CHALLENGE0x4D41_4343 ("MACC")Requests a challenge for security-sensitive commands.
MC_FUSE_INCREASE_CALIPTRA_MIN_SVN0x4D43_4D53 ("MCMS")Increases the minimum bootable Caliptra firmware SVN.
MC_FUSE_READ0x4946_5052 ("IFPR")See fuses spec for details
MC_FUSE_WRITE0x4946_5057 ("IFPW")See fuses spec for details
MC_FUSE_LOCK_PARTITION0x4946_504B ("IFPK")See fuses spec for details
MC_PROVISION_VENDOR_PK_HASH0x5056_504b ("PVPK")See fuses spec for details
MC_PROVISION_OWNER_PK_HASH0x504F_504B ("POPK")See fuses spec for details
MC_FE_PROG0x4D43_4650 ("MCFP")See fuses spec for details
MC_FUSE_REVOKE_VENDOR_PUB_KEY0x4D52_564B ("MRVK")See fuses spec for details
MC_FUSE_REVOKE_VENDOR_PK_HASH0x5256_4b48 ("RVKH")See fuses spec for details
MC_DEVICE_OWNERSHIP_TRANSFER0x0000_0011Device Ownership Transfer family; subcommand is carried in mailbox SRAM

Command Format

Common command payloads are defined in Caliptra Common Commands. This section lists the MCI mailbox command code for each common command and keeps mailbox-only command definitions in this document. MCI mailbox checksum, fips_status, and variable-length data_len fields are transport-specific response framing and are not part of the common command payload tables.

MC_DEVICE_OWNERSHIP_TRANSFER

All MCU Runtime DOT requests use MCI command register value 0x00000011. Mailbox SRAM begins with the normal checksum followed by a little-endian DOT FourCC and its payload.

Native:     checksum || DOT_FourCC || DOT_payload
Authorized: checksum || DOT_FourCC || DOT_payload || authorization_trailer

The authorized trailer is nonce[48] || ecc_pub_x[48] || ecc_pub_y[48] || mldsa_pub[2592] || HybridSignature. For authorized DOT commands the signed preimage is 0x00000011(BE) || DOT_FourCC(LE) || DOT_payload || nonce.

FourCCCommandClassification
MDLKLockAuthorized
MDDSDisableAuthorized
MDRTRotateAuthorized
MDBBGet backup blobAuthorized
MDUCUnlock challengeNative
MDULUnlockNative LAK signatures
MDSTStatusNative/read-only
MDRCRestore backup blobNative blob HMAC
DOTWOverride challengeNative fused recovery key
DOTXOverrideNative recovery-key signatures

Payload semantics match Caliptra SPDM VDM DOT commands.

For detailed command flows, state transitions, security properties, and use cases, see Device Ownership Transfer (DOT)

MC_FIRMWARE_VERSION

Retrieves the version of the target firmware.

Command Code: 0x4D46_5756 ("MFWV")

Payload semantics are defined by Firmware Version.

MCI mailbox response payload:

NameTypeDescription
chksumu32Response checksum.
fips_statusu32FIPS approved or an error.
data_lenu32Length in bytes of the valid version data.
versionu8[data_len]Firmware Version Number in ASCII format.

MC_DEVICE_CAPABILITIES

Retrieve the device capabilites.

Command Code: 0x4D43_4150 ("MCAP")

Payload semantics are defined by Device Capabilities.

MC_EXPORT_ATTESTED_CSR

Exports an attested Certificate Signing Request (CSR) for a specified device key.

Command Code: 0x4D45_4143 ("MEAC")

Payload semantics are defined by Export Attested CSR.

MC_GET_ATTESTATION

Retrieves signed attestation evidence bound to a requester-supplied nonce.

Command Code: 0x4D47_4154 ("MGAT")

Payload semantics, the evidence format values, and the format-discovery query are defined by Get Attestation.

MCI mailbox response payload:

NameTypeDescription
chksumu32Response checksum.
fips_statusu32FIPS approved or an error.
data_lenu32Length in bytes of evidence_format plus evidence.
evidence_formatu32Echo of the requested evidence_format.
evidenceu8[data_len-4]Signed evidence blob, or a u32 supported-format bitmap when responding to the query.

MC_GET_LOG

Retrieves the debug log for the MCU Runtime.

Command Code: 0x4D47_4C47 ("MGLG")

Payload semantics and debug log format are defined by Get Debug Log.

MCI mailbox request payload contains only the mailbox checksum header. The command always retrieves the MCU Runtime debug log.

MCI mailbox response payload:

NameTypeDescription
chksumu32Response checksum.
fips_statusu32FIPS approved or an error.
data_lenu32Length in bytes of more_data plus log_data.
more_datau321 if more log data remains, 0 otherwise.
log_datau8[data_len-4]Debug log contents.

MC_CLEAR_LOG

Clears the debug log in the MCU Runtime.

Command Code: 0x4D43_4C47 ("MCLG")

Payload semantics are defined by Clear Debug Log.

MC_FIPS_PERIODIC_ENABLE

Enables or disables periodic FIPS self-test. When enabled, the MCU runs FIPS self-tests in the background at a configurable interval (default: 60 seconds).

The periodic FIPS commands in this section are available only when MCU Runtime enables the periodic-fips-self-test feature. Builds without that feature report both commands as unsupported.

Command Code: 0x4D46_5045 ("MFPE")

Table: MC_FIPS_PERIODIC_ENABLE input arguments

NameTypeDescription
chksumu32Checksum over input data
enableu320 = disable, 1 = enable periodic test

Table: MC_FIPS_PERIODIC_ENABLE output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error.

MC_FIPS_PERIODIC_STATUS

Retrieves the status of the periodic FIPS self-test, including whether it is enabled, the number of completed iterations, and the result of the last test.

Command Code: 0x4D46_5053 ("MFPS")

Table: MC_FIPS_PERIODIC_STATUS input arguments

NameTypeDescription
chksumu32Checksum over input data

Table: MC_FIPS_PERIODIC_STATUS output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error.
enabledu320 = disabled, 1 = enabled
iterationsu32Number of completed periodic test iterations
last_resultu32Last test result: 0 = not run yet, 1 = pass, 2 = fail

MC_ECDSA384_SIG_VERIFY

Command Code: 0x4D45_4356 ("MECV")

Payload format and verification behavior are defined by Caliptra Core ECDSA384_SIGNATURE_VERIFY. MCU Runtime translates the MCI command code to the Caliptra Core command code and forwards the request and response payloads unchanged apart from recalculating their transport checksums.

Successful verification returns fips_status 0x5553_5244 (USRD) because the digest is caller-supplied. An invalid signature completes the MCI mailbox transaction with failure and no response payload.

MC_LMS_SIG_VERIFY

Command Code: 0x4D4C_4D56 ("MLMV")

Payload format, supported LMS parameters, and verification behavior are defined by Caliptra Core LMS_SIGNATURE_VERIFY.

Successful verification returns fips_status 0x5553_5244 (USRD) because the digest is caller-supplied.

MC_PROD_DEBUG_UNLOCK_REQ

Requests debug unlock in production environment.

Command Code: 0x4D50_5552 ("MPUR")

Payload semantics are defined by Request Debug Unlock.

MC_PROD_DEBUG_UNLOCK_TOKEN

Sends the debug unlock token.

Command Code: 0x4D50_5554 ("MPUT")

Payload semantics are defined by Authorize Debug Unlock Token.

MC_GET_AUTH_CMD_CHALLENGE

Command Code: 0x4D41_4343 ("MACC")

Payload semantics are defined by Get Auth Challenge. The MCI request appends flags:u32 and reserved:u32 after the mailbox checksum header; both fields are reserved and must be zero. The MCI response inserts a zero reserved:u32 between the mailbox response header and the common 48-byte challenge payload.

MC_FUSE_INCREASE_CALIPTRA_MIN_SVN

Increases the minimum bootable Caliptra firmware SVN.

Command Code: 0x4D43_4D53 ("MCMS")

Payload semantics are defined by Fuse Increase Caliptra Min SVN.

MC_FE_PROG

Programs field entropy for the selected fuse partition.

Command Code: 0x4D43_4650 ("MCFP")

Payload semantics are defined by Program Field Entropy.

MC_FUSE_READ

Reads fuse values.

Command Code: 0x4946_5052 ("IFPR")

Table: MC_FUSE_READ input arguments

NameTypeDescription
chksumu32
partitionu32Partition number to read from
entryu32Entry to read

Table: MC_FUSE_READ output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error
length (bits)u32Number of bits that are valid
datau8[...]Fuse data (length/8)

MC_FUSE_WRITE

Write fuse values.

Command Code: 0x4946_5057 ("IFPW")

Table: MC_FUSE_WRITE input arguments

NameTypeDescription
chksumu32
word_addru32Entry to write (word offset)
datau32Word to write
masku32Bit-Mask to only write specified bits

Table: MC_FUSE_WRITE output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • This command is idempotent, so that identical writes will have no effect.
  • Will fail if any of the existing data is 1 but is set to 0 in the input data.
  • Bits masked with mask will be ignored
  • Writes to buffered partitions will not take effect until the next reset.

MC_FUSE_LOCK_PARTITION

Lock a partition.

Command Code: 0x4946_504B ("IFPK")

Table: MC_FUSE_LOCK_PARTITION input arguments

NameTypeDescription
chksumu32
partitionu32Partition number to lock

Table: MC_FUSE_LOCK_PARTITION output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • This command is idempotent, so that locking a partition twice has no effect.
  • Locking a partition causes subsequent writes to it to fail.
  • Locking does not fully take effect until the next reset.

MC_PROVISION_VENDOR_PK_HASH

Provision a new vendor PK hash.

Command Code: 0x5056_504b ("PVPK")

Table: MC_PROVISION_VENDOR_PK_HASH input arguments

NameTypeDescription
chksumu32
slotu32The vendor PK hash slot to use
hash[u8; 48]New vendor PK hash

Table: MC_PROVISION_VENDOR_PK_HASH output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • Fails if the slot already contains data

MC_PROVISION_OWNER_PK_HASH

Provision CPTRA_SS_OWNER_PK_HASH using its 48-byte dword-reversed OTP representation.

Command Code: 0x504F_504B ("POPK")

Table: MC_PROVISION_OWNER_PK_HASH input arguments

NameTypeDescription
chksumu32
hash[u8; 48]New owner public-key hash

Table: MC_PROVISION_OWNER_PK_HASH output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • The all-zero hash is rejected.
  • Reprovisioning the identical hash is idempotent.
  • Provisioning a different hash after any owner-hash data has been burned is rejected.
  • After verifying the hash, the command burns and verifies bit 0 of CPTRA_SS_OWNER_PK_HASH_VALID for use as a commit marker by ROM versions that enforce it.
  • Current MCU ROM does not check CPTRA_SS_OWNER_PK_HASH_VALID before consuming the hash. Provisioning must not be interrupted by reset or power loss; an interruption can cause ROM to consume a partial hash and prevent retrying the intended hash.
  • The newly provisioned owner hash is consumed by MCU ROM on the next reset.

MC_FUSE_REVOKE_VENDOR_PUB_KEY

Revoke one vendor firmware verification key within a vendor PK hash slot.

Command Code: 0x4D52_564B ("MRVK")

Table: MC_FUSE_REVOKE_VENDOR_PUB_KEY input arguments

NameTypeDescription
chksumu32
reservedu32Reserved; must be zero
vendor_pk_hash_slotu32Vendor PK hash slot containing the key to revoke
key_typeu320 = ECDSA P-384, 1 = LMS, 2 = MLDSA-87
key_indexu32Key index within the selected key type's revocation field

Table: MC_FUSE_REVOKE_VENDOR_PUB_KEY output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • This command must be authorized.
  • The selected PK hash slot must be provisioned and valid.
  • The command fails if it targets the key used to boot the currently running firmware.
  • The last key index for a key type cannot be revoked.

MC_FUSE_REVOKE_VENDOR_PK_HASH

Revoke a vendor PK hash. Marks a vendor PK hash as invalid, revoking all of the associated keys.

Command Code: 0x5256_4b48 ("RVKH")

Table: MC_FUSE_REVOKE_VENDOR_PK_HASH input arguments

NameTypeDescription
chksumu32
vendor_pk_hash_slotu32Vendor PK hash slot to revoke

Table: MC_FUSE_REVOKE_VENDOR_PK_HASH output arguments

NameTypeDescription
chksumu32
fips_statusu32FIPS approved or an error

Caveats:

  • This command must be authorized.
  • This command is idempotent, so that revoking a slot twice has no effect.
  • Trying to revoke an empty slot will result in an error
  • Trying to revoke the PK hash slot used to boot the currently running firmware will result in an error

Cryptographic Command Format

The MCI mailbox cryptographic commands are mapped to their corresponding Caliptra Mailbox Cryptographic commands. The mapping is detailed in the table below. For the specific format of each command, refer to the Mailbox Commands: Cryptographic Mailbox (2.0).

Table: mapping MCI commands to Caliptra Core commands

MCI Mailbox CommandCaliptra Core Mailbox Command
MC_FIPS_SELF_TEST_STARTSELF_TEST_START
MC_FIPS_SELF_TEST_GET_RESULTSSELF_TEST_GET_RESULTS
MC_SHA_INITCM_SHA_INIT
MC_SHA_UPDATECM_SHA_UPDATE
MC_SHA_FINALCM_SHA_FINAL
MC_HMACCM_HMAC
MC_HMAC_KDF_COUNTERCM_HMAC_KDF_COUNTER
MC_HKDF_EXTRACTCM_HKDF_EXTRACT
MC_HKDF_EXPANDCM_HKDF_EXPAND
MC_AES_ENCRYPT_INITCM_AES_ENCRYPT_INIT
MC_AES_ENCRYPT_UPDATECM_AES_ENCRYPT_UPDATE
MC_AES_DECRYPT_INITCM_AES_DECRYPT_INIT
MC_AES_DECRYPT_UPDATECM_AES_DECRYPT_UPDATE
MC_AES_GCM_ENCRYPT_INITCM_AES_GCM_ENCRYPT_INIT
MC_AES_GCM_ENCRYPT_UPDATECM_AES_GCM_ENCRYPT_UPDATE
MC_AES_GCM_ENCRYPT_FINALCM_AES_GCM_ENCRYPT_FINAL
MC_AES_GCM_DECRYPT_INITCM_AES_GCM_DECRYPT_INIT
MC_AES_GCM_DECRYPT_UPDATECM_AES_GCM_DECRYPT_UPDATE
MC_AES_GCM_DECRYPT_FINALCM_AES_GCM_DECRYPT_FINAL
MC_ECDH_GENERATECM_ECDH_GENERATE
MC_ECDH_FINISHCM_ECDH_FINISH
MC_ECDSA_CMK_PUBLIC_KEYCM_ECDSA_PUBLIC_KEY
MC_ECDSA_CMK_SIGNCM_ECDSA_SIGN
MC_ECDSA_CMK_VERIFYCM_ECDSA_VERIFY
MC_ECDSA384_SIG_VERIFYECDSA384_SIGNATURE_VERIFY
MC_LMS_SIG_VERIFYLMS_SIGNATURE_VERIFY
MC_MLDSA_CMK_PUBLIC_KEYCM_MLDSA_PUBLIC_KEY
MC_MLDSA_CMK_SIGNCM_MLDSA_SIGN
MC_MLDSA_CMK_VERIFYCM_MLDSA_VERIFY
MC_RANDOM_STIRCM_RANDOM_STIR
MC_RANDOM_GENERATECM_RANDOM_GENERATE
MC_IMPORTCM_IMPORT
MC_DELETECM_DELETE
MC_CM_STATUSCM_STATUS