Openfhe
‘openfhe’ Dialect
The openfhe dialect is an exit dialect for generating c++ code against the OpenFHE library API.
See https://github.com/openfheorg/openfhe-development
Openfhe types
CCParamsType
The CCParams required to create CryptoContext.
Syntax: !openfhe.cc_params
CiphertextType
An opaque OpenFHE ciphertext type
Syntax: !openfhe.ciphertext
CryptoContextType
The CryptoContext required to perform homomorphic operations in OpenFHE.
Syntax: !openfhe.crypto_context
DigitDecompositionType
A precomputed digit decomposition for for EvalFastRotation
Syntax: !openfhe.digit_decomp
EvalKeyType
The evaluation key required to keyswitch/relinearize/rotate/automorphism operation in OpenFHE.
Syntax: !openfhe.eval_key
PlaintextType
An opaque OpenFHE plaintext type
Syntax: !openfhe.plaintext
PrivateKeyType
The private key required to decrypt a ciphertext in OpenFHE.
Syntax: !openfhe.private_key
PublicKeyType
The public key required to encrypt plaintext in OpenFHE.
Syntax: !openfhe.public_key
Openfhe ops
openfhe.add_inplace (heir::openfhe::AddInPlaceOp)
In-place addition, modifying lhs.
Syntax:
operation ::= `openfhe.add_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.add (heir::openfhe::AddOp)
Addition of two ciphertexts.
Syntax:
operation ::= `openfhe.add` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.add_plain_inplace (heir::openfhe::AddPlainInPlaceOp)
In-place addition of a ciphertext and a plaintext, modifying the ciphertext operand.
Syntax:
operation ::= `openfhe.add_plain_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
rhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.add_plain (heir::openfhe::AddPlainOp)
Addition of a ciphertext and a plaintext.
Syntax:
operation ::= `openfhe.add_plain` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
rhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.automorph (heir::openfhe::AutomorphOp)
Syntax:
operation ::= `openfhe.automorph` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
evalKey | The evaluation key required to keyswitch/relinearize/rotate/automorphism operation in OpenFHE. |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.bootstrap (heir::openfhe::BootstrapOp)
OpenFHE bootstrap operation of a ciphertext. (For CKKS)
Syntax:
operation ::= `openfhe.bootstrap` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.decode_ckks (heir::openfhe::DecodeCKKSOp)
Syntax:
operation ::= `openfhe.decode_ckks` operands attr-dict `:` type($input) `->` type($output)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
input | An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | any type |
openfhe.decode (heir::openfhe::DecodeOp)
Syntax:
operation ::= `openfhe.decode` operands attr-dict `:` type($input) `->` type($output)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
input | An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | any type |
openfhe.decrypt (heir::openfhe::DecryptOp)
Syntax:
operation ::= `openfhe.decrypt` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
privateKey | The private key required to decrypt a ciphertext in OpenFHE. |
Results:
| Result | Description |
|---|---|
plaintext | An opaque OpenFHE plaintext type |
openfhe.encrypt (heir::openfhe::EncryptOp)
Syntax:
operation ::= `openfhe.encrypt` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
plaintext | An opaque OpenFHE plaintext type |
encryptionKey | The public key required to encrypt plaintext in OpenFHE. or The private key required to decrypt a ciphertext in OpenFHE. |
Results:
| Result | Description |
|---|---|
ciphertext | An opaque OpenFHE ciphertext type |
openfhe.fast_rotation (heir::openfhe::FastRotationOp)
Syntax:
operation ::= `openfhe.fast_rotation` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: BatchVectorizableOpInterface, ConditionallySpeculatable, ElementwiseByOperandOpInterface, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
cyclotomicOrder | ::mlir::IntegerAttr | index attribute |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
input | An opaque OpenFHE ciphertext type |
index | index |
precomputedDigitDecomp | A precomputed digit decomposition for for EvalFastRotation |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.fast_rotation_precompute (heir::openfhe::FastRotationPrecomputeOp)
Syntax:
operation ::= `openfhe.fast_rotation_precompute` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
input | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | A precomputed digit decomposition for for EvalFastRotation |
openfhe.gen_bootstrapkey (heir::openfhe::GenBootstrapKeyOp)
Syntax:
operation ::= `openfhe.gen_bootstrapkey` operands attr-dict `:` functional-type(operands, results)
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
privateKey | The private key required to decrypt a ciphertext in OpenFHE. |
openfhe.gen_context (heir::openfhe::GenContextOp)
Syntax:
operation ::= `openfhe.gen_context` operands attr-dict `:` functional-type(operands, results)
Interfaces: InferTypeOpInterface
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
supportFHE | ::mlir::BoolAttr | bool attribute |
Operands:
| Operand | Description |
|---|---|
params | The CCParams required to create CryptoContext. |
Results:
| Result | Description |
|---|---|
context | The CryptoContext required to perform homomorphic operations in OpenFHE. |
openfhe.gen_mulkey (heir::openfhe::GenMulKeyOp)
Syntax:
operation ::= `openfhe.gen_mulkey` operands attr-dict `:` functional-type(operands, results)
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
privateKey | The private key required to decrypt a ciphertext in OpenFHE. |
openfhe.gen_params (heir::openfhe::GenParamsOp)
Syntax:
operation ::= `openfhe.gen_params` operands attr-dict `:` functional-type(operands, results)
Generates the parameters for the OpenFHE scheme.
mulDepth is the depth of the multiplication circuit,
including the bootstrapping depth.
plainMod is the modulus of the plaintext space. If we
are using CKKS, this is 0.
insecure is a flag that determines whether the parameters
are generated securely or not. In Openfhe, this means setting
HEStd_NotSet for security level.
For other flags, see the OpenFHE documentation in https://github.com/openfheorg/openfhe-development/blob/main/src/pke/examples/README.md#description-of-the-cryptocontext-parameters-and-their-restrictions
Interfaces: InferTypeOpInterface
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
mulDepth | ::mlir::IntegerAttr | 64-bit signless integer attribute |
plainMod | ::mlir::IntegerAttr | 64-bit signless integer attribute |
ringDim | ::mlir::IntegerAttr | 64-bit signless integer attribute |
batchSize | ::mlir::IntegerAttr | 64-bit signless integer attribute |
firstModSize | ::mlir::IntegerAttr | 64-bit signless integer attribute |
scalingModSize | ::mlir::IntegerAttr | 64-bit signless integer attribute |
evalAddCount | ::mlir::IntegerAttr | 64-bit signless integer attribute |
keySwitchCount | ::mlir::IntegerAttr | 64-bit signless integer attribute |
digitSize | ::mlir::IntegerAttr | 64-bit signless integer attribute |
numLargeDigits | ::mlir::IntegerAttr | 64-bit signless integer attribute |
maxRelinSkDeg | ::mlir::IntegerAttr | 64-bit signless integer attribute |
insecure | ::mlir::BoolAttr | bool attribute |
encryptionTechniqueExtended | ::mlir::BoolAttr | bool attribute |
keySwitchingTechniqueBV | ::mlir::BoolAttr | bool attribute |
scalingTechniqueFixedManual | ::mlir::BoolAttr | bool attribute |
Results:
| Result | Description |
|---|---|
params | The CCParams required to create CryptoContext. |
openfhe.gen_rotkey (heir::openfhe::GenRotKeyOp)
Syntax:
operation ::= `openfhe.gen_rotkey` operands attr-dict `:` functional-type(operands, results)
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
indices | ::mlir::DenseI64ArrayAttr | i64 dense array attribute |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
privateKey | The private key required to decrypt a ciphertext in OpenFHE. |
openfhe.key_switch_inplace (heir::openfhe::KeySwitchInPlaceOp)
In-place key switch of a ciphertext.
Syntax:
operation ::= `openfhe.key_switch_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
evalKey | The evaluation key required to keyswitch/relinearize/rotate/automorphism operation in OpenFHE. |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.key_switch (heir::openfhe::KeySwitchOp)
Key switch a ciphertext.
Syntax:
operation ::= `openfhe.key_switch` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
evalKey | The evaluation key required to keyswitch/relinearize/rotate/automorphism operation in OpenFHE. |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.level_reduce_inplace (heir::openfhe::LevelReduceInPlaceOp)
In-place level reduction of a ciphertext.
Syntax:
operation ::= `openfhe.level_reduce_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
levelToDrop | ::mlir::IntegerAttr | 64-bit signless integer attribute |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.level_reduce (heir::openfhe::LevelReduceOp)
Reduce the level of a ciphertext.
Syntax:
operation ::= `openfhe.level_reduce` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
levelToDrop | ::mlir::IntegerAttr | 64-bit signless integer attribute |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.make_ckks_packed_plaintext (heir::openfhe::MakeCKKSPackedPlaintextOp)
Syntax:
operation ::= `openfhe.make_ckks_packed_plaintext` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
value | ranked tensor of floating-point or integer values |
Results:
| Result | Description |
|---|---|
plaintext | An opaque OpenFHE plaintext type |
openfhe.make_packed_plaintext (heir::openfhe::MakePackedPlaintextOp)
Syntax:
operation ::= `openfhe.make_packed_plaintext` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
value | ranked tensor of integer values |
Results:
| Result | Description |
|---|---|
plaintext | An opaque OpenFHE plaintext type |
openfhe.mod_reduce_inplace (heir::openfhe::ModReduceInPlaceOp)
In-place mod_reduce of a ciphertext. (used only for BGV/CKKS)
Syntax:
operation ::= `openfhe.mod_reduce_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mod_reduce (heir::openfhe::ModReduceOp)
Mod_reduce of a ciphertext. (used only for BGV/CKKS)
Syntax:
operation ::= `openfhe.mod_reduce` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mul_const_inplace (heir::openfhe::MulConstInPlaceOp)
In-place multiplication of a ciphertext and a constant, modifying the ciphertext.
Syntax:
operation ::= `openfhe.mul_const_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
constant | 64-bit signless integer |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mul_const (heir::openfhe::MulConstOp)
Multiplication of a ciphertext and a constant.
Syntax:
operation ::= `openfhe.mul_const` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
constant | 64-bit signless integer |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mul_no_relin (heir::openfhe::MulNoRelinOp)
Multiplication of two ciphertexts without relinearization.
Syntax:
operation ::= `openfhe.mul_no_relin` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, IncreasesMulDepthOpInterface, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mul (heir::openfhe::MulOp)
Multiplication of two ciphertexts with relinearization.
Syntax:
operation ::= `openfhe.mul` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, IncreasesMulDepthOpInterface, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.mul_plain (heir::openfhe::MulPlainOp)
Multiplication of a ciphertext and a plaintext.
Syntax:
operation ::= `openfhe.mul_plain` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, IncreasesMulDepthOpInterface, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
rhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.negate_inplace (heir::openfhe::NegateInPlaceOp)
In-place negation of a ciphertext.
Syntax:
operation ::= `openfhe.negate_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.negate (heir::openfhe::NegateOp)
Negation of a ciphertext.
Syntax:
operation ::= `openfhe.negate` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.relin_inplace (heir::openfhe::RelinInPlaceOp)
In-place relinearization of a ciphertext.
Syntax:
operation ::= `openfhe.relin_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.relin (heir::openfhe::RelinOp)
Relinearization of a ciphertext.
Syntax:
operation ::= `openfhe.relin` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.rot (heir::openfhe::RotOp)
Syntax:
operation ::= `openfhe.rot` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
index | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.setup_bootstrap (heir::openfhe::SetupBootstrapOp)
Syntax:
operation ::= `openfhe.setup_bootstrap` operands attr-dict `:` functional-type(operands, results)
Attributes:
| Attribute | MLIR Type | Description |
|---|---|---|
levelBudgetEncode | ::mlir::IntegerAttr | An Attribute containing a integer value |
levelBudgetDecode | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
openfhe.square_inplace (heir::openfhe::SquareInPlaceOp)
In-place square of a ciphertext.
Syntax:
operation ::= `openfhe.square_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.square (heir::openfhe::SquareOp)
Square of a ciphertext.
Syntax:
operation ::= `openfhe.square` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
ciphertext | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.sub_inplace (heir::openfhe::SubInPlaceOp)
In-place subtraction, modifying lhs.
Syntax:
operation ::= `openfhe.sub_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.sub (heir::openfhe::SubOp)
Subtraction of two ciphertexts.
Syntax:
operation ::= `openfhe.sub` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type |
rhs | An opaque OpenFHE ciphertext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.sub_plain_inplace (heir::openfhe::SubPlainInPlaceOp)
In-place subtraction of a ciphertext and a plaintext, modifying the ciphertext operand.
Syntax:
operation ::= `openfhe.sub_plain_inplace` operands attr-dict `:` functional-type(operands, results)
Interfaces: InPlaceOpInterface, InferTypeOpInterface
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
rhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |
openfhe.sub_plain (heir::openfhe::SubPlainOp)
Subtraction of a ciphertext and a plaintext.
Syntax:
operation ::= `openfhe.sub_plain` operands attr-dict `:` functional-type(operands, results)
Traits: AlwaysSpeculatableImplTrait
Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)
Effects: MemoryEffects::Effect{}
Operands:
| Operand | Description |
|---|---|
cryptoContext | The CryptoContext required to perform homomorphic operations in OpenFHE. |
lhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
rhs | An opaque OpenFHE ciphertext type or An opaque OpenFHE plaintext type |
Results:
| Result | Description |
|---|---|
output | An opaque OpenFHE ciphertext type |