According to a first aspect of the present invention, therein is provided a method of determining or generating a unique identifier for a device, the device exhibiting quantum mechanical confinement, the method comprising: measuring a unique quantum mechanical effect of the device that results from the quantum mechanical confinement; and using the measurement to determine or generate the unique identifier.