3.0.ipv8.attestation.schema.manager =================================== .. py:module:: 3.0.ipv8.attestation.schema.manager Classes ------- .. autoapisummary:: 3.0.ipv8.attestation.schema.manager.SchemaManager Module Contents --------------- .. py:class:: SchemaManager Manager for schemas: specifications of attribute disclosure algorithm parameterization. .. py:attribute:: formats :type: dict[str, dict[str, Any]] .. py:attribute:: algorithms :type: dict[str, type[3.0.ipv8.types.IdentityAlgorithm]] .. py:method:: get_algorithm_class(algorithm_name: str) -> type[3.0.ipv8.types.IdentityAlgorithm] Get the implementation belonging to a certain algorithm name. These are bound to either: - bonehexact: for exact value matches using "Evaluating 2-DNF Formulas on Ciphertexts" by Boneh et al. - pengbaorange: for range proofs using "An efficient range proof scheme." by K. Peng and F. Bao. - irmaexact: for exact value matches using the IRMA protocol. :param algorithm_name: the name of the algorithm. .. py:method:: register_schema(schema_name: str, algorithm_name: str, parameters: dict) -> None Register a schema specification. Each schema is defined by an algorithm and its parameterization. :param schema_name: the new schema name to claim. :param algorithm_name: the algorithm to use (see `get_algorithm_class()`). :param parameters: the dictionary specifying the parameters for the algorithm. .. py:method:: register_default_schemas() -> None Register all default formats to this SchemaManager. You will load: - id_metadata: 1024 bit space "exact" value match - id_metadata_big: 4096 bit space "exact" value match - id_metadata_huge: 9216 bit space "exact" value match - id_metadata_range_18plus: NIZKP over a commitment, showing it lies within [0, 18] .. py:method:: get_algorithm_instance(schema_name: str) -> 3.0.ipv8.types.IdentityAlgorithm Get an algorithm instance from a schema name. :param schema_name: the schema to instantiate the algorithm from.