== Installing PBC == The PBC library needs http://www.swox.com/gmp/[the GMP library]. This build system has been tested and works on Linux and Mac OS X with a fink installation. $ ./configure $ make $ make install On Windows, the configure command requires a couple of options: $ ./configure -disable-static -enable-shared By default the library is installed in `/usr/local/lib`. On some systems, this may not be in the library path. One way to fix this is to edit `/etc/ld.so.conf` and run `ldconfig`. === Simple Makefile === For speed and simplicity, I use `simple.make` during development. Naturally it is less portable. $ make -f simple.make PBC uses some GNU C extensions such as nested functions. [[pbcintro]] === Quick start === We shall use the following notation. For our purposes, the pairing is a bilinear map from two cyclic groups, G1 and G2 to a third group GT, where each group has prime order r. Run `pbc/pbc` and type: g := rnd(G1); g; The first line generates a random element g of the group G1, while the second prints out the value of g. (The syntax was influenced by `bc`, an arbitrary precision calculator.) Next, enter: h := rnd(G2); h; This assigns h to a random element of the group G2. Actually, the default pairing `pbc` uses is symmetric so G1 and G2 are in fact the same group, but in general they are distinct. To compute the pairing applied to g and h, type: pairing(g,h); The order of both g and h is r. Let's generate two random numbers between 1 and r: a := rnd(Zr); b := rnd(Zr); By bilinearity, the resulting output of both of these lines should be identical: pairing(g^a,h^b); pairing(g,h)^(a*b); This program has <> but the commands shown here should be enough to quickly and interactively experiment with many pairing-based cryptosystems using real numbers.