A security device comprising: a public key storage unit which is a non-rewritable memory configured to store a first public key; an identifier generation unit configured to generate an identifier specific to the security device by using a physical unclonable function, PUF; a PUF key generation unit configured to generate a PUF key specific to the security device by using the identifier; a registration key storage unit configured to store a registration key; a reception unit configured to receive a registration command in which the registration key and a signature generated for the registration key by using a secret key corresponding to the first public key are contained; a signature verification unit configured to verify, using the first public key, validity of the signature contained in the registration command received by the reception unit and output the verification result indicating either failure or success in the verification; and a command execution unit configured to reject execution of the registration command in a case where the verification result outputted from the signature verification unit is failure; wherein, in a case where the verification result is success, the command execution unit is configured to request the identifier generation unit and the PUF key generation unit to generate the PUF key, the identifier generation unit is configured to generate the identifier specific to the security device, the PUF key generation unit is configured to generate the PUF key specific to the security device by using the generated identifier, and the command execution unit is configured to encrypt the registration key of the registration command with the generated PUF key and then store the encrypted registration key in the registration key storage unit. a public key storage unit which is a non-rewritable memory configured to store a first public key; an identifier generation unit configured to generate an identifier specific to the security device by using a physical unclonable function, PUF; a PUF key generation unit configured to generate a PUF key specific to the security device by using the identifier; a registration key storage unit configured to store a registration key; a reception unit configured to receive a registration command in which the registration key and a signature generated for the registration key by using a secret key corresponding to the first public key are contained; a signature verification unit configured to verify, using the first public key, validity of the signature contained in the registration command received by the reception unit and output the verification result indicating either failure or success in the verification; and a command execution unit configured to reject execution of the registration command in a case where the verification result outputted from the signature verification unit is failure; wherein, in a case where the verification result is success, the command execution unit is configured to request the identifier generation unit and the PUF key generation unit to generate the PUF key, the identifier generation unit is configured to generate the identifier specific to the security device, the PUF key generation unit is configured to generate the PUF key specific to the security device by using the generated identifier, and the command execution unit is configured to encrypt the registration key of the registration command with the generated PUF key and then store the encrypted registration key in the registration key storage unit.