Skip to content

Commit

Permalink
doc(shortint): add some clarification about shortint size
Browse files Browse the repository at this point in the history
  • Loading branch information
nsarlin-zama committed Dec 16, 2024
1 parent 03956a9 commit cdb81dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tfhe/docs/references/fine-grained-apis/shortint/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Tutorial

`tfhe::shortint` is dedicated to unsigned integers smaller than 8 bits. The steps to homomorphically evaluate a circuit are described below.
`tfhe::shortint` is dedicated to the manipulation of small unsigned integers that fit in a single [LWE ciphertext](../../../getting_started/security_and_cryptography.md). The actual size depends on the chosen parameters, but is always smaller than 8 bits. For example, with the `PARAM_MESSAGE_2_CARRY_2_KS_PBS` parameters, you can encode messages of 2 bits inside a `shortint`.

The [integer](../integer/README.md) and [high-level](../quick_start.md) API leverage shortints to allow homomorphic computations over larger integers.

The steps to homomorphically evaluate a `shortint` circuit are described below.

## Key generation

Expand All @@ -10,7 +14,7 @@
* `ServerKey`
* `PublicKey`

The `ClientKey` is the key that encrypts and decrypts messages (integer values up to 8 bits here). It is meant to be kept private and should never be shared. This key is created from parameter values that will dictate both the security and efficiency of computations. The parameters also set the maximum number of bits of message encrypted in a ciphertext.
The `ClientKey` is the key that encrypts and decrypts messages (small integer values). It is meant to be kept private and should never be shared. This key is created from parameter values that will dictate both the security and efficiency of computations. The parameters also set the maximum number of bits of message encrypted in a ciphertext.

The `ServerKey` is the key that is used to evaluate the FHE computations. Most importantly, it contains a bootstrapping key and a keyswitching key. This key is created from a `ClientKey` that needs to be shared to the server (it is not meant to be kept private). A user with a `ServerKey` can compute on the encrypted data sent by the owner of the associated `ClientKey`.

Expand Down

0 comments on commit cdb81dd

Please sign in to comment.