To provide a storage device to which a function capable of generating the genus of a random number at random in comparatively simple configuration is added.
This device is provided with a detecting means 1 for detecting a new event concerning the storage device, counter 3 to be started, stopped or initialized based on that detected information, and interface 4 for outputting the current value of the counter 3 as the genus of the random number with the reception of a request to the genus of the random number. For the example of the new event concerning the storage device, the activation of the storage device, the mount of a storage medium to the storage device, the ejection from the storage device or the start of data read or write can be utilized. As the counter 3, a clock counter to increase or decrease a value in a prescribed cycle or an event counter to increase or decrease a value each time an event non- periodically occurs is available.