pre_mg07¶
Identity-Based Proxy Re-Encryption
From: “M. Green, G. Ateniese Identity-Based Proxy Re-Encryption”, Section 4.3.
Published in: Applied Cryptography and Network Security. Springer Berlin/Heidelberg, 2007
Available from: http://link.springer.com/chapter/10.1007%2F978-3-540-72738-5_19
- type: proxy encryption (identity-based)
- setting: bilinear groups (symmetric)
Authors: |
|
---|---|
Date: | 11/2012 |
-
class
pre_mg07.
PreGA
(groupObj)[source]¶ Bases:
object
>>> from charm.toolbox.pairinggroup import PairingGroup,pc_element >>> ID = "nikos fotiou" >>> ID2 = "test user" >>> msg = "hello world!!!!!" >>> group = PairingGroup('SS512', secparam=1024) >>> pre = PreGA(group) >>> (master_secret_key, params) = pre.setup() >>> id_secret_key = pre.keyGen(master_secret_key, ID) >>> id2_secret_key = pre.keyGen(master_secret_key, ID2) >>> ciphertext = pre.encrypt(params, ID, msg); >>> pre.decryptFirstLevel(params,id_secret_key, ciphertext, ID) b'hello world!!!!!' >>> re_encryption_key = pre.rkGen(params,id_secret_key, ID, ID2) >>> ciphertext2 = pre.reEncrypt(params, ID, re_encryption_key, ciphertext) >>> pre.decryptSecondLevel(params,id2_secret_key,ID, ID2, ciphertext2) b'hello world!!!!!'