1. A method comprising: calculating a first computational cost for generating a key using a first exponentiation algorithm on a first exponent; calculating a second computation costs for generating the key using a second exponentiation algorithm on a second exponent, the second exponent having a longer bit length than the first exponent and having the same entropy level as the first exponent; and selecting by a computer system one of the first exponent and first exponentiation algorithm or the second exponent exponentiation algorithm to generate the key, wherein the second exponentiation algorithm is one of a zero-biased fixed window exponentiation algorithm or a zero-biased sliding window exponentiation algorithm.