A recording medium including an arithmetic processing function, a first memory area and a second memory area, the recording medium executing a check out process and a check in process with a content management apparatus that manages allowable number of recording media, each of recording media including the arithmetic processing function, the first memory area storing at least an encrypted content and the second memory area storing a key information item necessary for decrypting the encrypted content, a initial value of the allowable number being a predetermined upper limit, the allowable number being decreased by one when the encrypted content and the key information item are stored in the recording medium in the check out process and being increased by one when the key information item in the second memory area of the recording medium is determined to be erased in the check in process, the recording medium comprising:
- means for executing the check out process and means for executing the check in process, wherein the means for executing the check out process comprises:
- means for performing first bilateral authentication between the recording medium and the content management apparatus, when the allowable number is more than zero, to obtain a first shared information item that is identical to that of the content management apparatus and that is generated as a result of success in the first bilateral authentication;
- means for receiving the encrypted content and an encrypted key information item that is generated by encrypting the key information item using the first shared information item generated in the content management apparatus;
- means for storing the encrypted content in the first memory area;
- means for decrypting the encrypted key information item using the first shared information item generated in the recording medium, to obtain the key information item;
- means for storing the key information item in the second memory area, wherein the means for executing the check in process comprises:
- means for performing second bilateral authentication between the content management apparatus and the recording medium whose first memory area stores the encrypted content and whose second memory area stores the key information item, to obtain a second shared information item that is identical to that of the content management apparatus and that is generated as a result of success in the second bilateral authentication;
- means for receiving a random data item encrypted using the second shared information item generated in the content management apparatus, when the second bilateral authentication ends in success;
- means for erasing the key information item in the second memory area by overwriting into the second memory area with the random data item;
- means for performing third bilateral authentication between the recording medium and the content management apparatus, to obtain a third shared information item that is identical to that of the content management apparatus and that is generated as a result of success in the third bilateral authentication;
- means for encrypting a data item stored in the second memory area, using the third shared information item, to obtain an encrypted data item;
- and
- means for transferring the encrypted data item to the content management apparatus configured to determine that the key information item in the second memory area is erased when the data item obtained by decrypting using the third shared information item generated in the content management apparatus is identical to the random data item.