1. A method of performing a finite field operation on elements of a finite field, the method comprising a processor: obtaining a first set of instructions for performing the finite field operation on values representing the elements of the finite field; executing the first set of instructions to generate an unreduced result completing the finite field operation; obtaining a second set of instructions for performing a modular reduction for a specific finite field; executing the second set of instructions on the unreduced result to generate a reduced result; and providing the reduced result as an output for use in a cryptographic operation.