05Trusted execution and attestation
  1. 01Introduction
  2. 02System overview
  3. 03Cryptographic foundations
  4. 04The confidential Ledger
  5. 05Trusted execution and attestation
  6. 06Threshold keys and the Escape
  7. 07The Crossing engine
  8. 08Unlinkability
  9. 09Solana program engineering
  10. 10The Coprocessor and the off-chain stack
  11. 11Selective disclosure and Receipts
  12. 12Economics and $PRV

Chapter 5

Trusted execution and attestation

The Coprocessor is the one component of Privium that sees plaintext: it decrypts Intents and Ledger leaves, crosses orders, and re-encrypts the result. This chapter makes that power checkable. It follows an Intel TDX quote from the CPU’s measurement registers to the Intel root, binds the Coprocessor’s keys to its measured code through REPORTDATA, registers those keys on Solana by verifying the quote’s ECDSA-P256 signatures with the secp256r1 precompile, and checks an Ed25519 signature on every Commit against them. It closes with AWS Nitro Enclaves, reproducible builds, key epochs, sealing through the Council, and upgrade by re-attestation. Threshold mechanics are in Chapter 6; the Ledger state the enclave signs is in Chapter 4.

5.1 The Coprocessor’s trust model

Encifher computes over encrypted Solana state inside a hardware Trusted Execution Environment, posts attested Merkle-anchored outputs, verifies enclave attestation on chain, and spreads key custody across a threshold committee so that no single enclave holds a master key [1]. Privium adopts that division of trust and makes each part explicit.

A Trusted Execution Environment here is a hardware-isolated execution context with three properties. Isolation: code and memory inside are inaccessible to the host, hypervisor and operator; Intel TDX runs each Trust Domain (TD) as a hardware-isolated virtual machine whose CPU state a TDX module in a dedicated CPU mode (SEAM) keeps from other software, with memory encrypted by the processor [2]. Measurement: the hardware records digests of what was loaded, which software can extend but never rewrite. Attestation: the hardware signs a statement binding the measurements to 64 bytes chosen by the code inside, verifiable by anyone who trusts the vendor’s root key. The Coprocessor’s guarantees reduce to these properties plus standard cryptographic assumptions:

Guarantee What it rests on
Every Commit the Pool accepts was produced by code whose measurement is in the Registry TDX isolation and measurement, the Intel attestation root, EUF-CMA of ECDSA-P256 and Ed25519, collision resistance of SHA-256 (Theorems 5.1 and 5.2)
The Coprocessor’s signing and decryption keys exist only inside admitted enclaves TDX isolation, the audited reproducible build (Section 5.7), and an honest threshold of the Council for keys released across machines (Section 5.8, Chapter 6)
Intents and Ledger plaintext are confidential to admitted enclaves the two rows above, and IND-CCA2 security of HPKE and AES-256-GCM (Chapter 3)
Funds remain claimable if every enclave stops the Escape, which depends on the Council and the last committed root, not on the enclave (Chapter 6)

Attestation protects confidentiality and the authenticity of state transitions; custody never depends on the enclave staying alive.

5.2 Measurement and the chain of trust

Measurement registers

A TD Quote reports the measurement registers of the TD and of the TDX module itself. The fields relevant to Privium are taken from the version 4 TD Quote Body [3]:

  • MRTD (48 bytes, SHA-384): the initial contents of the TD, here the virtual firmware.
  • RTMR0 to RTMR3 (48 bytes each, SHA-384): runtime-extendable registers; by convention RTMR0 and RTMR1 are extended by the firmware, RTMR2 by the operating system and RTMR3 by the workload owner [3].
  • TDATTRIBUTES (8 bytes): bit 0 is DEBUG; when set, the host can read the TD’s CPU state and private memory and the TD is untrusted [3].
  • XFAM (8 bytes): the extended CPU features available to the TD.
  • REPORTDATA (64 bytes): data chosen by the TD, covered by the quote signature [3].

An RTMR starts at zero and is changed only by an extend operation, which replaces it with the SHA-384 digest of its old value concatenated with a 48-byte input [5]:

RTMRj←SHA384(RTMRj ∥ d).(5.1)\mathsf{RTMR}_j \leftarrow \mathrm{SHA384}\big(\mathsf{RTMR}_j \,\|\, d\big). \tag{5.1}

Writing hi=SHA384(hi−1∥di)h_i = \mathrm{SHA384}(h_{i-1} \| d_i) from h0=0384h_0 = 0^{384}, if two different extend sequences reach the same value, then walking both chains back from the end, the first step whose inputs (hi−1,di)(h_{i-1}, d_i) differ while outputs agree is a SHA-384 collision; the register commits to the whole ordered boot log.

Privium’s measurement vector

Privium boots the Coprocessor as a minimal TD: virtual firmware, a kernel and an initramfs that contains the statically linked Coprocessor binary and nothing that reads further code from disk. We define the measurement vector

M=(MRTD, RTMR0, RTMR1, RTMR2, XFAM),(5.2)M = \big(\mathsf{MRTD},\ \mathsf{RTMR}_0,\ \mathsf{RTMR}_1,\ \mathsf{RTMR}_2,\ \mathsf{XFAM}\big), \tag{5.2}

and the Registry stores a set M\mathcal{M} of admitted vectors. The Coprocessor never extends RTMR3 and reads no owner configuration, so RTMR3, MRCONFIGID, MROWNER and MROWNERCONFIG must be zero: any runtime extension or operator-supplied configuration changes the quote and fails admission.

The chain of trust runs as follows. The Intel SGX Root CA certifies a PCK Platform or Processor CA, which certifies the Provisioning Certification Key (PCK) of one processor package; every certificate is X.509 with ecdsa-with-SHA256 over P-256 (prime256v1) keys [4]. The PCK, held only by the Intel-signed Provisioning Certification Enclave (PCE), signs the report of the TD Quoting Enclave (TDQE), whose data field holds the SHA-256 digest of the Attestation Key (AK); the AK, a P-256 key generated inside the TDQE, signs the quote header and body, which carry MM and REPORTDATA, which in turn carries the digest of the Coprocessor’s keys (Section 5.4) [3]. A second branch, the TCB Signing certificate under the same root, signs the TCB Info and QE Identity collateral that state which TCB levels and TDQE builds are current [3][4].

5.3 The TDX quote and its signing chain

A version 4 TD Quote has a fixed-length prefix and a variable-length signature section [3]. All integers are little-endian.

Region Offset Size (bytes) Content
Header 0 48 version = 4, attestation key type = 2 (ECDSA-256 with P-256), TEE type = 0x81 (TDX), QE vendor ID, user data
TD Quote Body 48 584 TEE_TCB_SVN, MRSEAM, MRSIGNERSEAM, SEAMATTRIBUTES, TDATTRIBUTES (at 168), XFAM, MRTD (at 184), MRCONFIGID, MROWNER, MROWNERCONFIG, RTMR0 to RTMR3 (from 376), REPORTDATA (at 568)
Signature data length 632 4 length LL of what follows
Quote signature 636 64 ECDSA P-256 by the AK over bytes [0,632)[0, 632), r∥sr \| s
AK public key 700 64 x∥yx \| y
QE certification data 764 variable type 6: the 384-byte TDQE report, its 64-byte PCK signature, QE authentication data, then type 5: the PEM PCK certificate chain

Body offsets follow from the field sizes in [3]. The TDQE report is an SGX report body whose MRSIGNER (offset 128), ISVPRODID (256), ISVSVN (258) and REPORTDATA (320) identify the quoting enclave; its REPORTDATA is SHA256(AK∥auth)∥0256\mathrm{SHA256}(\mathsf{AK} \| \mathsf{auth}) \| 0^{256} [3].

Definition 5.1 (Quote acceptance). Given quote QQ, collateral coll\mathsf{coll} (PCK chain, TCB Info, QE Identity, CRLs), admitted set M\mathcal{M} and expected value rd⋆rd^\star, Accept(Q,coll,M,rd⋆)\mathsf{Accept}(Q, \mathsf{coll}, \mathcal{M}, rd^\star) holds if and only if:

  1. the header has version 4, key type 2 and TEE type 0x81;
  2. the PCK certificate chains to the pinned Intel root key, no certificate in the chain is revoked, and the TCB level derived from TEE_TCB_SVN and the PCK certificate is current under TCB Info;
  3. the TDQE report verifies under the PCK, and its MRSIGNER, ISVPRODID and ISVSVN satisfy QE Identity;
  4. SHA256(AK∥auth)∥0256\mathrm{SHA256}(\mathsf{AK} \| \mathsf{auth}) \| 0^{256} equals the TDQE report’s REPORTDATA;
  5. the quote signature verifies under AK\mathsf{AK} over Q[0,632)Q[0, 632);
  6. TDATTRIBUTES bit 0 (DEBUG) is zero, MRCONFIGID, MROWNER, MROWNERCONFIG and RTMR3 are zero, and M(Q)∈MM(Q) \in \mathcal{M};
  7. the REPORTDATA field of QQ equals rd⋆rd^\star.

Intel’s own Quote Verification Library performs checks 1 to 5 and leaves the content checks in 6 and 7 to the verifier [3]. Privium performs all seven on chain, split across platform admission and quote admission (Section 5.5).

ECDSA signatures are malleable, and the secp256r1 precompile rejects signatures whose ss exceeds half the group order [8][10]. The quote format places no low-S requirement on its signers [3], so the relayer normalizes ss before submission. The following lemma shows this leaves every signature in the chain valid.

Lemma 5.1 (Low-S normalization). Let n256n_{256} be the order of the P-256 group and (r,s)(r, s) a valid ECDSA signature on digest zz under public key PP. Then (r,n256−s)(r, n_{256} - s) is also valid, and exactly one of s,n256−ss, n_{256} - s is at most ⌊n256/2⌋\lfloor n_{256}/2 \rfloor.

Proof. Verification computes R′=s−1z⋅G256+s−1r⋅PR' = s^{-1} z \cdot G_{256} + s^{-1} r \cdot P and accepts if x(R′)≡r(modn256)x(R') \equiv r \pmod{n_{256}}. Replacing ss by −s mod n256-s \bmod n_{256} replaces R′R' by −R′-R', which has the same xx-coordinate. Since n256n_{256} is odd and s≠0s \neq 0, exactly one of ss and n256−sn_{256} - s lies in [1,⌊n256/2⌋][1, \lfloor n_{256}/2 \rfloor]. □\square

The precompile also takes the public key in 33-byte SEC1 compressed form [8][10], while the quote carries the AK as 64 bytes x∥yx \| y. Compression is cmp(x,y)=(0x02+(y mod 2))∥x\mathsf{cmp}(x, y) = (\texttt{0x02} + (y \bmod 2)) \| x; the program recomputes it from the AK it already trusts, so no new trust enters.

5.4 Binding keys to the measurement

At the start of key epoch ee, a Coprocessor instance generates three key pairs inside the TD from the CPU’s hardware random source:

  • (skC,pkC)(sk_C, pk_C), Ed25519: signs Crossing opens, Residual orders and Commits (Chapter 9) and Receipts (Chapter 11), each message under its own domain tag;
  • (dkC,ekC)(dk_C, ek_C), X25519: the HPKE recipient key to which traders seal Intents, deposit notes and account registration (Chapter 3);
  • (yE,YE=yEG)(y_E, Y_E = y_E G) in G\mathbb{G}: the key to which the Council re-encrypts the Ledger data key on release (Section 5.8, Chapter 6).

It binds them to the quote by setting

rd=H("privium/attest/v1" ∥ idmathrmprog ∥ e ∥ σ ∥ ησ ∥ pkC ∥ ekC ∥ YE) ∥ 0256,(5.3)rd = \mathsf{H}\big(\texttt{"privium/attest/v1"} \,\|\, \mathsf{id}_{mathrm{prog}} \,\|\, e \,\|\, \sigma \,\|\, \eta_\sigma \,\|\, pk_C \,\|\, ek_C \,\|\, Y_E\big) \,\|\, 0^{256}, \tag{5.3}

where H\mathsf{H} is SHA-256 (a Solana syscall, so the program recomputes (5.3) cheaply), idprog\mathsf{id}_{\mathrm{prog}} is the Pool program ID, and (σ,ησ)(\sigma, \eta_\sigma) is a recent slot and its slot hash. All fields have fixed length, so the encoding is injective; the zero half mirrors Intel’s convention for the AK digest [3].

use curve25519_dalek::{constants::RISTRETTO_BASEPOINT_POINT as G, Scalar};
use sha2::{Digest, Sha256};

pub const ATTEST_DOMAIN: &[u8; 17] = b"privium/attest/v1";

pub struct EpochKeys {
    pub commit: ed25519_dalek::SigningKey,   // sk_C
    pub intent: x25519_dalek::StaticSecret,  // dk_C
    pub release: Scalar,                     // y_E
}

pub struct Anchor { pub program_id: [u8; 32], pub epoch: u64, pub slot: u64, pub slot_hash: [u8; 32] }

impl EpochKeys {
    pub fn public(&self) -> ([u8; 32], [u8; 32], [u8; 32]) {
        (
            self.commit.verifying_key().to_bytes(),
            x25519_dalek::PublicKey::from(&self.intent).to_bytes(),
            (self.release * G).compress().to_bytes(),
        )
    }

    /// Equation (5.3).
    pub fn report_data(&self, a: &Anchor) -> [u8; 64] {
        let (pk_c, ek_c, y_e) = self.public();
        let digest = Sha256::new()
            .chain_update(ATTEST_DOMAIN)
            .chain_update(a.program_id)
            .chain_update(a.epoch.to_le_bytes())
            .chain_update(a.slot.to_le_bytes())
            .chain_update(a.slot_hash)
            .chain_update(pk_c)
            .chain_update(ek_c)
            .chain_update(y_e)
            .finalize();
        let mut rd = [0u8; 64];
        rd[..32].copy_from_slice(&digest);
        rd
    }
}

The enclave passes report_data to the TDREPORT call, and the host’s TDQE turns the report into a signed quote. The binding ties each public key to the measured code that generated it and ties the quote to a point in chain time.

Lemma 5.2 (Key binding). A tuple (idmathrmprog′,e′,σ′,η′,pk′,ek′,Y′)(\mathsf{id}'_{mathrm{prog}}, e', \sigma', \eta', pk', ek', Y') that differs from a TD’s inputs yet yields the same rdrd is a SHA-256 collision, since the fixed-width encoding is injective. □\square

Lemma 5.3 (Freshness). If the program accepts rdrd only when ησ\eta_\sigma equals the SlotHashes entry for slot σ\sigma, the quote was generated after slot σ\sigma was produced.

Proof. Computing rdrd requires ησ\eta_\sigma, a hash of bank state that no party can compute before the slot exists. SlotHashes keeps the latest 512 entries [12], so the program checks the anchor at staging, while it is recorded. □\square

5.5 On-chain registration

Registration turns a quote into an EnclaveKey record (e,pkC,ekC,YE,M)(e, pk_C, ek_C, Y_E, M) with the validity interval [ eEkey, (e+1)Ekey)[\,eE_{\mathrm{key}},\ (e+1)E_{\mathrm{key}}) in slots of its epoch (Section 5.8); the record stays on chain after its epoch ends, so signatures made under it remain checkable. The PCK chain and collateral change only when Intel publishes new collateral or a machine joins, while quotes come every key epoch, so Privium splits registration into platform admission (per processor package and collateral period) and quote admission (per enclave and epoch).

Platform admission

Platform admission covers check 2 and the QE Identity part of check 3: X.509 chain, CRLs, TCB Info. These are kilobytes of DER and JSON, while the precompile verifies only messages carried in the same transaction (size limits in Chapter 9). Privium runs the standard DCAP collateral checks in a zero-knowledge virtual machine and posts a Groth16 proof with public inputs

(H(RootCA), cmp(PCK), FMSPC, tcbStatus, qeIdentity, texp),\big(\mathsf{H}(\mathsf{RootCA}),\ \mathsf{cmp}(\mathsf{PCK}),\ \mathsf{FMSPC},\ \mathsf{tcbStatus},\ \mathsf{qeIdentity},\ t_{\mathrm{exp}}\big),

where texpt_{\mathrm{exp}} is the earliest nextUpdate across the collateral. The program verifies the proof with the alt_bn128 syscalls, which the groth16-solana verifier does in under 200,000 compute units [13], checks that H(RootCA)\mathsf{H}(\mathsf{RootCA}) equals the constant compiled into the program, and writes a Platform account keyed by the PCK hash. The account is valid until texpt_{\mathrm{exp}} and only while tcbStatus\mathsf{tcbStatus} is UpToDate. Automata’s DCAP verifier follows the same zkVM route on other chains [14].

Quote admission with the secp256r1 precompile

Solana’s secp256r1 program (Secp256r1SigVerify1111111111111111111111111, SIMD-0075) verifies ECDSA over P-256 with SHA-256 [8]. Its feature gate srremy31J5Y25FrAApwVb9kZcfXbusYMMsvTK9aWv5q is active on mainnet-beta, with activation recorded at slot 345,600,000 in the feature account (read 2026-11-16) [9]. Its instruction data is a count byte, a padding byte, then per signature seven little-endian u16 fields (signature, public key and message offsets with their instruction indices, and the message length), so data begins at byte 16; signatures are 64 bytes and keys 33-byte compressed points, and an index of 0xFFFF points into the precompile instruction itself [8][10]. The Ed25519 program (Ed25519SigVerify111111111111111111111111111, live on mainnet-beta [9]) uses the same layout with 32-byte keys [11].

Privium uses one pattern for both: exactly one signature, all three indices 0xFFFF, and the program reads key and message back out of the precompile instruction through the Instructions sysvar. Since it never trusts offsets into its own data, no offset trick can make the precompile verify one message while the program parses another (general pattern and cost in Chapter 9).

Quote admission runs in three transactions:

  1. Stage. The relayer submits (e,σ,pkC,ekC,YE)(e, \sigma, pk_C, ek_C, Y_E). The program checks ησ\eta_\sigma against SlotHashes, computes rd⋆rd^\star by (5.3), and creates a pending EnclaveKey account holding it.
  2. QE. A secp256r1 instruction verifies the PCK signature over the 384-byte TDQE report. The program checks that the key equals the Platform account’s PCK, that MRSIGNER, ISVPRODID and ISVSVN satisfy its QE Identity, and that the report’s last 32 REPORTDATA bytes are zero; it records hAKh_{\mathsf{AK}}, the first 32.
  3. Quote. A secp256r1 instruction verifies the AK signature over the 632-byte prefix. The program checks the prefix against Definition 5.1, items 1, 6 and 7, and checks SHA256(AK∥auth)=hAK\mathrm{SHA256}(\mathsf{AK} \| \mathsf{auth}) = h_{\mathsf{AK}}.

The third transaction is the largest: 745 bytes of precompile data (16-byte header, signature, compressed key, 632-byte prefix) plus a program instruction carrying the AK’s yy-coordinate, a discriminator and the QE authentication data (est. 44 bytes plus that data), sent as a v1 transaction, whose 4,096-byte limit Chapter 9 cites (est.). The AK’s xx-coordinate is read from the compressed key, not resent.

// Accounts: registry, platform (current), staged EnclaveKey (Stage::QeVerified), Instructions sysvar.
pub fn admit_quote(ctx: Context<AdmitQuote>, ak_y: [u8; 32], qe_auth: Vec<u8>) -> Result<()> {
    let v = precompiled(&ctx.accounts.ixs, &SECP256R1_ID)?; // one sig, all indices 0xFFFF
    let q = v.message;
    require!(q.len() == 632, PrivErr::QuoteFormat);
    require!(u16le(q, 0) == 4 && u16le(q, 2) == 2 && u32le(q, 4) == 0x81, PrivErr::QuoteFormat);

    // The precompile's key must be the AK certified in the QE step.
    let ak_x: [u8; 32] = v.pubkey[1..33].try_into().unwrap();
    require!(v.pubkey[0] == 0x02 + (ak_y[31] & 1), PrivErr::AkEncoding);
    let h_ak = hashv(&[&ak_x, &ak_y, &qe_auth]).to_bytes();
    let k = &mut ctx.accounts.staged;
    require!(h_ak == k.ak_hash, PrivErr::AkBinding);

    // Content checks: Definition 5.1, items 6 and 7.
    require!(q[168] & 0x01 == 0, PrivErr::DebugTd);
    require!(is_zero(&q[232..376]) && is_zero(&q[520..568]), PrivErr::OwnerFields);
    let m = Measurement::from_quote(q); // MRTD, RTMR0..2, XFAM
    require!(ctx.accounts.registry.admits(&m), PrivErr::Measurement);
    require!(q[568..632] == k.report_data, PrivErr::ReportData);

    k.measurement = m.digest();
    k.stage = Stage::Admitted;
    emit!(EnclaveAdmitted { epoch: k.epoch, commit_key: k.commit_key, measurement: k.measurement });
    Ok(())
}

precompiled loads the instruction immediately before the current one, checks its program ID, requires a count of one and all three indices equal to 0xFFFF, and returns the key and message slices at the stated offsets. Quote offsets 232 to 376 cover MRCONFIGID, MROWNER and MROWNERCONFIG; 520 to 568 is RTMR3. An admitted key becomes the active Commit key at the start of epoch ee (Section 5.8).

Theorem 5.1 (Admission soundness). Assume (A1) the TDX module, TDQE and PCE behave as Intel specifies and PCK private keys never leave the PCE; (A2) ECDSA-P256 is EUF-CMA; (A3) SHA-256 is collision resistant; (A4) the platform-admission proof system is knowledge-sound. If the Registry marks (e,pkC,ekC,YE)(e, pk_C, ek_C, Y_E) as admitted, then, except with probability at most qs⋅AdvP256euf+AdvSHA256cr+Advksq_s \cdot \mathbf{Adv}^{\mathrm{euf}}_{\mathrm{P256}} + \mathbf{Adv}^{\mathrm{cr}}_{\mathrm{SHA256}} + \mathbf{Adv}^{\mathrm{ks}}, where qsq_s is the number of P-256 keys in the chain, a TD with DEBUG clear and measurement M∈MM \in \mathcal{M} ran on a current, Intel-certified platform after slot σ\sigma and placed exactly (pkC,ekC,YE)(pk_C, ek_C, Y_E) in its REPORTDATA.

Proof sketch. Game hops from the real game G0G_0. G1G_1 aborts if the Platform PCK does not chain to the pinned root under current collateral: by (A4) a witness chain is extractable, and an accepting chain without genuine issuance contains a forgery under an Intel CA key. G2G_2 aborts if an accepted TDQE report was never signed by the PCE, which by (A1) is a PCK forgery. G3G_3 aborts if the accepted AK differs from the one the TDQE certified, a SHA-256 collision on hAKh_{\mathsf{AK}}. G4G_4 aborts if the accepted 632-byte prefix was never signed by that TDQE; by (A1) the TDQE signs only bodies the TDX module produced for a real TD, so this is an AK forgery. In G4G_4 the MM, DEBUG bit and REPORTDATA are those of a real TD; Lemmas 5.2 and 5.3 finish. Summing the hops gives the bound. □\square

Per-Commit signatures with the Ed25519 program

Quote verification happens once per epoch. Each Commit needs only an Ed25519 check against the admitted pkCpk_C. The Coprocessor signs the Commit digest

μ(k)=privium/commit/v1 ∥ idprog ∥ e ∥ k ∥ ρ(k−1) ∥ ρ(k) ∥ body(k),(5.4)\mu^{(k)} = \texttt{privium/commit/v1} \,\|\, \mathsf{id}_{\mathrm{prog}} \,\|\, e \,\|\, k \,\|\, \rho^{(k-1)} \,\|\, \rho^{(k)} \,\|\, \mathsf{body}^{(k)}, \tag{5.4}

the Commit message MkM_k of Chapter 4 (Equation 4.6), where body(k)\mathsf{body}^{(k)} is the public part of the Commit laid out in Chapter 9 (Equation 9.1). Ed25519 hashes the message internally, so the program reads the fields from the signed bytes themselves. The signature travels in an Ed25519 program instruction before the Commit instruction, not as a transaction signer, so any relayer can submit the Commit, and the root it certifies is what a Receipt later points to (Chapter 11).

pub fn check_commit_signature(
    ixs: &AccountInfo,
    active: &EnclaveKey,
    prev_root: &[u8; 32],
    new_root: &[u8; 32],
    k: u64,
    slot: u64,
) -> Result<Vec<u8>> {
    require!(active.stage == Stage::Admitted, PrivErr::Stage);
    require!(active.valid_from <= slot && slot < active.valid_until, PrivErr::KeyExpired);
    let v = precompiled(ixs, &ed25519_program::ID)?; // one sig, all indices 0xFFFF
    require!(v.pubkey == active.commit_key.as_ref(), PrivErr::CommitKey);

    let prefix = [
        b"privium/commit/v1".as_slice(),
        crate::ID.as_ref(),
        &active.epoch.to_le_bytes(),
        &k.to_le_bytes(),
        prev_root,
        new_root,
    ]
    .concat();
    require!(v.message.starts_with(&prefix), PrivErr::CommitDigest);
    Ok(v.message[prefix.len()..].to_vec())                 // body^(k), parsed by the Commit
}

Theorem 5.2 (Commit authenticity). Assume Theorem 5.1, EUF-CMA of Ed25519, and TDX isolation of skCsk_C inside the admitted TD. If the Pool accepts a Commit with index kk in epoch ee, then an admitted enclave of epoch ee signed μ(k)\mu^{(k)} for exactly this (ρ(k−1),ρ(k),body(k))(\rho^{(k-1)}, \rho^{(k)}, \mathsf{body}^{(k)}), except with probability AdvEd25519euf\mathbf{Adv}^{\mathrm{euf}}_{\mathrm{Ed25519}} beyond the bound of Theorem 5.1.

Proof sketch. By Theorem 5.1 the key the program compares against was generated in an admitted TD, and by isolation skCsk_C never left it. A valid signature on a μ(k)\mu^{(k)} the enclave never signed is a forgery. The fields of μ(k)\mu^{(k)} have fixed widths and the body has a fixed layout, so one message names one tuple of arguments. Because μ(k)\mu^{(k)} contains ρ(k−1)\rho^{(k-1)}, kk, ee and idprog\mathsf{id}_{\mathrm{prog}}, a signature cannot be replayed onto another root, index, epoch or deployment. □\square

Conservation is checked in the same transaction against vault balances and the commitment accumulators (Chapter 4), so an accepted Commit is both authentic and conserving.

5.6 AWS Nitro Enclaves as a second platform

AWS Nitro Enclaves satisfies the same model with a different chain. The Nitro Hypervisor issues a CBOR attestation document signed as COSE_Sign1 with ECDSA P-384 (COSE -35), containing a timestamp, SHA-384 PCRs, the signing certificate, a CA bundle, and optional public_key, user_data and nonce fields of up to 1,024 bytes each [6]. The root is the 30-year AWS Nitro Enclaves Root-G1 certificate, pinned by its published SHA-256 fingerprint [6]. PCR0, PCR1 and PCR2 measure the image, kernel and application and are printed by nitro-cli build-enclave; debug-mode enclaves report all-zero PCRs [7].

Intel TDX AWS Nitro Enclaves
Isolation unit Trust Domain (VM) enclave carved from an EC2 instance
Code measurement MRTD, RTMR0 to RTMR2 (SHA-384) PCR0 to PCR2 (SHA-384)
Debug signal TDATTRIBUTES bit 0 all-zero PCRs
Key binding field REPORTDATA, 64 bytes user_data, up to 1,024 bytes
Signing chain P-256 ECDSA, Intel SGX Root CA P-384 ECDSA, AWS Nitro Root-G1
On-chain path platform proof, then secp256r1 precompile per quote Groth16 proof per document

On Nitro, M=(PCR0,PCR1,PCR2)M = (\mathsf{PCR}_0, \mathsf{PCR}_1, \mathsf{PCR}_2) and user_data carries rdrd from (5.3). Signatures over P-384 take the zkVM route: a Groth16 proof attests that the COSE signature and chain verify to the pinned Root-G1 and outputs (M,user_data,timestamp)(M, \mathsf{user\_data}, \mathsf{timestamp}). Everything after admission is identical. Running both platforms gives the Registry two independent hardware roots, and the Council can release keys only to code admitted on both.

5.7 Reproducible builds

A measurement in M\mathcal{M} is meaningful only if anyone can derive it from source. A build is reproducible when, given the same source, build environment and instructions, any party can recreate bit-for-bit identical artifacts [15]. Privium’s Coprocessor image is built that way:

  1. The toolchain is pinned by content hash: the Rust compiler, the C toolchain for the kernel, and every crate through Cargo.lock with vendored sources.
  2. The binary is statically linked with fixed codegen units, SOURCE_DATE_EPOCH, path remapping and no build IDs, so the output is independent of the build machine.
  3. The kernel, initramfs and firmware are assembled by a script that sorts entries and zeroes timestamps.
  4. A measurement tool replays the firmware’s and loader’s extend sequence over the artifacts using (5.1) and prints MM.

The Registry stores, next to each M∈MM \in \mathcal{M}, the source commit and the build manifest digest; a reviewer builds, measures and compares. Theorem 5.1 then speaks about source code rather than an opaque binary: the keys in the Registry were generated by the reviewed program. Chapter 10 describes the build pipeline.

5.8 Key epochs, rotation and sealing

Epochs

Keys live for one epoch of EkeyE_{\mathrm{key}} slots, recommended Ekey=216,000E_{\mathrm{key}} = 216{,}000 (parameter): re-attestation costs a handful of transactions, so a short epoch is cheap and picks up new TCB collateral promptly. For each Coprocessor instance the Registry lists the record of epoch ee and at most one staged record for e+1e + 1, so the two instances of Chapter 10 keep at most four keys live; the Pool accepts a signature only under a key whose validity interval contains the current slot. SDKs read ekCek_C from the Registry; Intents to the previous key are accepted for one batch interval Δ\Delta past the boundary, after which the enclave erases dkCdk_C.

Sealing through the Council

The Coprocessor holds one long-lived secret: the Ledger data key kLk_L, the AES-256-GCM key under which Ledger ciphertexts are encrypted (Chapter 4). Hardware sealing would bind kLk_L to one machine, which makes failover and upgrade depend on that machine. Privium seals kLk_L to the Council instead. At genesis the first admitted enclave samples kLk_L and publishes a wrapped form

wrap(kL)=(c1, AE.Enc(H(c1∥Z), kL)),c1=rPC,Z=rH,(5.5)\mathsf{wrap}(k_L) = \big(c_1,\ \mathsf{AE}.\mathsf{Enc}(\mathsf{H}(c_1 \| Z),\ k_L)\big),\qquad c_1 = rP_{\mathcal{C}},\quad Z = rH, \tag{5.5}

where PC=s−1HP_{\mathcal{C}} = s^{-1}H is the Council’s public key (Chapter 6), so that sc1=Zs c_1 = Z. A later enclave obtains kLk_L by re-encryption: Council members check on chain that YEY_E belongs to an admitted Registry record, each publishes a share re-encrypting the handle c1c_1 from PCP_{\mathcal{C}} to YEY_E with a proof, and the enclave combines tt shares into A=κGA = \kappa G, B=sc1+κYEB = sc_1 + \kappa Y_E and recovers Z=sc1=B−yEAZ = sc_1 = B - y_E A (protocol and proofs in Chapter 6). So kLk_L is available exactly to enclaves whose measurement is in M\mathcal{M}, under enclave isolation and an honest threshold of the Council. AWS KMS offers a PCR-conditioned analog on Nitro [7]; Privium uses the Council path on both platforms so one mechanism governs release everywhere.

Rotation scopes every key to one epoch: an epoch’s skCsk_C signs only inside that epoch’s validity interval, each still subject to the conservation checks, and its dkCdk_C opens only that epoch’s Intents.

5.9 Upgrade by re-attestation

Code changes enter Privium only as new measurements. An upgrade is the following sequence.

  1. Propose. The upgrade authority (Chapter 9) submits M′M' with its source commit and manifest digest, pending until sact=snow+Tups_{\mathrm{act}} = s_{\mathrm{now}} + T_{\mathrm{up}}, recommended Tup=2WT_{\mathrm{up}} = 2W (parameter): every trader can reproduce M′M' and, if they choose, Exit under the current code before M′M' can receive any key.
  2. Activate. After sacts_{\mathrm{act}}, M′∈MM' \in \mathcal{M}; new enclaves are admitted by Section 5.5 and receive kLk_L from the Council.
  3. Hand over. The new key is staged for the next epoch, and its first Commit chains from the last root signed under the old key, since (5.4) includes ρ(k−1)\rho^{(k-1)}.
  4. Retire. The authority removes MM from M\mathcal{M}, effective at the next epoch boundary.

Theorem 5.3 (Upgrade transparency). Under the assumptions of Theorem 5.1 and an honest threshold of the Council, every enclave that ever holds kLk_L or signs an accepted Commit runs code whose measurement was recorded on chain at least TupT_{\mathrm{up}} slots before it received kLk_L.

Proof. An enclave holds kLk_L only by Council release or by having generated it at genesis. Release requires tt shares, at least one from an honest member, and honest members release only to YEY_E in an admitted Registry entry. Admission requires M∈MM \in \mathcal{M}, and MM enters M\mathcal{M} only at sact=sprop+Tups_{\mathrm{act}} = s_{\mathrm{prop}} + T_{\mathrm{up}}. Signing an accepted Commit requires an admitted pkCpk_C by Theorem 5.2, which again requires M∈MM \in \mathcal{M}. The genesis measurement is the first entry of M\mathcal{M} and is recorded before the Pool accepts deposits. □\square

When the enclave stops producing Commits, custody passes to the Escape, which uses the Council and the last committed root and no enclave at all (Chapter 6).

References

  1. N. Lokhande, R. Gupta, R. Chahar, A. Jangra, A. Prajapati, M. Kumari, “Encifher: A Trusted-Execution Coprocessor for Confidential Computation on Solana”, IACR ePrint 2026/1504, July 2026. https://eprint.iacr.org/2026/1504
  2. “Intel Trust Domain Extensions (Intel TDX)”, Intel Corporation, accessed 2026-11-16. https://www.intel.com/content/www/us/en/developer/tools/trust-domain-extensions/overview.html
  3. “Intel Trust Domain Extensions Data Center Attestation Primitives (Intel TDX DCAP): Quote Generation Library and Quote Verification Library”, Rev 0.9, Intel Corporation, December 2023 (Appendix A.3, Version 4 Quote Format). https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/docs/Intel_TDX_DCAP_Quoting_Library_API.pdf
  4. “Intel SGX PCK Certificate and Certificate Revocation List Profile Specification”, Rev 1.4, Intel Corporation, March 2020. https://download.01.org/intel-sgx/sgx-dcap/1.21/linux/docs/SGX_PCK_Certificate_CRL_Spec-1.4.pdf
  5. TianoCore EDK II, MdePkg/Library/TdxLib/Rtmr.c (RTMR extend via TDG.MR.RTMR.EXTEND), 2025. https://sources.debian.org/src/edk2/2025.02-8/MdePkg/Library/TdxLib/Rtmr.c
  6. “Verifying the root of trust”, AWS Nitro Enclaves User Guide, Amazon Web Services, accessed 2026-11-16. https://docs.aws.amazon.com/enclaves/latest/user/verify-root.html
  7. “Cryptographic attestation”, AWS Nitro Enclaves User Guide, Amazon Web Services, accessed 2026-11-16. https://docs.aws.amazon.com/enclaves/latest/user/set-up-attestation.html
  8. “SIMD-0075: Precompile for secp256r1 sigverify”, Solana Foundation, Solana Improvement Documents. https://github.com/solana-foundation/solana-improvement-documents/blob/main/proposals/0075-precompile-for-secp256r1-sigverify.md
  9. “Feature Gate: Enable secp256r1 precompile, SIMD #0075”, Anza, agave issue #3656; feature account srremy31J5Y25FrAApwVb9kZcfXbusYMMsvTK9aWv5q and program accounts read from mainnet-beta RPC on 2026-11-16. https://github.com/anza-xyz/agave/issues/3656 and https://explorer.solana.com/address/srremy31J5Y25FrAApwVb9kZcfXbusYMMsvTK9aWv5q
  10. solana-secp256r1-program crate documentation, Anza, 2025. https://docs.rs/solana-secp256r1-program/latest/solana_secp256r1_program/
  11. solana-ed25519-program crate documentation, Anza, 2025. https://docs.rs/solana-ed25519-program/latest/solana_ed25519_program/
  12. solana-slot-hashes crate, MAX_ENTRIES, Anza, 2025. https://docs.rs/solana-slot-hashes/latest/src/solana_slot_hashes/lib.rs.html
  13. groth16-solana, Light Protocol, 2025. https://lib.rs/crates/groth16-solana
  14. “Automata DCAP Attestation”, Automata Network documentation, accessed 2026-11-16. https://docs.ata.network/tee-overview/tee-verifiers/intel-sgx-tdx-dcap/automata-dcap-attestation
  15. “Definitions”, Reproducible Builds project, accessed 2026-11-16. https://reproducible-builds.org/docs/definition/