On the Efficiency and Security of Cryptographic Pairings