JHUISI / charm

Charm: A Framework for Rapidly Prototyping Cryptosystems
http://charm-crypto.io
GNU Lesser General Public License v3.0
542 stars 166 forks source link

Numerical attribute and policies values #234

Open nhan-dang opened 4 years ago

nhan-dang commented 4 years ago

I want to ask about assigning a numerical value to attribute value like id=1 in key generation function. Because when I encrypt data using policies like 'id==1', it will output: 'print: ['id', '==', '1']. So I think the project has had already support numerical value for policies right? If so what about attribute? I cannot seem to assign a numerical value to the private key because the decryption always gives the error: 'unable to decrypt ciphertext'. Can anyone help me, please? I really appreciate it, Thank you all.

jakinyele commented 4 years ago

@riasto1 Numerical attributes/policies are not currently supported. There are a few approaches that you can implement. The most popular technique is described in this CP-ABE paper by Bethencourt et al from 2007: https://www.cs.utexas.edu/~bwaters/publications/papers/cp-abe.pdf

nhan-dang commented 4 years ago

Thanks for the feedback, I will read the paper and see what I can do with it. Great job on the open-source, I currently use it for a project and it would be a tremendous help if the team can later support it. In the meantime, I guess I will just scrape by with whatever at hand. Big thanks to all of you.

jakinyele commented 4 years ago

@riasto1 Glad to hear and appreciate the kind words! Feel free to ping me @ jakinye3@jhu.edu if you want to discuss the details of your project. I've got a parser for handling numerical attributes/policies according to that paper in OpenABE (https://github.com/zeutro/openabe) that might be helpful. Only caveat is that it's in C/C++ and based on Bison. All the best!

nhan-dang commented 4 years ago

@jakinyele Really appreciate that you are willing to offer a helping hand like that. If there is anything, I will contact you asap. Big thanks and all the best luck to the team!