Timing attack resistant type systems