# fhe

`fhe` dialect includes operations for encrypted data computations. This dialect is further divided into subgroups based on the encryption scheme, such as `fhe.bgv` and `fhe.ckks`, allowing tailored operations for each scheme. Within each subgroup, operations like addition, multiplication, and rotations are defined.

### Examples

<pre data-overflow="wrap"><code>//Adds two ciphertexts using the BGV scheme.
%result = fhe.bgv.add %lhs, %rhs, %ctx : (RLWECiphertext, RLWECiphertext, BGVCryptoContext) -> RLWECiphertext

<strong>//Rotates coefficients of a CKKS ciphertext by the specified offset. 
</strong>%rot = fhe.ckks.rotate %ciphertext, %offset, %ctx, %key : (RLWECiphertext, i32, CKKSCryptoContext, RLWEGaloisKey) -> RLWECiphertext

</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fairmath.xyz/fhe-computer/isa/fhe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
