Disclosed are a method and an apparatus for protecting data on a storage
medium by encrypting the data to be recorded on the storage medium with a password.
This method comprises a step of, generating, for changing key data on each memory
unit by one password, the key data, thereafter encrypting the key data with the
password and writing the encrypted data to the storage medium, and a step of encrypting
the data with the key data and encrypted data to the storage medium. The method
further comprises a step of reading the encrypted key data from the storage medium,
a step of decoding the encrypted key data with the password, and a step of decoding
the data on the storage medium with the decoded key data. The encryption is done
by using the key data generated separately from the password, and it is therefore
feasible to prevent the password from being analyzed by decoding a cipher text.