Static Validation of Security Protocols