Wireless Sensor Networks (WSNs) pose a number of unique security challenges that demand innovation in several areas including the design of cryptographic primi-tives and protocols. Despite recent progress, the efficient implementation of Elliptic Curve Cryptography (ECC) for WSNs is still a very active research topic and tech-niques to further reduce the execution time and energy cost of ECC are eagerly sought. This thesis presents an optimized ECC implementation that aims to comply with the se-vere resource constraints of8-bit sensor nodes such as the MICAz and IRIS motes. Our ECC software supports three different families of elliptic curves, namely Weierstrass-form, Montgomery-form as well as twisted Edwards-form curves, and uses Optimal Prime Fields (OPFs) as underlying algebraic structure. An OPF is a finite field Fp defined by a prime of the form p=u·2k+v, whereby both u and v are "small"(in relation to2k) so that they fit into one or two registers of an8-bit microcontroller. OPF-s have a low Hamming weight, which allows for very efficient implementation of the modular reduction since only the non-zero words of p need to be processed. Due to the combination of efficient field arithmetic and fast group operations, we achieve an execution time of6.1·106clock cycles for a full160-bit scalar multiplication on an8-bit ATmega128microcontroller, which is roughly2.6times faster than the widely-used TinyECC2.0library. Our implementation also shows that the energy cost of ephemeral ECDH key exchange between two MICAz (or IRIS) motes amounts to only40mJ per mote (including radio communication). A mote with a standard AA battery pack could theoretically perform over169,000ECDH key exchanges before running out of energy. |