Architectures for Hardening Security in Intelligent Cyber-physical Systems