After a lot of reading on the internet, i can't seem to figure out how Predicate Encryption works.
As i read, it consists of 4 algorithms:
Setup() - (outputs MSK - Master Secret Key and PK - Public Key)
Encrypt(PK, text) - (outputs CT - ciphertext)
GenKey(MSK, predicate) - (outputs a Token)
Query(Token, CT) - 0 if false, 1 if true
I don't understand how the GenKey algorithm works, how u generate a token based on MSK and predicate, and of course, how you query the ciphertext using the generated token.
Can someone point me in the right direction ? Maybe some pseudo-code or very detailed explanation.
Thanks!