2.13.ipv8.attestation.schema.manager

Module Contents

Classes

class 2.13.ipv8.attestation.schema.manager.SchemaManager

Manager for schemas: specifications of attribute disclosure algorithm parameterization.

get_algorithm_class(algorithm_name: str) type[2.13.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]

  • id_irma_nijmegen_address_1568208470: IRMA address data match, valid until 11 Sept 2019 13:27:50 GMT

  • id_irma_nijmegen_personalData_1568208470: IRMA personal data match, valid until 11 Sept 2019 13:27:50 GMT

  • id_irma_nijmegen_ageLimits_1568208470: IRMA age data match, valid until 11 Sept 2019 13:27:50 GMT

  • id_irma_nijmegen_bsn_1568208470: IRMA bsn data match, valid until 11 Sept 2019 13:27:50 GMT

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

Get an algorithm instance from a schema name.

Parameters:

schema_name – the schema to instantiate the algorithm from.