AbstractCryptographic primitives are the key component in the security protocols to support the authentication, key management and secure communication establishment. For that reason, this work presents the optimization of the Elliptic Curve Cryptography through the usage of Shifting Primes for constrained devices. Specifically, this presents the optimization for the chipsets JN51XX from NXP/Jennic, which are based on OpenRISC architecture and offer a class-2 constrained device. In details, Shifting Primes features have allowed to optimize the multiplication and squaring through a double accumulator and shifting reduction. This work is ancillary to the previous works about optimization of Shifting Primes for class-1 constrained devices. The optimization of the Elliptic Curve Cryptography for the class-2 constrained devices brings several opportunities for realistic scenarios, where the security interoperability between a gateway (class-2 device) and end-nodes (class 1 devices) is a major requirement.