Nanoelectronic Devices for Hardware and Software Security