One of the huge problems for security in sensor networks is the lack of resources. Typical sensor nodes such as the quite popular MICA and MICA2 Motes from UC Berkeley are based on a microcontroller architecture with only a few KBytes of memory and severe limited computing ability. Strong public-key cryptography is therefore commonly seen as infeasible on such devices. In contrast to this prejudice this paper presents an efficient and lightweight implementation of public-key cryptography algorithms relying on elliptic curves. The code is running on Atmels 8Bit ATMEGA128 microcontroller, the heart of the MICA2 platform. The key to our fast implementation is the use of offline precomputation and handcrafting.