3.0.ipv8.attestation.schema.manager

Classes

Module Contents

class 3.0.ipv8.attestation.schema.manager.SchemaManager

Manager for schemas: specifications of attribute disclosure algorithm parameterization.

formats: dict[str, dict[str, Any]]
algorithms: dict[str, type[3.0.ipv8.types.IdentityAlgorithm]]
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.

Parameters:

algorithm_name – the name of the algorithm.

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.

Parameters:
  • schema_name – the new schema name to claim.

  • algorithm_name – the algorithm to use (see get_algorithm_class()).

  • parameters – the dictionary specifying the parameters for the algorithm.

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]

get_algorithm_instance(schema_name: str) 3.0.ipv8.types.IdentityAlgorithm

Get an algorithm instance from a schema name.

Parameters:

schema_name – the schema to instantiate the algorithm from.