The Commerce Department said it was planning a ban on certain hardware and software with the goal of protecting national security and US drivers.