web-servicescryptographycharm-crypto

Web Application with Charm Crypto


I suppose to make a web application where the users can login in this platform with username and password (I want to make a MySQL database to stare username and password).

After when the user is logged, he selects a file from his computer and send this file on server.

I want encrypt this file to a group of users (I want use HybridABE cryptography with Charm Crypto).

Now I have these architectural/programming question.

Suppose that we have this program:

from charm.toolbox.pairinggroup import PairingGroup,GT
from charm.adapters.abenc_adapt_hybrid import HybridABEnc as HybridABEnc
from charm.schemes.abenc.abenc_waters09 import CPabe09

group = PairingGroup('SS512')
cpabe = CPabe09(group)

hyb_abe = HybridABEnc(cpabe, group)

policy = '((ONE or THREE) and (TWO or FOUR))'

msg = "hello world this is an important message."

(master_secret_key, master_public_key) = hyb_abe.setup()

attr_list = ['THREE', 'ONE', 'TWO']

secret_key = hyb_abe.keygen(master_public_key, master_secret_key, attr_list)

cipher_text = hyb_abe.encrypt(master_public_key, msg, policy)

decrypted_msg = hyb_abe.decrypt(master_public_key, secret_key, cipher_text)

Where can I save the Master Private Key and the Master Public Key ? On a directory server like file ? On database ?

Where can I save the secret key of user ?


Solution

  • An Attribute-based Encryption system is usually created once and has only one master secret key and public key pair.