There are well-known algorithms for cryptography to compute modular exponentiation (a^b)%c (like Right-to-left binary method here : http://en.wikipedia.org/wiki/Modular_exponentiation).
But do algorithm exist to compute modular exponentiation of the form (a^(2^N))%m faster than with "classical" algorithms ?
Thank you very much !
Note :
1) m can be a very large prime ... or not (so no optimization depending on m)
2) N can be as large as 2^32-1 (N < 2^32)
(2^(2^N))%m
. – Batson