Configuration¶
The config classes of the key generators, the security profiles’ rules and the rules that combine options. The options of every scheme, their defaults under each profile and the refused combinations are listed on Configuration options.
Typed configurations of the key generators, and the rules that combine their options.
A key generator takes its configuration as a mapping of options. When it is
built, the mapping is converted into the config class of its scheme (a
dict subclass, so a config is used as a dict everywhere) and the
security profile is applied (resolve()): unknown profiles, schemes the
standard profile refuses (the refused reason of their entry in
pyfe4ai.core.registry) and values weaker than its minima
(STANDARD_MINIMA) are refused there, before __init__ runs.
Each config class declares the options of its scheme (Option: what
it holds, its default, the values it accepts), so config.ring_n reads an
option with its default, and the page Configuration options of the
documentation is rendered from these declarations (options_rst()).
The rules that combine the options of the threshold schemes – the key
sharing for t < s, the flooding accounting, the key-share layout – are
here too (resolve_sharing(), flooding_config(),
check_kl_threshold(), check_kl_flooding(),
check_kl_sharing(), threshold_key_shares(),
check_no_flooding_options()); the schemes call them where their checks
were, so that a config is accepted or refused exactly as before, with the
same exception. Every other refusal stays with the code that sizes the
parameters (bounds against a modulus, ring and LWE dimensions under
standard, RNS factors against s); COMBINATIONS lists all of
them for the documentation.
Crypto objects (encryptors, servers, decryptors) take their config as given;
their options are documented with their scheme (CRYPTO).
- pyfe4ai.core.config.SHARING_SCHEMES = ('shamir', 'replicated', 'replicated-seeded')¶
Ways the LWE / Ring-LWE threshold layers share a functional key (option
sharing):"shamir","replicated"or the opt-in"replicated-seeded"(seepyfe4ai.schemes.threshold.sharingandresolve_sharing()).
- pyfe4ai.core.config.PER_SAMPLE = 'per-sample'¶
Accountings of the flooding noise (option
flooding_accounting; seepyfe4ai.schemes.threshold.kl): per sample (the default) or the opt-in KL bound of a run.
- pyfe4ai.core.config.FLOODINGS = ('uniform', 'gaussian')¶
Flooding distributions of the partial decryptions of the threshold MCFE over Ring-LWE (option
flooding), and its default.
- pyfe4ai.core.config.KEY_SHARES = ('split', 'full')¶
How the threshold MCFE over Ring-LWE issues key shares (option
key_shares):"split"(the default for the Shamir and replicated sharings) – a weight part per weights and a label part per label – or"full"(whole key shares per label, as in versions <= 0.3.0; the only kind of the replicated-seeded sharing).
- pyfe4ai.core.config.DEFAULT_CT_FORMAT = 'binary'¶
ct_formatof the threshold MCFE over Ring-LWE when its config has none.
- pyfe4ai.core.config.DEFAULT_RING_MODULUS = 'rns'¶
ring_modulusof the threshold MCFE over Ring-LWE when its config has none.
- class pyfe4ai.core.config.Derived(text)[source]¶
Bases:
objectA default that the key generator derives (from other options, the environment or its parameters); text says how.
- Parameters:
text (
str)
- class pyfe4ai.core.config.Option(doc, *, default=None, allowed=None, standard=None)[source]¶
Bases:
objectAn option of a key generator’s config.
- Parameters:
doc (
str) – What the option holds.default (
Any, default:None) – Its value when the config has none: a value, or aDeriveddescription.allowed (
Any, default:None) – The values accepted: a tuple of choices or a description.standard (
str|None, default:None) – What thestandardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- class pyfe4ai.core.config.SchemeConfig[source]¶
Bases:
dictThe config of a key generator: a
dictof options whose declared options also read as attributes, with their defaults.Subclasses (one per scheme, with family bases) declare their options as
Optionattributes and name the scheme inSCHEME;CRYPTOdocuments the options of the scheme’s crypto objects.- SCHEME: ClassVar[tuple[str, str] | None] = None¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- security_profile¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- s¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- lst_nid¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- cache_dir¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.config_class(scheme)[source]¶
The config class of scheme (
(family, variant));SchemeConfigfor a key generator that is not a registered scheme.- Parameters:
- Return type:
- pyfe4ai.core.config.config_classes()[source]¶
The config class of every registered scheme, by
(family, variant).
- pyfe4ai.core.config.STANDARD_MINIMA = {'dcr': {'bit_length': 1536, 'stat_param': 128}, 'dl': {'modulus_length': 3072, 'sec_param': 3072, 'stat_param': 128}, 'ec': {}, 'lwe': {'stat_param': 128}, 'lwe_abdp15': {'stat_param': 128}, 'ring_lwe': {'sec_param': 128, 'stat_param': 128}}¶
Minimum value of each size option under
standard, by scheme kind; also its default there.stat_paramis ignored by the schemes that do not use it.
- pyfe4ai.core.config.STANDARD_PRESETS = {'lwe': {'lwe_n': 'auto'}, 'lwe_abdp15': {'lwe_n': 'auto'}, 'ring_lwe': {'ring_n': 'auto'}}¶
Options the
standardprofile sets when the config has none, by scheme kind: the dimension is then derived from the 128-bit tables.
- pyfe4ai.core.config.STANDARD_PAIRING_GROUP = 'BLS12-381'¶
The pairing group of the
standardprofile (the only one it accepts).
- pyfe4ai.core.config.STANDARD_FIXED: dict = {}¶
Settings the
standardprofile fixes for single schemes, with the reason ({scheme: ({key: value}, reason)}).
- pyfe4ai.core.config.resolve(config, scheme)[source]¶
Return config completed with the presets of its
security_profile.The key generators call it on their config, converted to the scheme’s config class (see the module docstring).
- Parameters:
- Raises:
FEValidationError – For an unknown profile, a scheme the profile does not support, or an explicit value weaker than the profile’s.
- Warns:
FESecurityWarning – For a pairing scheme under
standard(BLS12-381, about 120 to 126-bit security), attributed to the application’s call (the first frame outside pyfe4ai, seewarn_at_caller()): Python’s default filter shows it once per call site of the application.- Return type:
- pyfe4ai.core.config.validate_sharing(sharing)[source]¶
Return sharing if it is one of
SHARING_SCHEMES, else raise.- Return type:
- pyfe4ai.core.config.resolve_sharing(config, s, t, scheme)[source]¶
The key sharing of a threshold LWE / Ring-LWE layer for config.
config["sharing"]if given, else"replicated"fort < sand"shamir"fort = s(where the two are equally sound and Shamir gives the outputs of versions <= 0.3.0). An explicit"shamir"witht < s– the sharing of versions <= 0.3.0, whose partial decryptions reveal the decryption noise modulo small integers (seepyfe4ai.schemes.threshold.sharing) – is refused under thestandardprofile and draws aFESecurityWarningotherwise.- Parameters:
config (
dict) – The key generator’s (profile-resolved) config.s – Number of servers.
t – Threshold (checked later by
validate_threshold()).scheme (
str) – Name of the scheme, for messages.
- Raises:
FEValidationError – For a threshold that is not an integer (also a
bool), an unknown sharing, or"shamir"witht < sunderstandard.- Return type:
- pyfe4ai.core.config.flooding_config(config)[source]¶
(flooding_accounting, max_partial_decryptions)of a key generator config.
- pyfe4ai.core.config.check_kl_threshold(t, s)[source]¶
Refuse
"kl"fort < s(seepyfe4ai.schemes.threshold.kl).- Raises:
FEValidationError – Unless
t == s.- Parameters:
- Return type:
- pyfe4ai.core.config.check_kl_flooding(flooding, sharing)[source]¶
Refuse
"kl"(threshold MCFE over Ring-LWE) but for Gaussian flooding of Shamir key shares, which is what the KL bound accounts for.- Raises:
FEValidationError – Unless
flooding == "gaussian"andsharing == "shamir".- Parameters:
- Return type:
- pyfe4ai.core.config.check_kl_sharing(sharing)[source]¶
Refuse
"kl"(threshold MIFE over LWE) but for Shamir key shares.- Raises:
FEValidationError – Unless
sharing == "shamir".- Parameters:
sharing (
str)- Return type:
The
key_sharesof the threshold MCFE over Ring-LWE: the config’s, else"full"for the replicated-seeded sharing and"split"otherwise.- Raises:
FEValidationError – For a value not in
KEY_SHARES, or"split"with the replicated-seeded sharing.- Parameters:
- Return type:
- pyfe4ai.core.config.check_no_flooding_options(config)[source]¶
Refuse the flooding-accounting options for the threshold MCFE over LWE, whose flooding is part of an LWE argument, not a statistical step.
- Raises:
FEValidationError – For
flooding_accountingother than the default, or anymax_partial_decryptions.- Parameters:
config (
dict)- Return type:
- pyfe4ai.core.config.ETA()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.BOUND_X()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.BOUND_Y()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.BOUND()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.GROUP()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.MODULUS_LENGTH()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.BIT_LENGTH()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.LWE_N()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.MATRIX_MODE()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.GAUSSIAN_SAMPLER()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.LIBRARY_SAMPLER()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.RING_MODULUS()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.RING_N()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.LABEL_HASH()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.PAIRING_GROUP_PARAM()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.T()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.S()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.LST_SID()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.SHARING()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.FLOODING_ACCOUNTING()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.MAX_PARTIAL_DECRYPTIONS()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pyfe4ai.core.config.STAT_PARAM()¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- class pyfe4ai.core.config.DDHConfig[source]¶
Bases:
SchemeConfigOptions of the DDH schemes over
Z_p^*.- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- group¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.RistrettoConfig[source]¶
Bases:
SchemeConfigOptions of the DDH schemes over ristretto255 (a fixed group).
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- group¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='ristretto255'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DamgardDDHConfig[source]¶
Bases:
SchemeConfigOptions of the Damgard / MDDH schemes.
- modulus_length¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'modulus_length': Option('modulus_length', default=``sec_param``), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.PaillierConfig[source]¶
Bases:
SchemeConfigOptions of the Paillier (DCR) schemes.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bit_length¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bit_length': Option('bit_length', default=128), 'bound_x': Option('bound_x', default=100), 'bound_y': Option('bound_y', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.LWEConfig[source]¶
Bases:
SchemeConfigOptions of the LWE schemes.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- lwe_n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ABDP15Config[source]¶
Bases:
LWEConfigOptions of the ABDP15 IPFE with a seeded public matrix (SIFE, MIFE and threshold MIFE over LWE).
- matrix_mode¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- gaussian_sampler¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default=the library-wide sampler (``rounded`` unless ``PYFE4AI_GAUSSIAN_SAMPLER``, ``set_gaussian_sampler`` or a ``gaussian_sampler()`` block says otherwise); ``facct`` under ``standard``), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'matrix_mode': Option('matrix_mode', default='memory'), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.RingLWEConfig[source]¶
Bases:
SchemeConfigOptions of the Ring-LWE schemes.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ring_modulus¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ring_n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- gaussian_sampler¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.PairingIPEConfig[source]¶
Bases:
SchemeConfigOptions of the pairing-based inner-product schemes.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pairing_group_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=16), 'bound_y': Option('bound_y', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdConfig[source]¶
Bases:
SchemeConfigOptions of the threshold schemes (with their scheme’s options).
- t¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- s¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- lst_sid¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdSharingConfig[source]¶
Bases:
ThresholdConfigOptions of the threshold LWE / Ring-LWE layers, which share keys in several ways.
- sharing¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'sharing': Option('sharing', default=``replicated`` for ``t < s``, else ``shamir``), 'stat_param': Option('stat_param', default=unused), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.CryptoConfig[source]¶
Bases:
dictOptions of every crypto object (encryptor, server, decryptor); the config classes of the schemes list their own (
CRYPTO).
- class pyfe4ai.core.config.SIFEDDHConfig[source]¶
Bases:
DDHConfigConfig of
SIFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'ddh')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEDDHRistretto255Config[source]¶
Bases:
RistrettoConfigConfig of
SIFEDDHRistretto255KeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'ddh_ristretto255')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'group': Option('group', default='ristretto255'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFELWEConfig[source]¶
Bases:
ABDP15ConfigConfig of
SIFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'matrix_mode': Option('matrix_mode', default='memory')}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'gaussian_sampler': Option('gaussian_sampler', default=the library-wide sampler (``rounded`` unless ``PYFE4AI_GAUSSIAN_SAMPLER``, ``set_gaussian_sampler`` or a ``gaussian_sampler()`` block says otherwise); ``facct`` under ``standard``), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'matrix_mode': Option('matrix_mode', default='memory'), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEPaillierConfig[source]¶
Bases:
PaillierConfigConfig of
SIFEPaillierKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'paillier')¶
(family, variant)of the scheme, orNonefor a base class.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bit_length': Option('bit_length', default=128), 'bound_x': Option('bound_x', default=100), 'bound_y': Option('bound_y', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEDamgardConfig[source]¶
Bases:
DamgardDDHConfigConfig of
SIFEDamgardKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'damgard')¶
(family, variant)of the scheme, orNonefor a base class.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'modulus_length': Option('modulus_length', default=``sec_param``), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFERingLWEConfig[source]¶
Bases:
RingLWEConfigConfig of
SIFERingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'ring_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'gaussian_sampler': Option('', default=the public parameters' sampler, else ``facct``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ring_modulus¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEFullySecRingLWEConfig[source]¶
Bases:
RingLWEConfigConfig of
SIFEFullySecRingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'fullysec_ring_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'gaussian_sampler': Option('', default=the public parameters' sampler, else ``facct``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ring_modulus¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- m¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ndarray_layout¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'm': Option('m', default='auto'), 'n': Option('n', default=None), 'ndarray_layout': Option('ndarray_layout', default='elementwise'), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEFullySecLWEConfig[source]¶
Bases:
LWEConfigConfig of
SIFEFullySecLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'fullysec_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- lwe_n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=64), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEDDHDynamicConfig[source]¶
Bases:
DDHConfigConfig of
SIFEDDHDynamicKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'ddh_dynamic')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEFHIPEPairingConfig[source]¶
Bases:
PairingIPEConfigConfig of
SIFEFHIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'fh_ipe_pairing')¶
(family, variant)of the scheme, orNonefor a base class.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=16), 'bound_y': Option('bound_y', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=5), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.SIFEPartFHIPEPairingConfig[source]¶
Bases:
SchemeConfigConfig of
SIFEPartFHIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('sife', 'part_fh_ipe_pairing')¶
(family, variant)of the scheme, orNonefor a base class.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pairing_group_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- subspace_dim¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- coeff_bound¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=``bound_x``, else 16), 'bound_x': Option('bound_x', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'coeff_bound': Option('coeff_bound', default=1), 'eta': Option('eta', default=5), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused), 'subspace_dim': Option('subspace_dim', default=1)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEDDHConfig[source]¶
Bases:
DDHConfigConfig of
MIFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'ddh')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEDDHRistretto255Config[source]¶
Bases:
RistrettoConfigConfig of
MIFEDDHRistretto255KeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'ddh_ristretto255')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='ristretto255'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFELWEConfig[source]¶
Bases:
ABDP15ConfigConfig of
MIFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'matrix_mode': Option('matrix_mode', default='memory')}¶
Options of the scheme’s crypto objects, by name.
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default=the library-wide sampler (``rounded`` unless ``PYFE4AI_GAUSSIAN_SAMPLER``, ``set_gaussian_sampler`` or a ``gaussian_sampler()`` block says otherwise); ``facct`` under ``standard``), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'matrix_mode': Option('matrix_mode', default='memory'), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEPaillierConfig[source]¶
Bases:
PaillierConfigConfig of
MIFEPaillierKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'paillier')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bit_length': Option('bit_length', default=128), 'bound_x': Option('bound_x', default=100), 'bound_y': Option('bound_y', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEDamgardConfig[source]¶
Bases:
DamgardDDHConfigConfig of
MIFEDamgardKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'damgard')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'modulus_length': Option('modulus_length', default=``sec_param``), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFERingLWEConfig[source]¶
Bases:
RingLWEConfigConfig of
MIFERingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'ring_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'ct_format': Option('', default='json'), 'gaussian_sampler': Option('', default=the public parameters' sampler, else ``facct``)}¶
Options of the scheme’s crypto objects, by name.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEFullySecLWEConfig[source]¶
Bases:
LWEConfigConfig of
MIFEFullySecLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'fullysec_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- lwe_n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=64), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEFHIPEPairingConfig[source]¶
Bases:
PairingIPEConfigConfig of
MIFEFHIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'fh_ipe_pairing')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=16), 'bound_y': Option('bound_y', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MIFEFHMultiIPEPairingConfig[source]¶
Bases:
PairingIPEConfigConfig of
MIFEFHMultiIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'fh_multi_ipe_pairing')¶
(family, variant)of the scheme, orNonefor a base class.
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- sec_level¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=16), 'bound_y': Option('bound_y', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_level': Option('sec_level', default=2), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMIFEDDHConfig[source]¶
Bases:
MIFEDDHConfig,ThresholdConfigConfig of
ThresholdMIFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'ddh_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMIFELWEConfig[source]¶
Bases:
MIFELWEConfig,ThresholdSharingConfigConfig of
ThresholdMIFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mife', 'lwe_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'legacy_shamir': Option('', default='refuse'), 'matrix_mode': Option('matrix_mode', default='memory'), 'partial_budget': Option('', default=None)}¶
Options of the scheme’s crypto objects, by name.
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- flooding_accounting¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- max_partial_decryptions¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'flooding_accounting': Option('flooding_accounting', default='per-sample'), 'gaussian_sampler': Option('gaussian_sampler', default=the library-wide sampler (``rounded`` unless ``PYFE4AI_GAUSSIAN_SAMPLER``, ``set_gaussian_sampler`` or a ``gaussian_sampler()`` block says otherwise); ``facct`` under ``standard``), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'lwe_n': Option('lwe_n', default=32), 'matrix_mode': Option('matrix_mode', default='memory'), 'max_partial_decryptions': Option('max_partial_decryptions', default=None), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'sharing': Option('sharing', default=``replicated`` for ``t < s``, else ``shamir``), 'stat_param': Option('stat_param', default=64), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEDDHConfig[source]¶
Bases:
DDHConfigConfig of
MCFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ddh')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEDDHRistretto255Config[source]¶
Bases:
RistrettoConfigConfig of
MCFEDDHRistretto255KeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ddh_ristretto255')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'dlog_bound': Option('', default=``10^(precision + 2)``)}¶
Options of the scheme’s crypto objects, by name.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='ristretto255'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFELWEConfig[source]¶
Bases:
LWEConfigConfig of
MCFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- gaussian_sampler¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- label_hash¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEPaillierConfig[source]¶
Bases:
PaillierConfigConfig of
MCFEPaillierKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'paillier')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bit_length': Option('bit_length', default=128), 'bound_x': Option('bound_x', default=100), 'bound_y': Option('bound_y', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEDamgardConfig[source]¶
Bases:
DamgardDDHConfigConfig of
MCFEDamgardKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'damgard')¶
(family, variant)of the scheme, orNonefor a base class.
- mddh_k¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'mddh_k': Option('mddh_k', default=1), 'modulus_length': Option('modulus_length', default=``sec_param``), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFERingLWEConfig[source]¶
Bases:
RingLWEConfigConfig of
MCFERingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ring_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'ct_format': Option('', default='json'), 'gaussian_sampler': Option('', default=the public parameters' sampler, else ``facct``)}¶
Options of the scheme’s crypto objects, by name.
- label_hash¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEFullySecLWEConfig[source]¶
Bases:
MCFELWEConfigConfig of
MCFEFullySecLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'fullysec_lwe')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.MCFEFHMultiIPEPairingConfig[source]¶
Bases:
PairingIPEConfigConfig of
MCFEFHMultiIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'fh_multi_ipe_pairing')¶
(family, variant)of the scheme, orNonefor a base class.
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_y¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=10), 'bound_y': Option('bound_y', default=10), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMCFEFHMultiIPEPairingConfig[source]¶
Bases:
MCFEFHMultiIPEPairingConfig,ThresholdConfigConfig of
ThresholdMCFEFHMultiIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'fh_multi_ipe_pairing_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=10), 'bound_y': Option('bound_y', default=10), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DecentralizedMCFEFHMultiIPEPairingConfig[source]¶
Bases:
MCFEFHMultiIPEPairingConfigConfig of
DecentralizedMCFEFHMultiIPEPairingKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'fh_multi_ipe_pairing_decentralized')¶
(family, variant)of the scheme, orNonefor a base class.
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=10), 'bound_y': Option('bound_y', default=10), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMCFEDDHConfig[source]¶
Bases:
MCFEDDHConfig,ThresholdConfigConfig of
ThresholdMCFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ddh_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- s¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 3), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DecentralizedMCFEDDHConfig[source]¶
Bases:
MCFEDDHConfigConfig of
DecentralizedMCFEDDHKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ddh_decentralized')¶
(family, variant)of the scheme, orNonefor a base class.
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'group': Option('group', default='modp'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMCFELWEConfig[source]¶
Bases:
MCFELWEConfig,ThresholdSharingConfigConfig of
ThresholdMCFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'lwe_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'legacy_shamir': Option('', default='refuse')}¶
Options of the scheme’s crypto objects, by name.
- s¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- flooding_accounting¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- max_partial_decryptions¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'flooding_accounting': Option('flooding_accounting', default='per-sample'), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'lwe_n': Option('lwe_n', default=32), 'max_partial_decryptions': Option('max_partial_decryptions', default=None), 'n': Option('n', default=None), 's': Option('s', default=``len(lst_sid)``, else 3), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'sharing': Option('sharing', default=``replicated`` for ``t < s``, else ``shamir``), 'stat_param': Option('stat_param', default=64), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DecentralizedMCFELWEConfig[source]¶
Bases:
MCFELWEConfigConfig of
DecentralizedMCFELWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'lwe_decentralized')¶
(family, variant)of the scheme, orNonefor a base class.
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=20), 'bound_y': Option('bound_y', default=20), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lwe_n': Option('lwe_n', default=32), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.ThresholdMCFERingLWEConfig[source]¶
Bases:
MCFERingLWEConfig,ThresholdSharingConfigConfig of
ThresholdMCFERingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ring_lwe_threshold')¶
(family, variant)of the scheme, orNonefor a base class.
- CRYPTO: ClassVar[dict[str, Option]] = {'ct_format': Option('', default=the public parameters' format), 'gaussian_sampler': Option('', default=the public parameters' sampler, else ``facct``), 'legacy_shamir': Option('', default='refuse'), 'partial_budget': Option('', default=None)}¶
Options of the scheme’s crypto objects, by name.
- stat_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ring_modulus¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- flooding_accounting¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- max_partial_decryptions¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- flooding¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- ct_format¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'ct_format': Option('ct_format', default='binary'), 'eta': Option('eta', default=1), 'flooding': Option('flooding', default=``uniform``; ``gaussian`` with ``flooding_accounting = 'kl'``), 'flooding_accounting': Option('flooding_accounting', default='per-sample'), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'key_shares': Option('key_shares', default=``full`` with ``replicated-seeded``, else ``split``), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'lst_sid': Option('lst_sid', default=``sid_0`` ... ``sid_{s-1}``), 'max_partial_decryptions': Option('max_partial_decryptions', default=None), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='rns'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=``len(lst_sid)``, else 1), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'sharing': Option('sharing', default=``replicated`` for ``t < s``, else ``shamir``), 'stat_param': Option('stat_param', default=64), 't': Option('t', default=2)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DecentralizedMCFERingLWEConfig[source]¶
Bases:
MCFERingLWEConfigConfig of
DecentralizedMCFERingLWEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'ring_lwe_decentralized')¶
(family, variant)of the scheme, orNonefor a base class.
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_x': Option('bound_x', default=4), 'bound_y': Option('bound_y', default=4), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'gaussian_sampler': Option('gaussian_sampler', default='facct'), 'label_hash': Option('label_hash', default='shake128-rejection'), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 'ring_modulus': Option('ring_modulus', default='prime'), 'ring_n': Option('ring_n', default=32 (also for ``None``)), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.DecentralizedMCFEPaillierConfig[source]¶
Bases:
MCFEPaillierConfigConfig of
DecentralizedMCFEPaillierKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('mcfe', 'paillier_decentralized')¶
(family, variant)of the scheme, orNonefor a base class.
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bit_length': Option('bit_length', default=128), 'bound_x': Option('bound_x', default=100), 'bound_y': Option('bound_y', default=100), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=1), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=None), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=64)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.QuadraticQuadConfig[source]¶
Bases:
SchemeConfigConfig of
QuadraticQuadKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('quadratic', 'quad')¶
(family, variant)of the scheme, orNonefor a base class.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pairing_group_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- m¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'm': Option('m', default=``n``), 'n': Option('n', default=2), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.QuadraticSGPConfig[source]¶
Bases:
SchemeConfigConfig of
QuadraticSGPKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('quadratic', 'sgp')¶
(family, variant)of the scheme, orNonefor a base class.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pairing_group_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- eta¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound': Option('bound', default=16), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'eta': Option('eta', default=2), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'n': Option('n', default=``eta``, else 2), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.QuadraticMIQFEConfig[source]¶
Bases:
SchemeConfigConfig of
QuadraticMIQFEKeyGenerator.- SCHEME: ClassVar[tuple[str, str] | None] = ('quadratic', 'miqfe')¶
(family, variant)of the scheme, orNonefor a base class.
- sec_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- pairing_group_param¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- n¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- m¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_x¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- bound_c¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- mddh_k¶
An option of a key generator’s config.
- Parameters:
doc – What the option holds.
default – Its value when the config has none: a value, or a
Deriveddescription.allowed – The values accepted: a tuple of choices or a description.
standard – What the
standardprofile changes, beyond its minima and presets (STANDARD_MINIMA,STANDARD_PRESETS).
- OPTIONS: ClassVar[dict[str, Option]] = {'bound_c': Option('bound_c', default=8), 'bound_x': Option('bound_x', default=8), 'cache_dir': Option('cache_dir', default=``PYFE4AI_CACHE_DIR`` or the per-user cache directory), 'lst_nid': Option('lst_nid', default=``nid_0`` ... ``nid_{n-1}`` when ``n`` is given), 'm': Option('m', default=2), 'mddh_k': Option('mddh_k', default=2), 'n': Option('n', default=None), 'pairing_group_param': Option('pairing_group_param', default='BLS12-381'), 's': Option('s', default=None), 'sec_param': Option('sec_param', default=128), 'security_profile': Option('security_profile', default='toy'), 'stat_param': Option('stat_param', default=unused)}¶
Declared options, by name (every option of the class and its bases).
- class pyfe4ai.core.config.Combination(schemes, when, outcome)[source]¶
Bases:
objectA combination of options a key generator or crypto object refuses (or accepts with a warning), for the documentation.
- pyfe4ai.core.config.COMBINATIONS = (<pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>, <pyfe4ai.core.config.Combination object>)¶
The combinations of options that are refused or constrained, besides the profile’s minima (
STANDARD_MINIMA) and refusals (the registry’srefused).