In this chapter, we apply the theory of quantitative information flow to the important practical problem of timing attacks on cryptography. In such attacks an adversary observes the amount of time taken by a large number of cryptographic operations, in an effort to discover the secret key being used.