Expand description
Client-side encryption of the private transaction inputs sent alongside a submission.
Transaction inputs are submitted as an IES-sealed blob rather than in the clear, so that the
RPC operator cannot read them and only holders of the validator set’s shared encryption secret
can. Sealing uses the X25519XChaCha20Poly1305 scheme; the sealed blob on the wire is a
serialized SealedMessage. The node rejects a
submission whose inputs are not sealed.
§Trusting the key
The key is served by the node’s GetTransactionEncryptionKey endpoint, which the RPC operator
controls – and that operator is the party this encryption exists to keep out. A key taken from
that endpoint on faith would let the operator substitute its own, decrypt every submission, and
re-seal under the real validator key undetected.
So a fetched key is never used directly. AttestedTransactionEncryptionKey is the only thing
the RPC layer can produce, and the sole way to obtain a usable TransactionEncryptionKey from
it is AttestedTransactionEncryptionKey::verify, which requires a validator signature over
attestation_commitment that checks out against a validator signing key committed in a block
header. The commitment binds the genesis commitment, so an attestation cannot be replayed from
another network sharing a validator key.
Once verified, the key is public data shared by the whole validator set, so it is cached in the store rather than re-fetched per submission. A submission rejected for having been sealed against a key the validator no longer holds evicts the cached key, so the next submission fetches and verifies a fresh one.
§Matching the validator’s transcripts
The canonical definitions live in the node’s miden_node_proto::domain::encryption. This module
is a hand-maintained mirror of them, because that is a node crate and this client is no_std.
Structs§
- Attested
Transaction Encryption Key - A transaction encryption key exactly as the node served it, before it is trusted.
- Next
Transaction Encryption Key - The next encryption key announced ahead of a scheduled rotation.
- Sealed
Transaction Inputs - The sealed, wire-ready form of a transaction’s
TransactionInputs. - Transaction
Encryption Key - The validator set’s public transaction encryption key, with its attestation already verified.
- Validator
Attestation - A single validator’s endorsement of a served encryption key.
Functions§
- attestation_
commitment - Computes the commitment a validator signs to attest an encryption key.
- seal_
transaction_ inputs - Seals the inputs of the transaction identified by
tx_idagainstkey, ready to be submitted.