Tailored security and safety for pervasive computing