I'm currently working on Ciphertext Policy Attribute-Based Encryption (CP-ABE). So far I'm only using it with a basic understanding how it actually works. Now I want to understand it a bit better, but I've never learned anything about bilinear groups or pairing-based cryptography.
To start with I would like to calculate a very simple example on my own. Therefore I'd like to use small numbers and very simple operations (although this definitely won't be secure).
I will just write what I tried to do for the first step (Setup) — would be great if someone could tell me whether it is completely wrong or if it goes in the right direction:
I chose a group generator of $g=7$ and an order of $p=13$. Therefore I got the group $G_0=\{1\ldots12\}$. (Correct so far?)
Then I defined $e(X,Y)=g^{XY}\bmod{}p$
Using this, I can now calculate the Public Key and the Master Key with two random integers $\alpha=3; \beta=4$:
$MK=\{\beta,g^\alpha\}=\{4,7^3\}=\{4,343\bmod13\}=\{4,5\}$
(Still correct?)
$PK=\{G_0,g,h=g^\beta,f=g^{1/\beta},e(g,g)^\alpha\}=\{G_0,7,7^4\bmod13,7^{1/4}\bmod13,7^{7*7*3}\bmod13\}=\{G_0,7,9,??,5\}$
(How can I calculate $7^{1/4}$?)
I hope to be able to do the rest on my own as soon as I understand this part.