Pairing-Based Cryptography is receiving steadily more attention from industry, mainly
because of the increasing interest in Identity-Based protocols. Although there are plenty of
applications, efficiently implementing the pairing functions is often difficult as it requires
more knowledge than previous cryptographic primitives. The author presents a tool for
automatically generating optimized code for the pairing functions which can be used in the
construction of such cryptographic protocols.
In the following pages I present my work done on the construction of pairing function
code, its optimizations and how their construction can be automated to ease the work of the
protocol implementer.
Based on the user requirements and the security level, the created cryptographic compiler
chooses and constructs the appropriate elliptic curve. It identifies the supported pairing
function: the Tate, ate, R-ate or pairing lattice/optimal pairing, and its optimized parameters.
Using artificial intelligence algorithms, it generates optimized code for the final exponentiation
and for hashing a point to the required group using the parametrisation of the
chosen family of curves.
Support for several multi-precision libraries has been incorporated: Magma, MIRACL
and RELIC are already included, but more are possible.