Specification, verification, and quantification of security in model-based systems