The Calculus of the Security Dilemma