Formalization and analysis of privacy and web security policies