Security-Aware Design for Cyber-Physical Systems