This work investigates efficient and secure implementations of Curve25519 to build a key exchange protocol on an ARM Cortex-M4 microcontroller, along with the related signature scheme Ed25519 and a digital signature scheme proposal called qDSA. As result, performance-critical operations, such as modular multiplication, are greatly optimized; in this particular case, a 50% speedup is achieved, impacting the performance of higher-level protocols.