MIFE — Multi-Input Functional Encryption¶
Multi-input functional encryption schemes.
- class pyfe4ai.schemes.mife.MIFE(config)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config)[source]¶
Initialise the MIFE crypto system.
- Parameters:
config (
dict) – Must containkeyswithpp(public parameters) and eithersk(encryption keys) ordk(decryption key).- Return type:
None
- encrypt(lst_pt)[source]¶
Encrypt a plaintext vector for one client.
- Parameters:
lst_pt (
list) – Integer plaintext vector of length ≤eta.- Return type:
- Returns:
Dict with
t(group element pair) andc(ciphertext list).- Raises:
FEKeyError – If public parameters or private keys are missing.
FEValidationError – If plaintext length exceeds
eta.
- decrypt(dct_ct, dk, fusion_weight)[source]¶
Decrypt aggregated ciphertexts to recover the multi-input inner product.
- Parameters:
- Returns:
The inner product as an integer, or
Noneif out of bound.- Raises:
FEKeyError – If decryption key is missing.
FESchemeError – If inputs are inconsistent.
- decrypt_lst_ndarray_ct(dict_ndarray_ct, dk, fusion_weight)[source]¶
Decrypt ndarray ciphertexts from multiple clients.
- compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]¶
Aggregate ndarray ciphertexts (delegates to
decrypt_lst_ndarray_ct()).
- class pyfe4ai.schemes.mife.MIFEKeyGenerator(config, **kwargs)[source]¶
Bases:
DDHKeyGeneratorBaseKey generator for DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE key generator.
- Parameters:
config (
dict) – Scheme configuration. Recognised keys:sec_param,eta(int or per-client dict),n(number of clients),s,lst_nid(client identifiers).- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters (g, p, n, eta, sec_param).
- Return type:
- Returns:
Dict of public parameters.
- get_decryption_keys(sid, **kwargs)[source]¶
Derive a functional decryption key for the given fusion weights.
- Parameters:
sid (
str) – Session identifier.**kwargs – Must include
credentialswithfusion_weight(dict mapping client IDs to weight lists).
- Return type:
- Returns:
Dict with
d(per-client keys) andz(aggregated secret).- Raises:
FEKeyError – If credentials are missing.
- pyfe4ai.schemes.mife.HybridAlphaMIFEKeyGenerator¶
alias of
MIFEKeyGenerator
- class pyfe4ai.schemes.mife.MIFEFHIPE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for function-hiding multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.MIFEFHIPEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for function-hiding multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.MIFEFHMultiIPE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for function-hiding multi-slot multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.MIFEFHMultiIPEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for function-hiding multi-slot multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.MIFEFullySecLWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for fully secure LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.MIFEFullySecLWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for fully secure LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.MIFEPaillier(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for Paillier-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.MIFEPaillierKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for Paillier-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- pyfe4ai.schemes.mife.MIFEDamgardDDH¶
alias of
MIFEDamgard
- pyfe4ai.schemes.mife.MIFEDamgardDDHKeyGenerator¶
alias of
MIFEDamgardKeyGenerator
- class pyfe4ai.schemes.mife.MIFELWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE LWE crypto system.
- Parameters:
config (
dict) – Must containkeyswithpp(public parameters) and optionallysk(encryption keys).- Return type:
None
- encrypt(lst_pt)[source]¶
Encrypt a plaintext vector for one client.
- Parameters:
lst_pt (
list) – Integer plaintext vector of lengtheta.- Return type:
- Returns:
Dict with
ct0andct1(serialised LWE ciphertext vectors).- Raises:
FEKeyError – If public parameters or encryption keys are missing.
FEValidationError – If plaintext length or values are invalid.
- decrypt(dct_ct, dk, fusion_weight)[source]¶
Decrypt aggregated ciphertexts to recover the multi-input inner product.
- Parameters:
- Returns:
The inner product as an integer.
- Raises:
FEKeyError – If decryption key is missing.
FEValidationError – If fusion weight length or values are invalid.
- encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]¶
Encrypt a list of ndarrays element-wise (requires
eta=1).
- compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]¶
Aggregate ndarray ciphertexts (delegates to
decrypt_lst_ndarray_ct()).
- class pyfe4ai.schemes.mife.MIFELWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE LWE key generator.
- Parameters:
config (
dict) – Scheme configuration. Recognised keys:sec_param,eta,n(number of clients),lwe_n,bound_x,bound_y.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
Dict containing
A,p,q,m,eta,n,lwe_n,bound_x,bound_y,sec_param.
- get_decryption_keys(sid, **kwargs)[source]¶
Derive a functional decryption key for the given fusion weights.
- Parameters:
sid (
str) – Session identifier.**kwargs – Must include
credentialswithfusion_weight(dict mapping client IDs to weight lists).
- Return type:
- Returns:
Dict with
sk_y(per-client projected secret keys).- Raises:
FEKeyError – If credentials are missing.
FEValidationError – If fusion weights are invalid or exceed
bound_y.
- class pyfe4ai.schemes.mife.MIFERingLWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for Ring-LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.MIFERingLWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for Ring-LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.ThresholdMIFE(config)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for threshold DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
Compute a partial decryption share.
- class pyfe4ai.schemes.mife.ThresholdMIFEKeyGenerator(config)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for threshold DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.ThresholdMIFELWE(config, **kwargs)[source]¶
Bases:
MIFELWECrypto operations for threshold LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
Compute a partial decryption share.
- compute_lst_ndarray_ct(dict_ndarray_ct, credentials, dk, lst_sid_enrolled)[source]¶
Compute inner products on encrypted ndarray ciphertexts.
- class pyfe4ai.schemes.mife.ThresholdMIFELWEKeyGenerator(config, **kwargs)[source]¶
Bases:
MIFELWEKeyGeneratorKey generator for threshold LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
DDH¶
Multi Input Functional Encryption | From “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | Published in: CRYPTO 2018 | By: Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, and Bogdan Ursu5 | URL: https://eprint.iacr.org/2017/972.pdf
type: public-key encryption
setting: Integer based
- class pyfe4ai.schemes.mife.ddh.MIFEKeyGenerator(config, **kwargs)[source]¶
Bases:
DDHKeyGeneratorBaseKey generator for DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE key generator.
- Parameters:
config (
dict) – Scheme configuration. Recognised keys:sec_param,eta(int or per-client dict),n(number of clients),s,lst_nid(client identifiers).- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters (g, p, n, eta, sec_param).
- Return type:
- Returns:
Dict of public parameters.
- get_decryption_keys(sid, **kwargs)[source]¶
Derive a functional decryption key for the given fusion weights.
- Parameters:
sid (
str) – Session identifier.**kwargs – Must include
credentialswithfusion_weight(dict mapping client IDs to weight lists).
- Return type:
- Returns:
Dict with
d(per-client keys) andz(aggregated secret).- Raises:
FEKeyError – If credentials are missing.
- class pyfe4ai.schemes.mife.ddh.MIFE(config)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config)[source]¶
Initialise the MIFE crypto system.
- Parameters:
config (
dict) – Must containkeyswithpp(public parameters) and eithersk(encryption keys) ordk(decryption key).- Return type:
None
- encrypt(lst_pt)[source]¶
Encrypt a plaintext vector for one client.
- Parameters:
lst_pt (
list) – Integer plaintext vector of length ≤eta.- Return type:
- Returns:
Dict with
t(group element pair) andc(ciphertext list).- Raises:
FEKeyError – If public parameters or private keys are missing.
FEValidationError – If plaintext length exceeds
eta.
- decrypt(dct_ct, dk, fusion_weight)[source]¶
Decrypt aggregated ciphertexts to recover the multi-input inner product.
- Parameters:
- Returns:
The inner product as an integer, or
Noneif out of bound.- Raises:
FEKeyError – If decryption key is missing.
FESchemeError – If inputs are inconsistent.
- decrypt_lst_ndarray_ct(dict_ndarray_ct, dk, fusion_weight)[source]¶
Decrypt ndarray ciphertexts from multiple clients.
- compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]¶
Aggregate ndarray ciphertexts (delegates to
decrypt_lst_ndarray_ct()).
DDH Hybrid-Alpha¶
Multi Input Functional Encryption | From “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | Published in: CRYPTO 2018 | By: Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, and Bogdan Ursu5 | URL: https://eprint.iacr.org/2017/972.pdf
type: public-key encryption
setting: Integer based
- class pyfe4ai.schemes.mife.ddh_hybrid_alpha.MIFEKeyGenerator(config, **kwargs)[source]¶
Bases:
DDHKeyGeneratorBaseKey generator for DDH-based multi-input FE (hybrid-alpha variant).
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.ddh_hybrid_alpha.MIFE(config)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for DDH-based multi-input FE (hybrid-alpha variant).
- Parameters:
config (
dict)
DDH Threshold¶
R. Xu et al., “TAPFed: Threshold Secure Aggregation for Privacy-Preserving Federated Learning,” in IEEE Transactions on Dependable and Secure Computing, doi: 10.1109/TDSC.2024.3350206.
type: public-key encryption
setting: Integer based
- class pyfe4ai.schemes.mife.ddh_threshold.ThresholdMIFEKeyGenerator(config)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for threshold DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.ddh_threshold.ThresholdMIFE(config)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for threshold DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
Compute a partial decryption share.
Damgård DDH¶
Damgard-Based Multi-Input Inner-Product Functional Encryption | Multi-input construction inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | Instantiated here with a Damgard/DDH-based single-input building block inspired by | Agrawal, Libert, Stehle: | “Fully Secure Functional Encryption for Inner Products, from Standard | Assumptions” | Published in: CRYPTO 2016
type: public-key encryption
setting: Integer based
- note: research-oriented Python prototype aligned with the existing
crypto-ipfe API style
- class pyfe4ai.schemes.mife.damgard_ddh.MIFEDamgardKeyGenerator(config, **kwargs)[source]¶
Bases:
DamgardDDHKeyGeneratorBaseKey generator for Damgard DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.damgard_ddh.MIFEDamgard(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for Damgard DDH-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
LWE¶
LWE-Based Multi-Input Inner-Product Functional Encryption | Multi-input organization inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | This prototype composes per-client simple LWE inner-product FE instances | following the repository’s MIFE API, using the LWE instantiation of | “Simple Functional Encryption Schemes for Inner Products” | By Michel Abdalla, Florian Bourse, Angelo De Caro, David Pointcheval | Published in: PKC 2015
type: public-key encryption
setting: Integer based
note: prototype implementation aligned with the existing crypto-ipfe API
- class pyfe4ai.schemes.mife.lwe.MIFELWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE LWE key generator.
- Parameters:
config (
dict) – Scheme configuration. Recognised keys:sec_param,eta,n(number of clients),lwe_n,bound_x,bound_y.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
Dict containing
A,p,q,m,eta,n,lwe_n,bound_x,bound_y,sec_param.
- get_decryption_keys(sid, **kwargs)[source]¶
Derive a functional decryption key for the given fusion weights.
- Parameters:
sid (
str) – Session identifier.**kwargs – Must include
credentialswithfusion_weight(dict mapping client IDs to weight lists).
- Return type:
- Returns:
Dict with
sk_y(per-client projected secret keys).- Raises:
FEKeyError – If credentials are missing.
FEValidationError – If fusion weights are invalid or exceed
bound_y.
- class pyfe4ai.schemes.mife.lwe.MIFELWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Initialise the MIFE LWE crypto system.
- Parameters:
config (
dict) – Must containkeyswithpp(public parameters) and optionallysk(encryption keys).- Return type:
None
- encrypt(lst_pt)[source]¶
Encrypt a plaintext vector for one client.
- Parameters:
lst_pt (
list) – Integer plaintext vector of lengtheta.- Return type:
- Returns:
Dict with
ct0andct1(serialised LWE ciphertext vectors).- Raises:
FEKeyError – If public parameters or encryption keys are missing.
FEValidationError – If plaintext length or values are invalid.
- decrypt(dct_ct, dk, fusion_weight)[source]¶
Decrypt aggregated ciphertexts to recover the multi-input inner product.
- Parameters:
- Returns:
The inner product as an integer.
- Raises:
FEKeyError – If decryption key is missing.
FEValidationError – If fusion weight length or values are invalid.
- encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]¶
Encrypt a list of ndarrays element-wise (requires
eta=1).
- compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]¶
Aggregate ndarray ciphertexts (delegates to
decrypt_lst_ndarray_ct()).
Fully-Secure LWE¶
Fully Secure LWE-Based Multi-Input Inner-Product Functional Encryption | Multi-input organization inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | Instantiated here with the fully secure LWE single-input line from | “Fully Secure Functional Encryption for Inner Products, | from Standard Assumptions” | By Shweta Agrawal, Benoit Libert, Damien Stehle | Published in: CRYPTO 2016
type: public-key encryption
setting: Integer based
note: research-oriented Python prototype aligned with the crypto-ipfe API
- class pyfe4ai.schemes.mife.fullysec_lwe.MIFEFullySecLWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for fully secure LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.fullysec_lwe.MIFEFullySecLWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for fully secure LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
LWE Threshold¶
Threshold LWE-Based Multi-Input Inner-Product Functional Encryption | Threshold secure aggregation organization inspired by | “TAPFed: Threshold Secure Aggregation for Privacy-Preserving Federated Learning” | Published in: IEEE TDSC | | This prototype combines threshold decryption-key sharing with the | repository’s LWE-based MIFE line.
type: public-key encryption
setting: Integer based
note: research prototype aligned with the existing crypto-ipfe API
- class pyfe4ai.schemes.mife.lwe_threshold.ThresholdMIFELWEKeyGenerator(config, **kwargs)[source]¶
Bases:
MIFELWEKeyGeneratorKey generator for threshold LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- class pyfe4ai.schemes.mife.lwe_threshold.ThresholdMIFELWE(config, **kwargs)[source]¶
Bases:
MIFELWECrypto operations for threshold LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
Compute a partial decryption share.
- compute_lst_ndarray_ct(dict_ndarray_ct, credentials, dk, lst_sid_enrolled)[source]¶
Compute inner products on encrypted ndarray ciphertexts.
Ring-LWE¶
Ring-LWE-Based Multi-Input Inner-Product Functional Encryption | Multi-input organization inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | This prototype combines the repository’s MIFE API with the Ring-LWE | inner-product FE line from | “Efficient Lattice-Based Inner-Product Functional Encryption” | By Bermudo Mera, Karmakar, Marc, Soleimanian | ePrint: 2021/046
type: public-key encryption
setting: Integer based
note: research prototype with SIMD-style matrix encryption
- class pyfe4ai.schemes.mife.ring_lwe.MIFERingLWEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for Ring-LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.ring_lwe.MIFERingLWE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for Ring-LWE-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
Paillier¶
Paillier-Based Multi-Input Inner-Product Functional Encryption | Multi-input construction inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | Instantiated here with a Paillier-based single-input building block inspired by | Agrawal, Libert, Stehle: | “Fully Secure Functional Encryption for Inner Products, from Standard | Assumptions” | Published in: CRYPTO 2016
type: public-key encryption
setting: Integer based
- note: research-oriented Python prototype aligned with the existing
crypto-ipfe API style
- class pyfe4ai.schemes.mife.paillier.MIFEPaillierKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for Paillier-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.paillier.MIFEPaillier(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for Paillier-based multi-input inner-product FE.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
FH-IPE (Pairing)¶
Function-Hiding Multi-Input Inner-Product Encryption over Pairings | Multi-input organization inspired by | “Multi-Input Functional Encryption for Inner Products: | Function-Hiding Realizations and Constructions without Pairings” | By Michel Abdalla, Dario Catalano, Dario Fiore, Romain Gay, Bogdan Ursu | Published in: CRYPTO 2018 | | This prototype composes per-client pairing-based FH-IPE instances and | adapts them to the repository’s MIFE API.
type: public-key encryption
setting: Pairing based
note: research prototype aligned with the existing crypto-ipfe API
- class pyfe4ai.schemes.mife.fh_ipe_pairing.MIFEFHIPEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for function-hiding multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.fh_ipe_pairing.MIFEFHIPE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for function-hiding multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
FH-Multi-IPE (Pairing)¶
Function-Hiding Multi-Input Inner-Product Encryption over Pairings | Based on | “Full-Hiding (Unbounded) Multi-Input Inner Product Functional Encryption | from the k-Linear Assumption” | By Palash Datta, Tatsuaki Okamoto, Jun Tomida | See ePrint 2018/061 | | This prototype follows the GoFE innerprod/fullysec/fh_multi_ipe.go | organization and adapts it to the repository’s MIFE API.
type: public-key encryption
setting: Pairing based
note: research prototype aligned with the existing crypto-ipfe API
- class pyfe4ai.schemes.mife.fh_multi_ipe_pairing.MIFEFHMultiIPEKeyGenerator(config, **kwargs)[source]¶
Bases:
IPFEAbsKeyGenerator,ParameterCacheMixinKey generator for function-hiding multi-slot multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None
- get_public_parameters()[source]¶
Return serialisable public parameters.
- Return type:
- Returns:
A dict of public parameters, or
Noneon error.
- class pyfe4ai.schemes.mife.fh_multi_ipe_pairing.MIFEFHMultiIPE(config, **kwargs)[source]¶
Bases:
IPFEAbsCryptoCrypto operations for function-hiding multi-slot multi-input IPE over pairings.
- Parameters:
config (
dict)
- __init__(config, **kwargs)[source]¶
Perform the __init__ operation.
- Parameters:
config (
dict) – Scheme configuration dict.- Return type:
None