The invention provides a data
encryption method based on a
solid state disk and the
solid state disk, and relates to the technical field of storage, and the method comprises the following steps of: initiating four custom commands such as a data
encryption / decryption command, a
write protection (disk locking) command, a hiding / displaying command and a destroying command to the SSD from a host through specific hard disk
management system tool
software of a
solid state disk manufacturer. The command transmission mode is a
software protocol mode, and comprises a user-defined command and SSD master control
handshake mode of an SATA interface or NVME
interface protocol; two hard disk partitions, namely a main disk (A disk) and an auxiliary disk (B disk), are arranged before the SSD leaves a factory; the disk A can be used as a
system disk, and the disk B can only be used as a data disk (default hiding). An
operating system is installed in a
system disk, an SSD
management system special for an SSD manufacturer is installed, when new
application software needs to be installed, if a master disk (A disk) is the
system disk, the master disk (A disk) is unlocked in the SSD
management system firstly, and then the master disk is locked after installation is completed. When the system is in normal use, if data of the B disk needs to be read, the B disk is displayed firstly, and data of the B disk can be read after a
password is input; if the confidential sensitive
data needs to be stored in the disk B, the disk B is unlocked before storage, and the disk B is relocked after storage; and hiding the B disk. If the data need to be destroyed, the SSD management system sends a destroying command, the SSD master control executes the destroying command, and all the data of the master disk and the auxiliary disk are destroyed at the same time. And the
solid state disk master control executes the destroying command until all data of the master disk and the auxiliary disk are destroyed.