Rotom

‘rotom’ Dialect

Dialect for Rotom’s layout representation. See the Rotom paper: https://eprint.iacr.org/2025/1319

Rotom attributes

DimAttr

A single Rotom layout dimension.

Encodes a traversal dimension: logical axis index, size, and stride.

Sentinel dim values (no source tensor axis):

  • -1: replication (logical fill along this layout piece)
  • -2: gap (padding / unused slots; constrained to zero in materialization)

Non-negative dim values index into the logical tensor shape.

Parameters:

ParameterC++ typeDescription
dimint64_t
sizeint64_t
strideint64_t

LayoutAttr

A Rotom layout made from an ordered list of dims.

A Rotom layout is an ordered list of rotom.dim dimensions plus the slot count n (ciphertext slot capacity).

The verifier determines which dims map across ciphertexts vs within slots and checks the slot-side invariant that sizes and strides are powers of two (after splitting).

For tensor_ext materialization, the first entry in dims is the ciphertext side of Rotom’s ; split (one piece); remaining entries are in-slot. See Section 4.2 of the Rotom paper.

Optional rolls encode a roll(i,j) metadata object: each pair (i, j) indexes into the dims array (the flattened ct_dims + slot_dims list) and uses modular addition to modify the indices of dims[i] by the indices of dims[j].

Parameters:

ParameterC++ typeDescription
dims::mlir::ArrayAttr
nint64_t
rolls::mlir::DenseI64ArrayAttr

SeedAttr

A list of Rotom layouts for seeding.

Syntax:

#rotom.seed<
  ::mlir::ArrayAttr   # layouts
>

Contains a list of rotom.layout attributes representing the initial seeding layouts explored by Rotom.

Parameters:

ParameterC++ typeDescription
layouts::mlir::ArrayAttr