examples: added README.md

This commit is contained in:
Jean-Philippe Bossuat
2023-11-14 10:59:47 +01:00
parent 82770be864
commit 4af19d8f57
2 changed files with 52 additions and 8 deletions

45
examples/README.md Normal file
View File

@@ -0,0 +1,45 @@
# Single Party Examples
## Applications
Application examples are examples showcasing specific capabilities of the library or scaled down real world scenarios.
### Binary
- `bin_blind_rotations`: an example showcasing the evaluation of the sign function using blind rotations on RLWE ciphertexts.
### Integers
- `int_ride_hailing`: an example on privacy preserving ride hailing.
- `int_vectorized_OLE`: an example on vectorized oblivious linear evaluation using RLWE trapdoor.
### Reals/Complexes
- `reals_bootstrapping`: a series of example showcasing the capabilities of the bootstrapping for fixed point arithmetic.
- `basics`: an example showcasing the basic capabilities of the bootstrapping.
- `high_precision`: an example showcasing high precision bootstrapping.
- `slim`: an example showcasing slim bootstrapping, i.e. re-ordering the steps of the bootstrapping.
- `reals_scheme_switching`: an example showcasing scheme switching between `hefloat` and `hebin` to complement fixed-point arithmetic with lookup tables.
- `reals_sigmoid_chebyshev`: an example showcasing polynomial evaluation of a Chebyshev approximation of the sigmoid.
- `reals_sigmoid_minimax`: an example showcasing polynomial evaluation of a minimax approximation of the sigmoid.
- `reals_vectorized_polynomial_evaluation`: an example showcasing vectorized polynomial evaluation, i.e. evaluating different polynomials in parallel on specific slots.
## Templates
Templates are files containing the basic instantiation, i.e. parameters, key-generation, encoding, encryption and decryption.
- `reals`: a template for `hefloat`.
- `int`: a template for `heint`.
## Tutorials
Tutorials are examples showcasing the basic capabilities of the library.
- `reals`: a tutorial on all the basic capabilities of the package `hefloat`.
# Multi Party Examples
- `int_pir`: an example showcasing multi-party private information retrieval.
- `int_psi`: an example showcasing multi-party private set intersection.
- `thresh_eval_key_gen`: an example showcasing multi-party threshold key-generation.

View File

@@ -1,3 +1,10 @@
// Package main showcases how lookup tables can complement fixed-point approximate
// homomorphic encryption to compute non-linear functions such as sign.
// The example starts by homomorphically decoding the ciphertext from the SIMD
// encoding to the coefficient encoding: IDFT(m(X)) -> m(X).
// It then evaluates a Lookup-Table (LUT) on each coefficient of m(X): m(X)[i] -> LUT(m(X)[i])
// and repacks each LUT(m(X)[i]) in a single RLWE ciphertext: Repack(LUT(m(X)[i])) -> LUT(m(X)).
// Finally, it homomorphically switches LUT(m(X)) back to the SIMD domain: LUT(m(X)) -> IDFT(LUT(m(X))).
package main
import (
@@ -13,14 +20,6 @@ import (
"github.com/tuneinsight/lattigo/v4/utils"
)
// This example showcases how lookup tables can complement fixed-point approximate
// homomorphic encryption to compute non-linear functions such as sign.
// The example starts by homomorphically decoding the ciphertext from the SIMD
// encoding to the coefficient encoding: IDFT(m(X)) -> m(X).
// It then evaluates a Lookup-Table (LUT) on each coefficient of m(X): m(X)[i] -> LUT(m(X)[i])
// and repacks each LUT(m(X)[i]) in a single RLWE ciphertext: Repack(LUT(m(X)[i])) -> LUT(m(X)).
// Finally, it homomorphically switches LUT(m(X)) back to the SIMD domain: LUT(m(X)) -> IDFT(LUT(m(X))).
// ========================================
// Functions to evaluate with BlindRotation
// ========================================