JaxiteWord

‘jaxiteword’ Dialect

The jaxiteword dialect is an exit dialect for generating py code against the jaxiteword library API, using the jaxiteword parameters and encoding scheme.

See https://github.com/google/jaxite/jaxite_word

JaxiteWord types

CCParamsType

The CCParams required to create CryptoContext.

Syntax: !jaxiteword.cc_params

CiphertextType

Syntax:

!jaxiteword.ciphertext<
  int,   # polys
  int,   # towers
  int   # degrees
>

A ciphertext - a three dimensional array.

Parameters:

ParameterC++ typeDescription
polysint
towersint
degreesint

CryptoContextType

The CryptoContext required to perform homomorphic operations in JaxiteWord.

Syntax: !jaxiteword.crypto_context

EvalKeyType

The evaluation key required to keyswitch/relinearize/rotate/automorphism operation in JaxiteWord.

Syntax: !jaxiteword.eval_key

ModulusListType

Syntax:

!jaxiteword.modulus_list<
  ::llvm::ArrayRef<::mlir::IntegerAttr>   # modulus_list
>

A list of modulus values.

Parameters:

ParameterC++ typeDescription
modulus_list::llvm::ArrayRef<::mlir::IntegerAttr>

PrivateKeyType

The private key required to decrypt a ciphertext in JaxiteWord.

Syntax: !jaxiteword.private_key

PublicKeyType

The public key required to encrypt plaintext in JaxiteWord.

Syntax: !jaxiteword.public_key

JaxiteWord ops

jaxiteword.add (heir::jaxiteword::AddOp)

Syntax:

operation ::= `jaxiteword.add` operands attr-dict `:` functional-type(operands, results)

The operation computed by this function is homomorphic addition.

Traits: AlwaysSpeculatableImplTrait, Commutative

Interfaces: ConditionallySpeculatable, InferTypeOpInterface, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
value_a
value_b
modulus_list

Results:

ResultDescription
result

jaxiteword.make_ciphertext (heir::jaxiteword::MakeCiphertextOp)

Create a JaxiteWord ciphertext.

Syntax:

operation ::= `jaxiteword.make_ciphertext` $polys `,` $towers `,` $degrees attr-dict `:` type($ciphertext)

Creates a JaxiteWord ciphertext with the given dimensions.

Traits: AlwaysSpeculatableImplTrait

Interfaces: ConditionallySpeculatable, NoMemoryEffect (MemoryEffectOpInterface)

Effects: MemoryEffects::Effect{}

Operands:

OperandDescription
polys32-bit signless integer
towers32-bit signless integer
degrees32-bit signless integer

Results:

ResultDescription
ciphertext