Files
zeekay f968edf75a Rename the Concrete dialect and project identifiers to Torus
The MLIR dialect, its conversion passes (TFHEToConcrete, ConcreteToCAPI,
ConcreteToLLVM), the optimizer component, the compiler binary, the Rust
crate and the program_info parameter file all still carried the upstream
project's name. They now carry this one's.

Two things deliberately keep the word, because in them it is not the name.
mlir::OpTrait CRTP parameters mean "the derived type", so they are spelled
Derived and OpTy — LLVM's other conventional spelling for the same idiom.
concreteShape is a capnp field: renaming it would change the serialized
protocol, and the prose describing it is ordinary English.

This also repairs references the earlier partial rename left dangling:
Security.cpp included concrete/curves.gen.h and the directory is torus/,
torus-cpu.h included concrete-num_complex.h, the Torus dialect CMakeLists
named ConcreteOps.td, and compiler/setup.py asked find_namespace_packages
for a "concrete" package that no longer exists — so it built without the
package it ships.
2026-08-27 13:17:38 -07:00

28 KiB

'Torus' Dialect

Low Level Fully Homomorphic Encryption dialect A dialect for representation of low level operation on fully homomorphic ciphertext.

Operation definition

Torus.add_lwe_buffer (::mlir::toruslang::Torus::AddLweBufferOp)

Returns the sum of 2 lwe ciphertexts

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
lhs 1D memref of 64-bit signless integer values
rhs 1D memref of 64-bit signless integer values

Torus.add_lwe_tensor (::mlir::toruslang::Torus::AddLweTensorOp)

Returns the sum of 2 lwe ciphertexts

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 1D tensor of 64-bit signless integer values
rhs 1D tensor of 64-bit signless integer values

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.add_plaintext_lwe_buffer (::mlir::toruslang::Torus::AddPlaintextLweBufferOp)

Returns the sum of a clear integer and an lwe ciphertext

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
lhs 1D memref of 64-bit signless integer values
rhs 64-bit signless integer

Torus.add_plaintext_lwe_tensor (::mlir::toruslang::Torus::AddPlaintextLweTensorOp)

Returns the sum of a clear integer and an lwe ciphertext

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 1D tensor of 64-bit signless integer values
rhs 64-bit signless integer

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.batched_add_lwe_buffer (::mlir::toruslang::Torus::BatchedAddLweBufferOp)

Batched version of AddLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
lhs 2D memref of 64-bit signless integer values
rhs 2D memref of 64-bit signless integer values

Torus.batched_add_lwe_tensor (::mlir::toruslang::Torus::BatchedAddLweTensorOp)

Batched version of AddLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 2D tensor of 64-bit signless integer values
rhs 2D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_add_plaintext_cst_lwe_buffer (::mlir::toruslang::Torus::BatchedAddPlaintextCstLweBufferOp)

Batched version of AddPlaintextLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
lhs 2D memref of 64-bit signless integer values
rhs 64-bit signless integer

Torus.batched_add_plaintext_cst_lwe_tensor (::mlir::toruslang::Torus::BatchedAddPlaintextCstLweTensorOp)

Batched version of AddPlaintextLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 2D tensor of 64-bit signless integer values
rhs 64-bit signless integer

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_add_plaintext_lwe_buffer (::mlir::toruslang::Torus::BatchedAddPlaintextLweBufferOp)

Batched version of AddPlaintextLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
lhs 2D memref of 64-bit signless integer values
rhs 1D memref of 64-bit signless integer values

Torus.batched_add_plaintext_lwe_tensor (::mlir::toruslang::Torus::BatchedAddPlaintextLweTensorOp)

Batched version of AddPlaintextLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 2D tensor of 64-bit signless integer values
rhs 1D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_bootstrap_lwe_buffer (::mlir::toruslang::Torus::BatchedBootstrapLweBufferOp)

Batched version of BootstrapLweOp, which performs the same operation on multiple elements

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
input_ciphertext 2D memref of 64-bit signless integer values
lookup_table 1D memref of 64-bit signless integer values

Torus.batched_bootstrap_lwe_tensor (::mlir::toruslang::Torus::BatchedBootstrapLweTensorOp)

Batched version of BootstrapLweOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
input_ciphertext 2D tensor of 64-bit signless integer values
lookup_table 1D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_keyswitch_lwe_buffer (::mlir::toruslang::Torus::BatchedKeySwitchLweBufferOp)

Batched version of KeySwitchLweOp, which performs the same operation on multiple elements

Attributes:

Attribute MLIR Type Description
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_in ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_out ::mlir::IntegerAttr 32-bit signless integer attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
ciphertext 2D memref of 64-bit signless integer values

Torus.batched_keyswitch_lwe_tensor (::mlir::toruslang::Torus::BatchedKeySwitchLweTensorOp)

Batched version of KeySwitchLweOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_in ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_out ::mlir::IntegerAttr 32-bit signless integer attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
ciphertext 2D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_mapped_bootstrap_lwe_buffer (::mlir::toruslang::Torus::BatchedMappedBootstrapLweBufferOp)

Batched, mapped version of BootstrapLweOp, which performs the same operation on multiple elements

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
input_ciphertext 2D memref of 64-bit signless integer values
lookup_table_vector 2D memref of 64-bit signless integer values

Torus.batched_mapped_bootstrap_lwe_tensor (::mlir::toruslang::Torus::BatchedMappedBootstrapLweTensorOp)

Batched, mapped version of BootstrapLweOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
input_ciphertext 2D tensor of 64-bit signless integer values
lookup_table_vector 2D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_mul_cleartext_cst_lwe_buffer (::mlir::toruslang::Torus::BatchedMulCleartextCstLweBufferOp)

Batched version of MulCleartextLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
lhs 2D memref of 64-bit signless integer values
rhs 64-bit signless integer

Torus.batched_mul_cleartext_cst_lwe_tensor (::mlir::toruslang::Torus::BatchedMulCleartextCstLweTensorOp)

Batched version of MulCleartextLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 2D tensor of 64-bit signless integer values
rhs 64-bit signless integer

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_mul_cleartext_lwe_buffer (::mlir::toruslang::Torus::BatchedMulCleartextLweBufferOp)

Batched version of MulCleartextLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
lhs 2D memref of 64-bit signless integer values
rhs 1D memref of 64-bit signless integer values

Torus.batched_mul_cleartext_lwe_tensor (::mlir::toruslang::Torus::BatchedMulCleartextLweTensorOp)

Batched version of MulCleartextLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 2D tensor of 64-bit signless integer values
rhs 1D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.batched_negate_lwe_buffer (::mlir::toruslang::Torus::BatchedNegateLweBufferOp)

Batched version of NegateLweBufferOp, which performs the same operation on multiple elements

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
ciphertext 2D memref of 64-bit signless integer values

Torus.batched_negate_lwe_tensor (::mlir::toruslang::Torus::BatchedNegateLweTensorOp)

Batched version of NegateLweTensorOp, which performs the same operation on multiple elements

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
ciphertext 2D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.bootstrap_lwe_buffer (::mlir::toruslang::Torus::BootstrapLweBufferOp)

Bootstraps a LWE ciphertext with a GLWE trivial encryption of the lookup table

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
input_ciphertext 1D memref of 64-bit signless integer values
lookup_table 1D memref of 64-bit signless integer values

Torus.bootstrap_lwe_tensor (::mlir::toruslang::Torus::BootstrapLweTensorOp)

Bootstraps an LWE ciphertext with a GLWE trivial encryption of the lookup table

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
inputLweDim ::mlir::IntegerAttr 32-bit signless integer attribute
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
glweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
input_ciphertext 1D tensor of 64-bit signless integer values
lookup_table 1D tensor of 64-bit signless integer values

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.encode_expand_lut_for_bootstrap_buffer (::mlir::toruslang::Torus::EncodeExpandLutForBootstrapBufferOp)

Encode and expand a lookup table so that it can be used for a bootstrap

Attributes:

Attribute MLIR Type Description
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
outputBits ::mlir::IntegerAttr 32-bit signless integer attribute
isSigned ::mlir::BoolAttr bool attribute

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
input_lookup_table 1D memref of 64-bit signless integer values

Torus.encode_expand_lut_for_bootstrap_tensor (::mlir::toruslang::Torus::EncodeExpandLutForBootstrapTensorOp)

Encode and expand a lookup table so that it can be used for a bootstrap

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
polySize ::mlir::IntegerAttr 32-bit signless integer attribute
outputBits ::mlir::IntegerAttr 32-bit signless integer attribute
isSigned ::mlir::BoolAttr bool attribute

Operands:

Operand Description
input_lookup_table 1D tensor of 64-bit signless integer values

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.encode_lut_for_crt_woppbs_buffer (::mlir::toruslang::Torus::EncodeLutForCrtWopPBSBufferOp)

Encode and expand a lookup table so that it can be used for a crt wop pbs

Attributes:

Attribute MLIR Type Description
crtDecomposition ::mlir::ArrayAttr 64-bit integer array attribute
crtBits ::mlir::ArrayAttr 64-bit integer array attribute
modulusProduct ::mlir::IntegerAttr 32-bit signless integer attribute
isSigned ::mlir::BoolAttr bool attribute

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
input_lookup_table 1D memref of 64-bit signless integer values

Torus.encode_lut_for_crt_woppbs_tensor (::mlir::toruslang::Torus::EncodeLutForCrtWopPBSTensorOp)

Encode and expand a lookup table so that it can be used for a wop pbs

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
crtDecomposition ::mlir::ArrayAttr 64-bit integer array attribute
crtBits ::mlir::ArrayAttr 64-bit integer array attribute
modulusProduct ::mlir::IntegerAttr 32-bit signless integer attribute
isSigned ::mlir::BoolAttr bool attribute

Operands:

Operand Description
input_lookup_table 1D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Torus.encode_plaintext_with_crt_buffer (::mlir::toruslang::Torus::EncodePlaintextWithCrtBufferOp)

Encodes a plaintext by decomposing it on a crt basis

Attributes:

Attribute MLIR Type Description
mods ::mlir::ArrayAttr 64-bit integer array attribute
modsProd ::mlir::IntegerAttr 64-bit signless integer attribute

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
input 64-bit signless integer

Torus.encode_plaintext_with_crt_tensor (::mlir::toruslang::Torus::EncodePlaintextWithCrtTensorOp)

Encodes a plaintext by decomposing it on a crt basis

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
mods ::mlir::ArrayAttr 64-bit integer array attribute
modsProd ::mlir::IntegerAttr 64-bit signless integer attribute

Operands:

Operand Description
input 64-bit signless integer

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.keyswitch_lwe_buffer (::mlir::toruslang::Torus::KeySwitchLweBufferOp)

Performs a keyswitching operation on an LWE ciphertext

Attributes:

Attribute MLIR Type Description
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_in ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_out ::mlir::IntegerAttr 32-bit signless integer attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
ciphertext 1D memref of 64-bit signless integer values

Torus.keyswitch_lwe_tensor (::mlir::toruslang::Torus::KeySwitchLweTensorOp)

Performs a keyswitching operation on an LWE ciphertext

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
level ::mlir::IntegerAttr 32-bit signless integer attribute
baseLog ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_in ::mlir::IntegerAttr 32-bit signless integer attribute
lwe_dim_out ::mlir::IntegerAttr 32-bit signless integer attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
ciphertext 1D tensor of 64-bit signless integer values

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.mul_cleartext_lwe_buffer (::mlir::toruslang::Torus::MulCleartextLweBufferOp)

Returns the product of a clear integer and a lwe ciphertext

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
lhs 1D memref of 64-bit signless integer values
rhs 64-bit signless integer

Torus.mul_cleartext_lwe_tensor (::mlir::toruslang::Torus::MulCleartextLweTensorOp)

Returns the product of a clear integer and a lwe ciphertext

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
lhs 1D tensor of 64-bit signless integer values
rhs 64-bit signless integer

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.negate_lwe_buffer (::mlir::toruslang::Torus::NegateLweBufferOp)

Negates an lwe ciphertext

Operands:

Operand Description
result 1D memref of 64-bit signless integer values
ciphertext 1D memref of 64-bit signless integer values

Torus.negate_lwe_tensor (::mlir::toruslang::Torus::NegateLweTensorOp)

Negates an lwe ciphertext

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

Operand Description
ciphertext 1D tensor of 64-bit signless integer values

Results:

Result Description
result 1D tensor of 64-bit signless integer values

Torus.wop_pbs_crt_lwe_buffer (::mlir::toruslang::Torus::WopPBSCRTLweBufferOp)

Attributes:

Attribute MLIR Type Description
bootstrapLevel ::mlir::IntegerAttr 32-bit signless integer attribute
bootstrapBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
keyswitchLevel ::mlir::IntegerAttr 32-bit signless integer attribute
keyswitchBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchInputLweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchoutputPolynomialSize ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchLevel ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
circuitBootstrapLevel ::mlir::IntegerAttr 32-bit signless integer attribute
circuitBootstrapBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
crtDecomposition ::mlir::ArrayAttr 64-bit integer array attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute
pkskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
result 2D memref of 64-bit signless integer values
ciphertext 2D memref of 64-bit signless integer values
lookup_table 2D memref of 64-bit signless integer values

Torus.wop_pbs_crt_lwe_tensor (::mlir::toruslang::Torus::WopPBSCRTLweTensorOp)

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Attributes:

Attribute MLIR Type Description
bootstrapLevel ::mlir::IntegerAttr 32-bit signless integer attribute
bootstrapBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
keyswitchLevel ::mlir::IntegerAttr 32-bit signless integer attribute
keyswitchBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchInputLweDimension ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchoutputPolynomialSize ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchLevel ::mlir::IntegerAttr 32-bit signless integer attribute
packingKeySwitchBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
circuitBootstrapLevel ::mlir::IntegerAttr 32-bit signless integer attribute
circuitBootstrapBaseLog ::mlir::IntegerAttr 32-bit signless integer attribute
crtDecomposition ::mlir::ArrayAttr 64-bit integer array attribute
kskIndex ::mlir::IntegerAttr 32-bit signless integer attribute
bskIndex ::mlir::IntegerAttr 32-bit signless integer attribute
pkskIndex ::mlir::IntegerAttr 32-bit signless integer attribute

Operands:

Operand Description
ciphertext 2D tensor of 64-bit signless integer values
lookupTable 2D tensor of 64-bit signless integer values

Results:

Result Description
result 2D tensor of 64-bit signless integer values

Type definition

ContextType

A runtime context

Syntax: !Torus.context

An abstract runtime context to pass contextual value, like public keys, ...