SIFE — Single-Input Functional Encryption

Single-input functional encryption schemes.

class pyfe4ai.schemes.sife.SIFE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and either sk (encryption keys) or dk (decryption key).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the DDH-based scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length ≤ eta.

Return type:

dict

Returns:

Dict with ct0 (group element) and ct1 (list of group elements).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer, or None if out of bound.

Raises:

FEKeyError – If public parameters or decryption key is missing.

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

class pyfe4ai.schemes.sife.SIFEKeyGenerator(config, **kwargs)[source]

Bases: DDHKeyGeneratorBase

Key generator for DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta (plaintext vector length).

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters (g, p, eta, sec_param).

Return type:

dict

Returns:

Dict of public parameters.

get_private_keys(nid='nid_default')[source]

Return encryption keys (group element list gs).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with gs list.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with z (the inner product of secret key and weights).

Raises:
pyfe4ai.schemes.sife.DynamicSIFE

alias of SIFEDynamic

pyfe4ai.schemes.sife.DynamicSIFEKeyGenerator

alias of SIFEDynamicKeyGenerator

class pyfe4ai.schemes.sife.SIFEFHIPE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

class pyfe4ai.schemes.sife.SIFEFHIPEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.SIFEPartFHIPE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for partially function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

sec_encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight=None)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list | None, default: None) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

class pyfe4ai.schemes.sife.SIFEPartFHIPEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for partially function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.SIFEPaillier(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for Paillier-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

class pyfe4ai.schemes.sife.SIFEPaillierKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for Paillier-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

pyfe4ai.schemes.sife.SIFEDamgardDDH

alias of SIFEDamgard

pyfe4ai.schemes.sife.SIFEDamgardDDHKeyGenerator

alias of SIFEDamgardKeyGenerator

class pyfe4ai.schemes.sife.SIFEFullySecLWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for fully secure LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the fully secure SIFE LWE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and optionally sk (encryption keys).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the fully-secure LWE scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length eta.

Return type:

dict

Returns:

Dict with ct0 and ct1 (serialised LWE ciphertext vectors).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer.

Raises:
encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Encrypt a list of ndarrays element-wise (requires eta=1).

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt.

Return type:

list | None

Returns:

List of object ndarrays containing per-element ciphertexts.

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Aggregate ndarray ciphertexts (delegates to decrypt_lst_ndarray_ct()).

Parameters:
  • dict_ndarray_ct (dict) – Ciphertext arrays to aggregate.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

Decrypted ndarray list.

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt ndarray ciphertexts element-wise.

Parameters:
  • dict_ndarray_ct (dict) – List of object ndarrays with per-element ciphertexts.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

List of float ndarrays with decrypted values.

class pyfe4ai.schemes.sife.SIFEFullySecLWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for fully secure LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the fully secure SIFE LWE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta, lwe_n, bound_x, bound_y.

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

Dict containing A, k, q, m, eta, lwe_n, bound_x, bound_y, and noise parameters.

get_private_keys(nid='nid_default', **kwargs)[source]

Return encryption keys (public-key matrix pk).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with pk matrix.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with sk_y (the projected secret key).

Raises:
class pyfe4ai.schemes.sife.SIFELWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE LWE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and optionally sk (encryption keys).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the LWE-based scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length eta.

Return type:

dict

Returns:

Dict with ct0 and ct1 (serialised LWE ciphertext vectors).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer.

Raises:
encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Encrypt a list of ndarrays element-wise (requires eta=1).

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt.

Return type:

list | None

Returns:

List of object ndarrays containing per-element ciphertexts.

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Aggregate ndarray ciphertexts (delegates to decrypt_lst_ndarray_ct()).

Parameters:
  • dict_ndarray_ct (dict) – Ciphertext arrays to aggregate.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

Decrypted ndarray list.

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt ndarray ciphertexts element-wise.

Parameters:
  • dict_ndarray_ct (dict) – List of object ndarrays with per-element ciphertexts.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

List of float ndarrays with decrypted values.

class pyfe4ai.schemes.sife.SIFELWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE LWE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta, lwe_n, bound_x, bound_y.

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

Dict containing A, p, q, m, eta, lwe_n, bound_x, bound_y, sec_param.

get_private_keys(nid='nid_default', **kwargs)[source]

Return encryption keys (public-key matrix pk).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with pk matrix.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with sk_y (the projected secret key).

Raises:
class pyfe4ai.schemes.sife.SIFERingLWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for Ring-LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(matrix_pt)[source]
Parameters:

matrix_pt (list[list[int]])

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

class pyfe4ai.schemes.sife.SIFERingLWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for Ring-LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

DDH

Simple Single Input Functional Encryption | From “Simple Functional Encryption Schemes for Inner Products” | Published in: PKC 2015 | By Michel Abdalla, Florian Bourse, Angelo De Caro, and David Pointcheval | URL: https://eprint.iacr.org/2015/017.pdf

  • type: public-key encryption

  • setting: Integer based

class pyfe4ai.schemes.sife.ddh.SIFEKeyGenerator(config, **kwargs)[source]

Bases: DDHKeyGeneratorBase

Key generator for DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta (plaintext vector length).

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters (g, p, eta, sec_param).

Return type:

dict

Returns:

Dict of public parameters.

get_private_keys(nid='nid_default')[source]

Return encryption keys (group element list gs).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with gs list.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with z (the inner product of secret key and weights).

Raises:
class pyfe4ai.schemes.sife.ddh.SIFE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and either sk (encryption keys) or dk (decryption key).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the DDH-based scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length ≤ eta.

Return type:

dict

Returns:

Dict with ct0 (group element) and ct1 (list of group elements).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer, or None if out of bound.

Raises:

FEKeyError – If public parameters or decryption key is missing.

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

DDH Dynamic

Simple Single Input Functional Encryption | From “Simple Functional Encryption Schemes for Inner Products” | Published in: PKC 2015 | By Michel Abdalla, Florian Bourse, Angelo De Caro, and David Pointcheval | URL: https://eprint.iacr.org/2015/017.pdf

  • type: public-key encryption

  • setting: Integer based

class pyfe4ai.schemes.sife.ddh_dynamic.SIFEDynamicKeyGenerator(config, **kwargs)[source]

Bases: DDHKeyGeneratorBase

Key generator for DDH-based single-input FE with dynamic key derivation.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default')[source]

Return the private (encryption) keys for client nid.

Parameters:

nid (str, default: 'nid_default') – A client/node identifier.

Return type:

dict | None

Returns:

A dict of private keys, or None if nid is invalid.

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.ddh_dynamic.SIFEDynamic(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for DDH-based single-input FE with dynamic key derivation.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

Damgård DDH

Single-Input Inner-Product Functional Encryption | Inspired by the fully secure Damgard/DDH instantiation exposed in CiFEr / GoFE | From “Fully Secure Functional Encryption for Inner Products, | from Standard Assumptions” | By Shweta Agrawal, Benoit Libert, and Damien Stehle | 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.sife.damgard_ddh.SIFEDamgardKeyGenerator(config, **kwargs)[source]

Bases: DamgardDDHKeyGeneratorBase

Key generator for Damgard DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.damgard_ddh.SIFEDamgard(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for Damgard DDH-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

LWE

LWE-Based Single-Input Inner-Product Functional Encryption | From “Simple Functional Encryption Schemes for Inner Products” | By Michel Abdalla, Florian Bourse, Angelo De Caro, David Pointcheval | Published in: PKC 2015 | | This module implements the generic simple FE construction instantiated | under the LWE assumption as a research-oriented Python prototype.

  • type: public-key encryption

  • setting: Integer based

  • note: prototype implementation aligned with the existing crypto-ipfe API

class pyfe4ai.schemes.sife.lwe.SIFELWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE LWE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta, lwe_n, bound_x, bound_y.

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

Dict containing A, p, q, m, eta, lwe_n, bound_x, bound_y, sec_param.

get_private_keys(nid='nid_default', **kwargs)[source]

Return encryption keys (public-key matrix pk).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with pk matrix.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with sk_y (the projected secret key).

Raises:
class pyfe4ai.schemes.sife.lwe.SIFELWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the SIFE LWE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and optionally sk (encryption keys).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the LWE-based scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length eta.

Return type:

dict

Returns:

Dict with ct0 and ct1 (serialised LWE ciphertext vectors).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer.

Raises:
encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Encrypt a list of ndarrays element-wise (requires eta=1).

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt.

Return type:

list | None

Returns:

List of object ndarrays containing per-element ciphertexts.

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Aggregate ndarray ciphertexts (delegates to decrypt_lst_ndarray_ct()).

Parameters:
  • dict_ndarray_ct (dict) – Ciphertext arrays to aggregate.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

Decrypted ndarray list.

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt ndarray ciphertexts element-wise.

Parameters:
  • dict_ndarray_ct (dict) – List of object ndarrays with per-element ciphertexts.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

List of float ndarrays with decrypted values.

Fully-Secure LWE

Fully Secure LWE-Based Single-Input Inner-Product Functional Encryption | Based on the LWE variant of | “Fully Secure Functional Encryption for Inner Products, | from Standard Assumptions” | By Shweta Agrawal, Benoit Libert, Damien Stehle | Published in: CRYPTO 2016 | | This module follows the GoFE innerprod/fullysec/lwe.go organization while | adapting it to the repository’s Python key-generator and crypto API.

  • type: public-key encryption

  • setting: Integer based

  • note: research prototype aligned with the existing crypto-ipfe API

class pyfe4ai.schemes.sife.fullysec_lwe.SIFEFullySecLWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for fully secure LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the fully secure SIFE LWE key generator.

Parameters:

config (dict) – Scheme configuration. Recognised keys: sec_param, eta, lwe_n, bound_x, bound_y.

Return type:

None

setup()[source]

Generate master secret key (msk) and master public key (mpk).

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

Dict containing A, k, q, m, eta, lwe_n, bound_x, bound_y, and noise parameters.

get_private_keys(nid='nid_default', **kwargs)[source]

Return encryption keys (public-key matrix pk).

Parameters:

nid (str, default: 'nid_default') – Client identifier (unused for single-input schemes).

Return type:

dict | None

Returns:

Dict with pk matrix.

get_decryption_keys(sid, **kwargs)[source]

Derive a functional decryption key for the given fusion weights.

Parameters:
  • sid (str) – Session identifier.

  • **kwargs – Must include credentials with fusion_weight (list of int).

Return type:

dict | None

Returns:

Dict with sk_y (the projected secret key).

Raises:
class pyfe4ai.schemes.sife.fullysec_lwe.SIFEFullySecLWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for fully secure LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Initialise the fully secure SIFE LWE crypto system.

Parameters:

config (dict) – Must contain keys with pp (public parameters) and optionally sk (encryption keys).

Return type:

None

encrypt(lst_pt)[source]

Encrypt a plaintext vector under the fully-secure LWE scheme.

Parameters:

lst_pt (list) – Integer plaintext vector of length eta.

Return type:

dict

Returns:

Dict with ct0 and ct1 (serialised LWE ciphertext vectors).

Raises:
decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt a ciphertext to recover the inner product ⟨x, y⟩.

Parameters:
Returns:

The inner product as an integer.

Raises:
encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Encrypt a list of ndarrays element-wise (requires eta=1).

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt.

Return type:

list | None

Returns:

List of object ndarrays containing per-element ciphertexts.

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Aggregate ndarray ciphertexts (delegates to decrypt_lst_ndarray_ct()).

Parameters:
  • dict_ndarray_ct (dict) – Ciphertext arrays to aggregate.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

Decrypted ndarray list.

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt ndarray ciphertexts element-wise.

Parameters:
  • dict_ndarray_ct (dict) – List of object ndarrays with per-element ciphertexts.

  • **kwargs – Must include dk and fusion_weight.

Return type:

list | None

Returns:

List of float ndarrays with decrypted values.

Ring-LWE

Ring-LWE-Based Single-Input Inner-Product Functional Encryption | Based on | “Efficient Lattice-Based Inner-Product Functional Encryption” | By Bermudo Mera, Karmakar, Marc, Soleimanian | ePrint: 2021/046 | | This module follows the ring-LWE inner-product FE line and is additionally | informed by the GoFE reference implementation in innerprod/simple/ringlwe.go.

  • type: public-key encryption

  • setting: Integer based

  • note: research prototype with SIMD-style matrix encryption

class pyfe4ai.schemes.sife.ring_lwe.SIFERingLWEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for Ring-LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.ring_lwe.SIFERingLWE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for Ring-LWE-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(matrix_pt)[source]
Parameters:

matrix_pt (list[list[int]])

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

Paillier

Paillier-Based Single-Input Inner-Product Functional Encryption | Inspired by the fully secure Paillier instantiation exposed in CiFEr / GoFE | From “Fully Secure Functional Encryption for Inner Products, | from Standard Assumptions” | By Shweta Agrawal, Benoit Libert, and Damien Stehle | 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.sife.paillier.SIFEPaillierKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for Paillier-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.paillier.SIFEPaillier(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for Paillier-based single-input inner-product FE.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

FH-IPE (Pairing)

Function-Hiding Inner-Product Encryption over Pairings | Based on | “Function-Hiding Inner Product Encryption is Practical” | By Kim, Lewi, Mandal, Montgomery, Roy, Wu | | This prototype follows the GoFE innerprod/fullysec/fhipe.go structure and | adapts it to the repository’s single-input FE API.

  • type: public-key encryption

  • setting: Pairing based

  • note: research prototype aligned with the existing crypto-ipfe API

class pyfe4ai.schemes.sife.fh_ipe_pairing.SIFEFHIPEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.fh_ipe_pairing.SIFEFHIPE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

Partial FH-IPE (Pairing)

Partially Function-Hiding Inner-Product Encryption over Pairings | Based on | “A New Paradigm for Public-Key Functional Encryption for Degree-2 Polynomials” | By Romain Gay | | This prototype follows the GoFE innerprod/fullysec/part_fh_ipe.go | organization and adapts it to the repository’s single-input FE API.

  • type: public-key encryption

  • setting: Pairing based

  • note: research prototype aligned with the existing crypto-ipfe API

class pyfe4ai.schemes.sife.part_fh_ipe_pairing.SIFEPartFHIPEKeyGenerator(config, **kwargs)[source]

Bases: IPFEAbsKeyGenerator, ParameterCacheMixin

Key generator for partially function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

setup()[source]

Generate master public and secret keys for the scheme.

Return type:

None

get_public_parameters()[source]

Return serialisable public parameters.

Return type:

dict

Returns:

A dict of public parameters, or None on error.

get_private_keys(nid='nid_default', **kwargs)[source]

Perform the get_private_keys operation.

Parameters:

nid (str, default: 'nid_default') – Node identifier.

Return type:

dict | None

get_decryption_keys(sid, **kwargs)[source]

Perform the get_decryption_keys operation.

Parameters:

sid (str) – Session / decryption-key identifier.

Return type:

dict | None

class pyfe4ai.schemes.sife.part_fh_ipe_pairing.SIFEPartFHIPE(config, **kwargs)[source]

Bases: IPFEAbsCrypto

Crypto operations for partially function-hiding inner-product encryption over pairings.

Parameters:

config (dict)

__init__(config, **kwargs)[source]

Perform the __init__ operation.

Parameters:

config (dict) – Scheme configuration dict.

Return type:

None

encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

sec_encrypt(lst_pt)[source]
Parameters:

lst_pt (list)

Return type:

dict

decrypt(dct_ct, dk, fusion_weight=None)[source]

Decrypt ciphertexts and recover the inner product.

Parameters:
  • dct_ct (dict) – Ciphertext dict (or dict of per-client ciphertexts).

  • dk (dict) – Functional decryption key.

  • fusion_weight (list | None, default: None) – Fusion weight vector (or dict of per-client weight vectors).

encrypt_lst_ndarray(lst_ndarray, **kwargs)[source]

Perform the encrypt_lst_ndarray operation.

Parameters:

lst_ndarray (list) – List of numpy arrays to encrypt element-wise.

Return type:

list | None

compute_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Compute inner products on encrypted ndarray ciphertexts.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None

decrypt_lst_ndarray_ct(dict_ndarray_ct, **kwargs)[source]

Decrypt encrypted ndarray ciphertexts element-wise.

Parameters:

dict_ndarray_ct (dict) – Encrypted ndarray ciphertexts (list or dict).

Return type:

list | None