fentec-project / gofe

Functional encryption library in Go
Apache License 2.0
170 stars 52 forks source link

Fame - a CP ABE scheme #14

Closed tilenmarc closed 5 years ago

tilenmarc commented 5 years ago

This pull request introduces a new ciphertext policy (CP) attribute based (ABE) scheme. It is based on the paper https://eprint.iacr.org/2017/807.pdf, using pairing group bn256 and a hashing into it. Additionally, refactoring is made: the existing ABE scheme is renamed into GSPW scheme (named after its authors) and functions used by both regarding policy manipulation are moved to a file named policy.go. Moreover, a small fix is done in the function creating a vector with all its entries equal to a constant.

tilenmarc commented 5 years ago

Thanks for your comments. I have included the suggestions besides the last question. Additionally I have changed the encryption and decryption so that now the message is a string instead on 'bn256.GT', since the transformation between bn256.GT and string has been just included in bn256 library. Would it be more appropriate to make it 'stringinstead ofstring`? Now when error is returned, it is returning an empty string and the error.

janhartman commented 5 years ago

I think returning an empty string of type string is perfectly fine, no need to add pointers. Nice job with the fixes!