Trust and mobility-based clustering algorithm for secure mobile ad hoc networks