Skip to content

Commit

Permalink
Removed IRMA identity format
Browse files Browse the repository at this point in the history
  • Loading branch information
qstokkink committed Jun 26, 2024
1 parent 4ee2529 commit 6c53998
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 2,782 deletions.
15 changes: 8 additions & 7 deletions ipv8/attestation/communication_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,11 @@ def _drop_attestation_table_data(self, attestation_hashes: list[bytes]) -> None:
if not attestation_hashes:
return

self.attestation_overlay.database.execute(("DELETE FROM %s" # noqa: S608
% self.attestation_overlay.database.db_name)
+ " WHERE hash IN ("
+ ", ".join(c for c in "?" * len(attestation_hashes))
+ ")",
attestation_hashes)
self.attestation_overlay.database.execute(
f"DELETE FROM {self.attestation_overlay.database.db_name}" # noqa: S608
" WHERE hash IN (" + ", ".join(c for c in "?" * len(attestation_hashes)) + ")",
attestation_hashes
)
self.attestation_overlay.database.commit()

def remove(self) -> None:
Expand Down Expand Up @@ -353,7 +352,9 @@ async def unload(self, name: str) -> None:
self.channels.pop(communication_channel.public_key_bin)
await self.ipv8_instance.unload_overlay(communication_channel.identity_overlay)
await communication_channel.attestation_overlay.unload()
communication_channel.identity_overlay.endpoint.close()
aw_closing = communication_channel.identity_overlay.endpoint.close()
if aw_closing is not None:
await aw_closing

async def remove(self, name: str) -> None:
"""
Expand Down
36 changes: 0 additions & 36 deletions ipv8/attestation/default_identity_formats.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from .wallet.irmaexact.keydump import nijmegen_pk_1568208470

FORMATS = {
"id_metadata": {
"algorithm": "bonehexact",
Expand All @@ -21,39 +19,5 @@
"key_size": 32, # Pairings over 1024 bit space
"min": 18,
"max": 200
},
"id_irma_nijmegen_address_1568208470": {
"algorithm": "irmaexact",
"issuer_pk": nijmegen_pk_1568208470, # Valid until Wednesday 11 September 2019 13:27:50 GMT
"order": ["street", "houseNumber", "zipcode", "municipality", "city"],
"credential": "pbdf.nijmegen.address",
"keyCounter": 0,
"validity": 13

},
"id_irma_nijmegen_personalData_1568208470": {
"algorithm": "irmaexact",
"issuer_pk": nijmegen_pk_1568208470, # Valid until Wednesday 11 September 2019 13:27:50 GMT
"order": ["initials", "firstnames", "prefix", "familyname", "surname",
"fullname", "dateofbirth", "gender", "nationality"],
"credential": "pbdf.nijmegen.personalData",
"keyCounter": 0,
"validity": 13
},
"id_irma_nijmegen_ageLimits_1568208470": {
"algorithm": "irmaexact",
"issuer_pk": nijmegen_pk_1568208470, # Valid until Wednesday 11 September 2019 13:27:50 GMT
"order": ["over12", "over16", "over18", "over21", "over65"],
"credential": "pbdf.nijmegen.ageLimits",
"keyCounter": 0,
"validity": 13
},
"id_irma_nijmegen_bsn_1568208470": {
"algorithm": "irmaexact",
"issuer_pk": nijmegen_pk_1568208470, # Valid until Wednesday 11 September 2019 13:27:50 GMT
"order": ["bsn"],
"credential": "pbdf.nijmegen.bsn",
"keyCounter": 0,
"validity": 13
}
}
7 changes: 0 additions & 7 deletions ipv8/attestation/schema/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ def get_algorithm_class(self, algorithm_name: str) -> type[IdentityAlgorithm]:
elif algorithm_name == "pengbaorange":
from ..wallet.pengbaorange.algorithm import PengBaoRangeAlgorithm
algorithm = PengBaoRangeAlgorithm
elif algorithm_name == "irmaexact":
from ..wallet.irmaexact.algorithm import IRMAExactAlgorithm
algorithm = IRMAExactAlgorithm
else:
msg = f"Attempted to load unknown proof algorithm {algorithm_name}!"
raise RuntimeError(msg)
Expand Down Expand Up @@ -73,10 +70,6 @@ def register_default_schemas(self) -> None:
- 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
"""
from ..default_identity_formats import FORMATS
for schema in FORMATS:
Expand Down
14 changes: 0 additions & 14 deletions ipv8/attestation/wallet/irmaexact/__init__.py

This file was deleted.

226 changes: 0 additions & 226 deletions ipv8/attestation/wallet/irmaexact/algorithm.py

This file was deleted.

Loading

0 comments on commit 6c53998

Please sign in to comment.