A Modern Theory of Security Analysis