Glossary¶
Parameter names and conventions used across the PyFE4AI schemes. Key
generators take a configuration dict (SIFEDDHKeyGenerator(config)); the
accepted keys of every scheme, their defaults and the refused combinations
are listed on Configuration options (from the config classes of
pyfe4ai.core.config).
Scheme taxonomy¶
Prefix |
Full name |
Parties |
Description |
|---|---|---|---|
SIFE |
Single-input FE |
1 encryptor, 1 decryptor |
Inner-product FE on one vector |
MIFE |
Multi-input FE |
n encryptors (slots), 1 decryptor |
Each client encrypts its slot independently; no labels |
MCFE |
Multi-client FE |
n encryptors, 1 decryptor |
Ciphertexts are bound to a common label |
dMCFE |
Decentralized MCFE |
n encryptors, no authority for functional keys |
Each client derives a share of the functional key; the shares are combined. The setup is trusted: the library’s key generator samples every client’s keys, including the pairwise zero-sum secrets |
tMIFE / tMCFE |
Threshold MIFE / MCFE |
n encryptors, t-of-s decryption servers |
The functional key is shared among s servers – Shamir’s sharing, or in the LWE threshold layers a replicated sharing (the default for t < s) – and any t of them decrypt together |
FH- |
Function-hiding |
as the family |
Functional keys also hide the weights y |
Quadratic |
Quadratic FE |
1 or n encryptors, 1 decryptor |
Computes |
Configuration keys¶
security_profile¶"toy"(the default) keeps the small default parameters: fast, and not secure."standard"fills in parameters aiming at 128-bit classical security and refuses explicit values below them. Its exceptions: pairing-based schemes get BLS12-381 (about 120-126-bit, with aFESecurityWarning), andsife/fullysec_lwe,mife/fullysec_lwe,mife/lwe_thresholdandmcfe/paillier_decentralizedare refused. Seepyfe4ai.core.profilesand Security & Status.sec_param¶Not a security level. The bit length of the safe prime
pin the discrete-log (DDH) families and the defaultmodulus_lengthof the Damgård schemes;kappain the Ring-LWE noise bounds; only recorded by the LWE, Paillier and pairing families, whose sizes come fromlwe_n,bit_lengthandpairing_group_param. The default 128 keeps tests fast and is insecure. For real parameters setsecurity_profile="standard": 3072-bit RFC 3526 groups for the discrete-log families, 3072-bit DCR moduli for Paillier, lattice-estimator tables for LWE and Ring-LWE, andstat_param = 128.stat_param¶Statistical security parameter: rounding and leftover-hash slack of the ABMPSW20 schemes, noise flooding of the threshold schemes, the masks of
mcfe/ddh_decentralizedand the Paillier and MCFE2 key distributions. Default 64; 128 (and at least 128) understandard. Withflooding_accounting = "kl"(mife/lwe_threshold,mcfe/ring_lwe_threshold) it bounds the Hellinger distance of a run of at mostmax_partial_decryptionspartial decryptions per server instead of the statistical distance per sample.flooding_accounting¶How the threshold schemes
mife/lwe_thresholdandmcfe/ring_lwe_thresholdsize their flooding noise:"per-sample"(default; statistical distance2^-stat_paramper flooded value, no limit) or"kl"(opt-in,t = sonly; a bound for a whole run of at mostmax_partial_decryptionspartial decryptions per server, aboutstat_param - 7bits in the bit-security sense of Micciancio and Walter, a total statistical distance of about2^-65atstat_param = 128; each server counts in thepartial_budgetits deployment provides; much smallerqand, formife/lwe_threshold,lwe_n). Seepyfe4ai.schemes.threshold.kland Threshold decryption and the ML adapter.sharing¶How the threshold LWE layers (
mife/lwe_threshold,mcfe/lwe_threshold,mcfe/ring_lwe_threshold) share a functional key among the servers:"shamir"(the default fort = s),"replicated"(the default fort < s: additive pieces, one per(t - 1)-subset of the servers, so that partial decryptions reveal nothing of the decryption noise) or"replicated-seeded"(opt-in: all pieces but one expanded from secret seeds; smaller key shares, computationally hiding)."shamir"witht < sis refused understandard. The DDH and pairing threshold layers always use Shamir’s sharing.flooding¶Distribution of the noise that floods the partial decryptions of
mcfe/ring_lwe_threshold:"uniform"(default) or"gaussian"(the only one of version 0.3.0, and the oneflooding_accounting = "kl"uses). A public parameter.ct_format¶Ciphertext format of the Ring-LWE MIFE / MCFE schemes:
"json"(lists of decimal strings) or"binary"(a versioned compact encoding, about a third of the size). Formife/ring_lwe,mcfe/ring_lweandmcfe/ring_lwe_decentralizedit is a crypto option (default"json"; decryption reads both); formcfe/ring_lwe_thresholda key generator option published in the public parameters (default"binary"), which ciphertexts, key shares and partial decryptions follow.ring_modulus¶Modulus of the Ring-LWE schemes:
"prime"(an NTT-friendly prime) or"rns"(a product of NTT-friendly primes;q_factorsin the public parameters)."rns"is the default ofmcfe/ring_lwe_thresholdand opt-in formife/ring_lwe,mcfe/ring_lweandmcfe/ring_lwe_decentralized; the SIFE Ring-LWE schemes take"prime"only. See RNS modulus for the Ring-LWE schemes: security review.Key shares of
mcfe/ring_lwe_threshold:"split"(default) – a weight part per weight vector (get_weight_key_share, kept by the server withadd_weight_key_share) and a label part per round (get_decryption_keys) – or"full", whole key shares per label (the only kind withsharing = "replicated-seeded"). See Threshold decryption and the ML adapter.label_hash¶How the MCFE Ring-LWE and dense-LWE schemes hash a label to values mod
q:"shake128-rejection"(default),"shake256-wide"(version 0.3.0; data without the field is read as it) or"shake256-rejection". Recorded in the public parameters, keys and ciphertexts; data of different modes is refused.cache_dir¶Key generator option: the parameter cache directory, overriding
PYFE4AI_CACHE_DIRand the per-user cache directory. See Environment variables and the parameter cache.legacy_shamir¶Crypto option of the threshold LWE servers:
"warn"serves Shamir key shares witht < swith anFESecurityWarning(never for public parameters of thestandardprofile); without it they are refused.eta¶Length of each client’s input vector (an
int; MIFE-DDH also accepts adict[str, int]per client).n¶Number of clients (input slots); in quadratic
sgpandquad, the length ofx.lst_nid¶Client ids, length
n(defaultnid_0…nid_{n-1}). An id is astror anint(not abool), one type per list; numpy integers are refused here (convert them withint()) and read as ints wherever an id is given after setup (pyfe4ai.core.ids, Configuration options).s¶Number of decryption servers of the threshold schemes (tMIFE, tMCFE), with ids
lst_sid. Other key generators accept it but do not use it (MIFE- and MCFE-DDH record it with their cached parameters).sis also the name of secret-key vectors, e.g.msk["s"].t¶Threshold: the number of servers whose partial decryptions are combined (
t <= s, default 2). Fewer thantlearn nothing beyond the result.lst_sid¶Decryption-server ids of the threshold schemes, length
s; the same rules as forlst_nid.bound_x/bound_y¶Bounds on the inputs and on the weights,
|x_i| <= bound_xand|y_i| <= bound_y. Used by most families; quadraticmiqfetakesbound_xandbound_c(coefficients of the quadratic function).bound¶One bound for inputs and weights in
sife/damgard,mife/damgard,mcfe/damgard,sife/part_fh_ipe_pairingand the quadraticquadandsgp(x,yandF).dlog_bound¶Crypto-object key of the DDH schemes: the range of the discrete log solved at decryption (default
10^(precision + 2)).modulus_length¶Bit length of the group modulus of the Damgård schemes (default
sec_param).bit_length¶Bits of each prime of the Paillier modulus
N(default 128; 1536 understandard, anNof 3072 bits).lwe_n¶LWE secret dimension (default 32 or 64, depending on the scheme). The ABDP15 (
sife/lwe,mife/lwe,mife/lwe_threshold) and ABMPSW20 (mcfe/lwefamily) schemes also take"auto", thestandardchoice: the smallest dimension whose derived modulus meets the 128-bit lattice-estimator table (for ABDP15 read at the error width of its security reduction, seeabdp15_reduction_sigma()).ring_n¶Ring-LWE ring dimension, a power of two; default
DEFAULT_RING_N(32, a toy value)."auto", thestandardchoice, selects the smallest dimension (1024 to 32768) whose derived modulus meetsRING_LWE_128_LOG_Q(seeresolve_ring_n()).matrix_mode¶How the ABDP15 LWE schemes (
sife/lwe,mife/lwe,mife/lwe_threshold) hold their seeded public matrixA:"memory"(default) keeps it expanded,"stream"expands it again for every batch (little memory, slower). Accepted by key generator and crypto configs. Seepyfe4ai.schemes.common.abdp15_lwe.pairing_group_param¶Pairing group of the pairing-based schemes; default
"BLS12-381"(the Rust extension; other names are charm-crypto groups). Only asymmetric (type-3) groups are accepted: symmetric ones such as"SS512"are rejected.standardrequires"BLS12-381", about 120-126-bit, with aFESecurityWarning. Thegroupattribute of a scheme object is thePairingGroupbuilt from it (pyfe4ai.primitives.pairing.pairing_backend).sec_level¶kof k-LIN inmife/fh_multi_ipe_pairing(default 2).mddh_k¶kof the D_k-MDDH assumption inmcfe/damgard(default 1) and quadraticmiqfe(at least 2, default 2).precision¶Crypto-object key: the ndarray helpers scale real values by
10^precisionand round them to integers (default 0).
Review status and trust¶
- reviewed¶
Checked against the cited construction; no security defect known. Fidelity faithful (as published) or adapted (documented deviations).
- experimental¶
Implemented and checked here, but the construction or its security argument is our own (fidelity ad-hoc); no defect known.
- unreviewed¶
Not yet checked against its paper.
- known-insecure¶
A concrete privacy defect is known; the key generator and crypto objects emit
FESecurityWarning.- honest-but-curious¶
The trust model of the threshold decryption servers: fewer than
tlearn nothing beyond the result, but partial decryptions carry no proof of correctness, so a deviating server can change the result unnoticed.
See Security & Status for the status of every scheme.
Cryptographic variables¶
Variable |
Description |
|---|---|
|
Safe-prime modulus, |
|
Prime order of the subgroup |
|
Cofactor (2) |
|
Generator of the order- |
Variable |
Description |
|---|---|
|
As for DDH |
|
Second generator, hashed into the group from a seed ( |
Variable |
Description |
|---|---|
|
Modulus |
|
|
|
Public base in |
Variable |
Description |
|---|---|
|
Ciphertext modulus |
|
Plaintext modulus |
|
Number of LWE samples (rows of |
|
Gaussian widths of the noise and keys |
|
LWE dimension / ring dimension (see above) |
Variable |
Description |
|---|---|
|
Name of the pairing group (see above) |
|
Group order |
API method naming¶
Method |
Class |
Purpose |
|---|---|---|
|
KeyGenerator |
Generate |
|
KeyGenerator |
Serialise |
|
KeyGenerator |
Serialise a client’s encryption key |
|
KeyGenerator |
Derive a functional decryption key (a server’s key share in the threshold schemes; refused by the decentralized ones) |
|
Crypto |
Encrypt a plaintext vector (under a |
|
Crypto |
Decrypt with a functional key |
|
Crypto |
Threshold schemes: a server’s partial decryption / combining |
|
Crypto |
Decentralized schemes: a client’s key share / combining the shares |
|
Crypto |
Encrypt numpy arrays element-wise |
|
Crypto |
Compute on ndarray ciphertexts (in the threshold schemes, a server’s partial decryptions) |
|
Crypto |
Decrypt ndarray ciphertexts to arrays of results; an element that
does not decrypt raises |