Computing Bilinear Pairing on sensor platforms has become an important research topic since the introduction of pairing-based cryptography to Wireless Sensor Networks (WSNs). Some previous works have provided benchmarks for the pairing computation on sensors. However, a complete pairingbased cryptographic scheme requires much more than just a bilinear pairing operation, and little work has been done yet in this area. In this paper, we present the first fully functional pairing-based cryptographic library for WSNs. The library is fast and lightweight, and has an additional of one identity-based encryption scheme and two short signature schemes included. We also propose several new algorithms and techniques, and show that they significantly improve the speed and reduce the memory usage of the library. The performance results of implementing the three pairing-based cryptographic schemes show that pairingbased cryptosystems are feasible and applicable in WSNs. In particular, the amount of RAM and ROM taken by each of these pairing-based cryptographic schemes is no more than 10% and 20%, respectively, of the total capacities of a MICAz mote.