Algorithm design is for the math people, implementation requires a form of paranoia combined with detailed knowledge about CPUs. In many, if not all, cases you will have to look at the assembly that your compiler produces to make sure that an implementation is safe against attacks that look at the timing of calls, their cache misses that affect timing of code on other CPUs, etc. .