ibenc_adapt_identityhash

Identity Hashing Adapter for IBE (HashID Adapter)

Description: Converts an Identity-Based Encryption scheme that requires ZR (integer) identities into one that accepts arbitrary string identities via cryptographic hashing.

Notes: Hashes string identities to ZR elements using the pairing group’s hash function.
Transforms security from selective-ID (IND-sID-CPA) to full-ID (IND-ID-CPA) under ROM.

Adapter Properties

  • Type: identity transform adapter

  • Underlying Scheme: any IBE scheme with ZR identity space

  • Purpose: enables use of human-readable string identities (e.g., email addresses)

Implementation

Authors:
  1. Ayo Akinyele

Date:

2011

class ibenc_adapt_identityhash.HashIDAdapter(scheme, group)[source]

Bases: IBEnc

>>> from charm.schemes.ibenc.ibenc_bb03 import IBE_BB04
>>> group = PairingGroup('SS512')
>>> ibe = IBE_BB04(group)
>>> hashID = HashIDAdapter(ibe, group)
>>> (master_public_key, master_key) = hashID.setup()
>>> ID = 'john.doe@example.com'
>>> secret_key = hashID.extract(master_key, ID)
>>> msg = group.random(GT)
>>> cipher_text = hashID.encrypt(master_public_key, ID, msg)
>>> decrypted_msg = hashID.decrypt(master_public_key, secret_key, cipher_text)
>>> msg == decrypted_msg
True
decrypt(pk, sk, ct)[source]
encrypt(pk, ID, msg)[source]
extract(mk, ID)[source]
setup()[source]