Lattigo
’lattigo’ Dialect
The lattigo
dialect is an exit dialect for generating GO code against the Lattigo library API.
See https://github.com/tuneinsight/lattigo
Lattigo attributes
BGVParametersLiteralAttr
Literal parameters for Lattigo BGV
Syntax:
#lattigo.bgv.parameters_literal<
int, # logN
DenseI64ArrayAttr, # Q
DenseI64ArrayAttr, # P
DenseI32ArrayAttr, # logQ
DenseI32ArrayAttr, # logP
int64_t # plaintextModulus
>
This attribute represents the literal parameters for Lattigo BGV.
This is in accordance with https://pkg.go.dev/github.com/tuneinsight/lattigo/v6@v6.1.0/schemes/bgv#ParametersLiteral where some field are not present in the current implementation.
Users must set the polynomial degree (LogN) and the coefficient modulus, by either setting the Q and P fields to the desired moduli chain, or by setting the LogQ and LogP fields to the desired moduli sizes.
Note that for Lattigo, Q/P requires []uint64, where this attribute only provides int64. We assume user should not select moduli so large to consider the signedness issue.
Users must also specify the coefficient modulus in plaintext-space (T). This modulus must be an NTT-friendly prime in the plaintext space: it must be equal to 1 modulo 2n where n is the plaintext ring degree (i.e., the plaintext space has n slots).
Parameters:
Parameter | C++ type | Description |
---|---|---|
logN | int | |
Q | DenseI64ArrayAttr | |
P | DenseI64ArrayAttr | |
logQ | DenseI32ArrayAttr | |
logP | DenseI32ArrayAttr | |
plaintextModulus | int64_t |
CKKSParametersLiteralAttr
Literal parameters for Lattigo CKKS
Syntax:
#lattigo.ckks.parameters_literal<
int, # logN
DenseI64ArrayAttr, # Q
DenseI64ArrayAttr, # P
DenseI32ArrayAttr, # logQ
DenseI32ArrayAttr, # logP
int # logDefaultScale
>
This attribute represents the literal parameters for Lattigo CKKS.
This is in accordance with https://pkg.go.dev/github.com/tuneinsight/lattigo/v6@v6.1.0/schemes/ckks#ParametersLiteral where some field are not present in the current implementation.
Users must set the polynomial degree (LogN) and the coefficient modulus, by either setting the Q and P fields to the desired moduli chain, or by setting the LogQ and LogP fields to the desired moduli sizes.
Note that for Lattigo, Q/P requires []uint64, where this attribute only provides int64. We assume user should not select moduli so large to consider the signedness issue.
Users must also specify a default initial scale for the plaintexts1.
Parameters:
Parameter | C++ type | Description |
---|---|---|
logN | int | |
Q | DenseI64ArrayAttr | |
P | DenseI64ArrayAttr | |
logQ | DenseI32ArrayAttr | |
logP | DenseI32ArrayAttr | |
logDefaultScale | int |
Lattigo types
BGVEncoderType
Syntax: !lattigo.bgv.encoder
This type represents the encoder for the BGV encryption scheme.
BGVEvaluatorType
Syntax: !lattigo.bgv.evaluator
This type represents the evaluator for the BGV encryption scheme.
BGVParameterType
Syntax: !lattigo.bgv.parameter
This type represents the parameters for the BGV encryption scheme.
CKKSEncoderType
Syntax: !lattigo.ckks.encoder
This type represents the encoder for the CKKS encryption scheme.
CKKSEvaluatorType
Syntax: !lattigo.ckks.evaluator
This type represents the evaluator for the CKKS encryption scheme.
CKKSParameterType
Syntax: !lattigo.ckks.parameter
This type represents the parameters for the CKKS encryption scheme.
RLWECiphertextType
Syntax: !lattigo.rlwe.ciphertext
This type represents the ciphertext for the RLWE encryption scheme.
RLWEDecryptorType
Syntax: !lattigo.rlwe.decryptor
This type represents the decryptor for the RLWE encryption scheme.
RLWEEncryptorType
Syntax:
!lattigo.rlwe.encryptor<
bool # publicKey
>
This type represents the encryptor for the RLWE encryption scheme.
Parameters:
Parameter | C++ type | Description |
---|---|---|
publicKey | bool |
RLWEEvaluationKeySetType
Syntax: !lattigo.rlwe.evaluation_key_set
This type represents the evaluation key set for the RLWE encryption scheme.
RLWEGaloisKeyType
Syntax:
!lattigo.rlwe.galois_key<
::mlir::IntegerAttr # galoisElement
>
This type represents the Galois key for the RLWE encryption scheme.
galoisElement: Enabling the automorphism X -> X^{galoisElement}.
Parameters:
Parameter | C++ type | Description |
---|---|---|
galoisElement | ::mlir::IntegerAttr | An Attribute containing a integer value |
RLWEKeyGeneratorType
Syntax: !lattigo.rlwe.key_generator
This type represents the key generator for the RLWE encryption scheme.
RLWEPlaintextType
Syntax: !lattigo.rlwe.plaintext
This type represents the plaintext for the RLWE encryption scheme.
RLWEPublicKeyType
Syntax: !lattigo.rlwe.public_key
This type represents the public key for the RLWE encryption scheme.
RLWERelinearizationKeyType
Syntax: !lattigo.rlwe.relinearization_key
This type represents the relinearization key for the RLWE encryption scheme.
RLWESecretKeyType
Syntax: !lattigo.rlwe.secret_key
This type represents the secret key for the RLWE encryption scheme.
Lattigo ops
lattigo.bgv.add_new
(heir::lattigo::BGVAddNewOp)
Add two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.add_new` operands attr-dict `:` functional-type(operands, results)
This operation adds two ciphertext values in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.add
(heir::lattigo::BGVAddOp)
Add two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.add` operands attr-dict `:` functional-type(operands, results)
This operation adds two ciphertext values in the Lattigo BGV dialect.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.decode
(heir::lattigo::BGVDecodeOp)
Decode a plaintext value in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.decode` operands attr-dict `:` functional-type(operands, results)
This operation decodes a plaintext value using the specified encoder in the Lattigo BGV dialect.
The input value tensor should have elements of integer type.
Operands:
Operand | Description |
---|---|
encoder | |
plaintext | |
value | ranked tensor of integer values |
Results:
Result | Description |
---|---|
decoded | ranked tensor of integer values |
lattigo.bgv.encode
(heir::lattigo::BGVEncodeOp)
Encode a plaintext value in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.encode` operands attr-dict `:` functional-type(operands, results)
This operation encodes a plaintext value using the specified encoder in the Lattigo BGV dialect.
The input value tensor should have elements of integer type.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
encoder | |
value | ranked tensor of integer values |
plaintext |
Results:
Result | Description |
---|---|
encoded |
lattigo.bgv.mul_new
(heir::lattigo::BGVMulNewOp)
Multiply two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.mul_new` operands attr-dict `:` functional-type(operands, results)
This operation multiplies two ciphertext values in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.mul
(heir::lattigo::BGVMulOp)
Multiply two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.mul` operands attr-dict `:` functional-type(operands, results)
This operation multiplies two ciphertext values in the Lattigo BGV dialect.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.new_encoder
(heir::lattigo::BGVNewEncoderOp)
Create a new encoder in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.new_encoder` operands attr-dict `:` functional-type(operands, results)
This operation creates a new encoder for encoding plaintext values in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
params |
Results:
Result | Description |
---|---|
encoder |
lattigo.bgv.new_evaluator
(heir::lattigo::BGVNewEvaluatorOp)
Create a new evaluator in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.new_evaluator` operands attr-dict `:` functional-type(operands, results)
This operation creates a new evaluator for performing operations on ciphertexts in the Lattigo BGV dialect.
By default, the evaluator is created with the provided parameters and could execute operations which does not relying on evaluation keys.
To support operations that require evaluation keys, the optional evaluation key set should be provided.
The scaleInvariant flag is used to indicate whether the evaluator is for B/FV or BGV. If it is set to true, the evaluator will evaluate operations in B/FV style.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
scaleInvariant | ::mlir::BoolAttr | bool attribute |
Operands:
Operand | Description |
---|---|
params | |
evaluationKeySet |
Results:
Result | Description |
---|---|
evaluator |
lattigo.bgv.new_parameters_from_literal
(heir::lattigo::BGVNewParametersFromLiteralOp)
Create new BGV parameters from a literal in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.new_parameters_from_literal` operands attr-dict `:` functional-type(operands, results)
This operation creates new BGV parameters from a given literal value in the Lattigo BGV dialect.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
paramsLiteral | ::mlir::heir::lattigo::BGVParametersLiteralAttr | Literal parameters for Lattigo BGV |
Results:
Result | Description |
---|---|
params |
lattigo.bgv.new_plaintext
(heir::lattigo::BGVNewPlaintextOp)
Create a new plaintext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.new_plaintext` operands attr-dict `:` functional-type(operands, results)
This operation creates a new plaintext value in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
params |
Results:
Result | Description |
---|---|
plaintext |
lattigo.bgv.relinearize_new
(heir::lattigo::BGVRelinearizeNewOp)
Relinearize a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.relinearize_new` operands attr-dict `:` functional-type(operands, results)
This operation relinearizes a ciphertext value in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.relinearize
(heir::lattigo::BGVRelinearizeOp)
Relinearize a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.relinearize` operands attr-dict `:` functional-type(operands, results)
This operation relinearizes a ciphertext value in the Lattigo BGV dialect.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
input | |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rescale_new
(heir::lattigo::BGVRescaleNewOp)
Rescale a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rescale_new` operands attr-dict `:` functional-type(operands, results)
This operation rescales a ciphertext value in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rescale
(heir::lattigo::BGVRescaleOp)
Rescale a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rescale` operands attr-dict `:` functional-type(operands, results)
This operation rescales a ciphertext value in the Lattigo BGV dialect.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
input | |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rotate_columns_new
(heir::lattigo::BGVRotateColumnsNewOp)
Rotate columns of a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rotate_columns_new` operands attr-dict `:` functional-type(operands, results)
This operation rotates the columns of a ciphertext value in the Lattigo BGV dialect.
Lattigo exposes the SIMD slot of BGV as a N/2 x 2 matrix, where N/2 is the column.
Offset is valid for both positive and negative number.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
offset | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rotate_columns
(heir::lattigo::BGVRotateColumnsOp)
Rotate columns of a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rotate_columns` operands attr-dict `:` functional-type(operands, results)
This operation rotates the columns of a ciphertext value in the Lattigo BGV dialect.
Lattigo exposes the SIMD slot of BGV as a N/2 x 2 matrix, where N/2 is the column.
Offset is valid for both positive and negative number.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
offset | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
Operand | Description |
---|---|
evaluator | |
input | |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rotate_rows_new
(heir::lattigo::BGVRotateRowsNewOp)
Rotate rows of a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rotate_rows_new` operands attr-dict `:` functional-type(operands, results)
This operation swap the rows of a ciphertext value in the Lattigo BGV dialect.
Lattigo exposes the SIMD slot of BGV as a N/2 x 2 matrix, where 2 is the row.
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.rotate_rows
(heir::lattigo::BGVRotateRowsOp)
Rotate rows of a ciphertext in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.rotate_rows` operands attr-dict `:` functional-type(operands, results)
This operation swap the rows of a ciphertext value in the Lattigo BGV dialect.
Lattigo exposes the SIMD slot of BGV as a N/2 x 2 matrix, where 2 is the row.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
input | |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.sub_new
(heir::lattigo::BGVSubNewOp)
Subtract two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.sub_new` operands attr-dict `:` functional-type(operands, results)
This operation subtracts one ciphertext value from another in the Lattigo BGV dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.bgv.sub
(heir::lattigo::BGVSubOp)
Subtract two ciphertexts in the Lattigo BGV dialect
Syntax:
operation ::= `lattigo.bgv.sub` operands attr-dict `:` functional-type(operands, results)
This operation subtracts one ciphertext value from another in the Lattigo BGV dialect.
The result will be written to the inplace
operand. The output
result is
a transitive reference to the inplace
operand for sake of the MLIR SSA form.
Interfaces: InplaceOpInterface
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
inplace |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.add
(heir::lattigo::CKKSAddOp)
Add two ciphertexts in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.add` operands attr-dict `:` functional-type(operands, results)
This operation adds two ciphertext values in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.decode
(heir::lattigo::CKKSDecodeOp)
Decode a plaintext value in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.decode` operands attr-dict `:` functional-type(operands, results)
This operation decodes a plaintext value using the specified encoder in the Lattigo CKKS dialect.
The input value tensor should have elements of float type or complex type.
Operands:
Operand | Description |
---|---|
encoder | |
plaintext | |
value | ranked tensor of floating-point or complex-type values |
Results:
Result | Description |
---|---|
decoded | ranked tensor of floating-point or complex-type values |
lattigo.ckks.encode
(heir::lattigo::CKKSEncodeOp)
Encode a plaintext value in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.encode` operands attr-dict `:` functional-type(operands, results)
This operation encodes a plaintext value using the specified encoder in the Lattigo CKKS dialect.
The input value tensor should have elements of float type or complex type.
Operands:
Operand | Description |
---|---|
encoder | |
value | ranked tensor of floating-point or complex-type values |
plaintext |
Results:
Result | Description |
---|---|
encoded |
lattigo.ckks.mul
(heir::lattigo::CKKSMulOp)
Multiply two ciphertexts in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.mul` operands attr-dict `:` functional-type(operands, results)
This operation multiplies two ciphertext values in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.new_encoder
(heir::lattigo::CKKSNewEncoderOp)
Create a new encoder in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.new_encoder` operands attr-dict `:` functional-type(operands, results)
This operation creates a new encoder for encoding plaintext values in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
params |
Results:
Result | Description |
---|---|
encoder |
lattigo.ckks.new_evaluator
(heir::lattigo::CKKSNewEvaluatorOp)
Create a new evaluator in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.new_evaluator` operands attr-dict `:` functional-type(operands, results)
This operation creates a new evaluator for performing operations on ciphertexts in the Lattigo CKKS dialect.
By default, the evaluator is created with the provided parameters and could execute operations which does not relying on evaluation keys.
To support operations that require evaluation keys, the optional evaluation key set should be provided.
Operands:
Operand | Description |
---|---|
params | |
evaluationKeySet |
Results:
Result | Description |
---|---|
evaluator |
lattigo.ckks.new_parameters_from_literal
(heir::lattigo::CKKSNewParametersFromLiteralOp)
Create new CKKS parameters from a literal in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.new_parameters_from_literal` operands attr-dict `:` functional-type(operands, results)
This operation creates new CKKS parameters from a given literal value in the Lattigo CKKS dialect.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
paramsLiteral | ::mlir::heir::lattigo::CKKSParametersLiteralAttr | Literal parameters for Lattigo CKKS |
Results:
Result | Description |
---|---|
params |
lattigo.ckks.new_plaintext
(heir::lattigo::CKKSNewPlaintextOp)
Create a new plaintext in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.new_plaintext` operands attr-dict `:` functional-type(operands, results)
This operation creates a new plaintext value in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
params |
Results:
Result | Description |
---|---|
plaintext |
lattigo.ckks.relinearize
(heir::lattigo::CKKSRelinearizeOp)
Relinearize a ciphertext in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.relinearize` operands attr-dict `:` functional-type(operands, results)
This operation relinearizes a ciphertext value in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.rescale
(heir::lattigo::CKKSRescaleOp)
Rescale a ciphertext in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.rescale` operands attr-dict `:` functional-type(operands, results)
This operation rescales a ciphertext value in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.rotate
(heir::lattigo::CKKSRotateOp)
Rotate slots of a ciphertext in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.rotate` operands attr-dict `:` functional-type(operands, results)
This operation rotates slots of a ciphertext value in the Lattigo CKKS dialect.
For vanilla CKKS, the maximum number of slots is N/2 with each slot being complex number. Lattigo also support a conjugate-invariant version of CKKS, i.e. the ring is Z[X + X^{-1} ]/(X^N+1), which allows for a maximum of N slots with each slot being real number.
Offset is valid for both positive and negative number.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
offset | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
Operand | Description |
---|---|
evaluator | |
input |
Results:
Result | Description |
---|---|
output |
lattigo.ckks.sub
(heir::lattigo::CKKSSubOp)
Subtract two ciphertexts in the Lattigo CKKS dialect
Syntax:
operation ::= `lattigo.ckks.sub` operands attr-dict `:` functional-type(operands, results)
This operation subtracts one ciphertext value from another in the Lattigo CKKS dialect.
Operands:
Operand | Description |
---|---|
evaluator | |
lhs | |
rhs | or |
Results:
Result | Description |
---|---|
output |
lattigo.rlwe.decrypt
(heir::lattigo::RLWEDecryptOp)
Decrypts a ciphertext using RLWE
Syntax:
operation ::= `lattigo.rlwe.decrypt` operands attr-dict `:` functional-type(operands, results)
This operation decrypts a ciphertext using RLWE
Operands:
Operand | Description |
---|---|
decryptor | |
ciphertext |
Results:
Result | Description |
---|---|
plaintext |
lattigo.rlwe.encrypt
(heir::lattigo::RLWEEncryptOp)
Encrypts a plaintext using RLWE
Syntax:
operation ::= `lattigo.rlwe.encrypt` operands attr-dict `:` functional-type(operands, results)
This operation encrypts a plaintext using RLWE
Operands:
Operand | Description |
---|---|
encryptor | |
plaintext |
Results:
Result | Description |
---|---|
ciphertext |
lattigo.rlwe.gen_galois_key
(heir::lattigo::RLWEGenGaloisKeyOp)
Generates a new RLWE Galois key
Syntax:
operation ::= `lattigo.rlwe.gen_galois_key` operands attr-dict `:` functional-type(operands, results)
This operation generates a new RLWE Galois key
galoisElement: Enabling the automorphism X -> X^{galoisElement}.
Attributes:
Attribute | MLIR Type | Description |
---|---|---|
galoisElement | ::mlir::IntegerAttr | An Attribute containing a integer value |
Operands:
Operand | Description |
---|---|
keyGenerator | |
secretKey |
Results:
Result | Description |
---|---|
galoisKey |
lattigo.rlwe.gen_key_pair
(heir::lattigo::RLWEGenKeyPairOp)
Generates a new RLWE key pair
Syntax:
operation ::= `lattigo.rlwe.gen_key_pair` operands attr-dict `:` functional-type(operands, results)
This operation generates a new RLWE key pair
Operands:
Operand | Description |
---|---|
keyGenerator |
Results:
Result | Description |
---|---|
secretKey | |
publicKey |
lattigo.rlwe.gen_relinearization_key
(heir::lattigo::RLWEGenRelinearizationKeyOp)
Generates a new RLWE relinearization key
Syntax:
operation ::= `lattigo.rlwe.gen_relinearization_key` operands attr-dict `:` functional-type(operands, results)
This operation generates a new RLWE relinearization key
Operands:
Operand | Description |
---|---|
keyGenerator | |
secretKey |
Results:
Result | Description |
---|---|
relinearizationKey |
lattigo.rlwe.new_decryptor
(heir::lattigo::RLWENewDecryptorOp)
Creates a new RLWE decryptor
Syntax:
operation ::= `lattigo.rlwe.new_decryptor` operands attr-dict `:` functional-type(operands, results)
This operation creates a new RLWE decryptor
Operands:
Operand | Description |
---|---|
params | or |
secretKey |
Results:
Result | Description |
---|---|
decryptor |
lattigo.rlwe.new_encryptor
(heir::lattigo::RLWENewEncryptorOp)
Creates a new RLWE encryptor
Syntax:
operation ::= `lattigo.rlwe.new_encryptor` operands attr-dict `:` functional-type(operands, results)
This operation creates a new RLWE encryptor
Operands:
Operand | Description |
---|---|
params | or |
encryptionKey | or |
Results:
Result | Description |
---|---|
encryptor |
lattigo.rlwe.new_evaluation_key_set
(heir::lattigo::RLWENewEvaluationKeySetOp)
Generates a new RLWE evaluation key set
Syntax:
operation ::= `lattigo.rlwe.new_evaluation_key_set` operands attr-dict `:` functional-type(operands, results)
This operation generates a new RLWE evaluation key set
Operands:
Operand | Description |
---|---|
keys | variadic of any type |
Results:
Result | Description |
---|---|
evaluationKeySet |
lattigo.rlwe.new_key_generator
(heir::lattigo::RLWENewKeyGeneratorOp)
Generates a new RLWE key generator
Syntax:
operation ::= `lattigo.rlwe.new_key_generator` operands attr-dict `:` functional-type(operands, results)
This operation generates a new RLWE key generator
Operands:
Operand | Description |
---|---|
params | or |
Results:
Result | Description |
---|---|
keyGenerator |