Data erasing method and system, secure erasing switch, and data erasing apparatus
By generating storage device entries and parsing configuration files, combined with worker threads and encryption algorithms, the problem of data erasure on various storage media is solved, achieving automated, secure, and reliable data erasure operations.
Patent Information
- Application Number
- PCT/CN2024/130173
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-23
- Filing Date
- 2024-11-06
- Publication Date
- 2026-01-29
AI Technical Summary
Existing technologies struggle to efficiently erase data on various types of storage media, especially since they lack support for erasing tools on non-disk media such as SPI-flash devices and specific file systems. Furthermore, they are cumbersome to operate and lack authentication and offline erasure capabilities.
By detecting all storage media types and partition information of the target device, storage device entries are generated, converted into configuration files and parsed into execution scripts. Worker threads traverse operation instances and perform data erasure by combining different erasure levels and encryption algorithms. It supports automatic scanning and offline erasure of multiple media types.
It enables automated data erasure on various storage media, supports different security levels of erasure, ensures data irrecoverability, and guarantees security and offline erasure capabilities through a hardware-bound authentication process.
Smart Images

Figure CN2024130173_29012026_PF_FP_ABST
Abstract
Description
Data erasing method and system, secure erasing switch and data erasing device
[0001] The present application claims priority to the Chinese patent application No. 202410985649.7, filed on July 23, 2024, and entitled "Data erasing method and system, secure erasing switch and data erasing device", the whole content of which is incorporated herein by reference. TECHNICAL FIELD
[0002] The present application relates to the field of information security, in particular to a data erasing method and system, a secure erasing switch and a data erasing device. BACKGROUND
[0003] Data clearing technology ensures that data stored on digital devices is completely deleted and cannot be recovered through a series of methods and processes, which is very important for protecting personal privacy, trade secrets, etc. It is usually divided into logical clearing, physical destruction and verified erasing.
[0004] Encrypted storage is a security measure that uses encryption algorithms to protect data stored on digital devices, ensuring data confidentiality and integrity in the absence of authorized access. When clearing high-security-level data, especially when the data itself has been encrypted and stored, using encryption again will make the data more unrecoverable than simple write-over operations. Therefore, cryptographic techniques are often used to clear sensitive data.
[0005] Traditional data erasing tools mainly focus on data clearing of disk media, and most tools require operators to interact with the clearing software on the device during the data clearing process. There are different degrees of shortcomings in media adaptability, operation ease of use, security, etc. These can be briefly summarized as follows:
[0006] (1) Not friendly to non-disk media digital devices, the tool is difficult to completely clear the storage data of embedded devices, because some types of devices are not supported by the erasing tool, such as spi-flash; and the erasing tool may not be able to identify the file system used by FLASH, such as yaffs, jffs, etc. In addition, some erasing tools may only focus on data within the partition, but may not destroy the data structure of the partition itself, such as the partition table, the log of the file system, etc., resulting in residual partition information.
[0007] (2) There are conditional restrictions for triggering the clearing operation, and the user needs to command operation, window operation or device restart, which is cumbersome.
[0008] (3) In an emergency, it is difficult to quickly implement the clearing operation because the erasing tool is usually operated by window UI software, mouse and keyboard. In some scenarios, if the device does not have access conditions for such peripherals, the user cannot quickly implement the erasing operation.
[0009] (4) There is no identity authentication for the person who implements the data clearing operation, and there is a risk of illegal deletion of stored data.
[0010] (5) When the device is in a non-connected state (no display, no network, no debugging interface), it cannot clear data offline.
[0011] In the related art, the patent application document with the application publication number CN109495259A proposes a portable mobile terminal encryptor, which is used to inject password algorithm logic from a configuration computer through a USB interface, load different password algorithms to encrypt data, and can destroy the key inside the USB device by a key destruction button instead of clearing data on the digital device. The patent application document with the application publication number CN107566407A proposes to use random numbers for multiple overwriting to realize data destruction, but random number overwriting is only used for erasing sensitive data and is not suitable for erasing highly sensitive data. In addition, this scheme only provides erasing of FAT file format and does not have universality. The patent application document with the application publication number CN109711208A also uses the method of multiple overwriting of random numbers to realize data destruction, and this scheme only supports data erasing of USB interface storage devices and cannot support media data erasing of multiple types and multiple interfaces.
[0012] SUMMARY
[0013] The technical problem to be solved by the present application is how to realize data erasing of multiple types of storage media.
[0014] The present application solves the above technical problems by the following technical means:
[0015] In a first aspect, the present application proposes a data erasing method, which comprises:
[0016] In response to successful login of the user login password, detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries, the storage device entries containing storage description information of the device;
[0017] In response to the erasing command, converting the storage device entries and setting information into a configuration file, wherein the setting information includes an erasing level, an erasing strategy entry and an erasing rule entry;
[0018] parsing the configuration file, converting the storage description information in the configuration file into execution scripts, and creating a work thread for each of the execution scripts;
[0019] mapping each of the erasing rules into an operation instance, and using the work thread to traverse the operation instance to perform the data erasing operation on the target device.
[0020] Further, the storage description information includes storage medium type, storage space, and partition information, and the storage space includes device capacity and used space.
[0021] Further, the erasing strategy of the erasing strategy entry is arranged according to the type of the storage medium and the erasing level, and the erasing strategy is used to express the clearing mode of the data in the storage medium.
[0022] The structure of the erasing strategy is defined as: method_type_{ops1_count}
[0023] The method field indicates that the current entry is an erasing strategy entry, the type field indicates the type of the storage medium, the ops1 field indicates the erasing field, and the count field is used to identify the execution times of the previous ops1 field.
[0024] Further, the erasing rule of the erasing rule entry is used to express the operation mode of the data clearing, and the structure of the erasing rule is defined as: action_ops2[_engine]
[0025] The action field indicates that the current entry is an erasing rule entry, the ops2 field indicates the clearing operation written to the storage medium, the engine field indicates the calling of the avx hardware acceleration unit or the neon hardware acceleration unit, and the [] indicates an optional field.
[0026] Further, the erasing level includes a basic clearing level, a medium clearing level, and a high-level clearing level, wherein:
[0027] The basic clearing level is to write overwriting data to the storage medium for a single pass;
[0028] The medium clearing level is to write overwriting data to the storage medium for multiple passes;
[0029] The high-level clearing level is to perform an erasing operation on the data in the storage medium by combining a random number and an encryption algorithm;
[0030] The overwriting data is a fixed number, a random number, or a sequential number.
[0031] Further, the erasing operation on the data in the storage medium by combining a random number and an encryption algorithm includes:
[0032] The random number is used as an encryption key, and the sensitive data to be erased in the storage medium is subjected to multiple rounds of substitution, permutation and key addition operation through a block cipher algorithm, and after completion, the encryption key is destroyed.
[0033] Further, after the configuration file is parsed, the storage description information in the configuration file is converted into an execution script, and a worker thread is created for each execution script, the method further comprises:
[0034] When it is determined that the system disk or the main partition in the storage description information is true, the mounting point directory of the configuration file is read, and if the system disk or the main partition in the storage description information is false, an erasing strategy is directly executed on the storage partition, and a temporary mounting point is not established in the memory;
[0035] The base library, dynamic linker and basic commands are copied to the mounting point directory;
[0036] All user-mode processes except the erasing process are terminated, and the root file system is remounted to the mounting point directory;
[0037] All storage medium partitions mounted by the target device are unloaded, and then the worker thread is executed.
[0038] Further, the erasing rule is mapped to an operation instance, and the worker thread is used to traverse each operation instance to execute the data erasing operation of the target device, and the method further comprises:
[0039] The type of the storage medium is determined, and the corresponding software erasing tool interface is filled;
[0040] The erasing field of the erasing strategy is read and the erasing rule set is filled, the erasing rule set being a collection of erasing rule items obtained by decomposing the erasing strategy;
[0041] The execution times field of the erasing strategy is read to obtain the execution times;
[0042] Each erasing rule in the erasing rule set is mapped to an operation instance;
[0043] The worker thread traverses all operation instances in sequence, and each operation instance is cyclically executed according to the execution times;
[0044] 0 is written to the address segment of all partition information of the target device, the partition information including the 0th sector, the main partition header, the main partition table, the backup partition header and the backup partition table.
[0045] Further, after the worker thread traverses all operation instances in sequence, and each operation instance is cyclically executed according to the execution times, the method further comprises:
[0046] Upon determining that there is an encryption algorithm call in the erasing rule, then delete the encryption key data structure of the symmetric encryption algorithm in the cache.
[0047] Further, the method further comprises:
[0048] A random number cache is created by a random thread for storing a random sequence required by a data erasing operation.
[0049] Further, before the detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to the user login password, the method further comprises:
[0050] Upon detecting the insertion of the data erasing switch, the login password input by the user is transmitted to the data erasing switch, so that the data erasing switch saves the hash value of the login password;
[0051] The device information and public key request of the target device are transmitted to the data erasing switch, so that the data erasing switch creates a key pair based on the public key request and signs the device information by using the private key in the key pair to obtain a signature file;
[0052] The public key and device index number returned by the data erasing switch are received and saved, so as to realize the binding between the data erasing switch and the target device.
[0053] Further, the method further comprises:
[0054] Upon detecting the insertion of the data erasing switch, the authentication request and device index number are transmitted to the data erasing switch;
[0055] The signature file returned by the data erasing switch is received, the signature file is verified based on the public key and the device information, and the authentication result obtained by the verification is transmitted to the erasing switch.
[0056] Further, the method further comprises:
[0057] Upon the authentication result being authentication success, in response to the switch signal transmitted by the data erasing switch, the state of the switch signal is polled, and the data of the target device is erased;
[0058] Upon the authentication result being authentication failure, the switch signal transmitted by the data erasing switch is locked.
[0059] Further, before the detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to the user login password, the method further comprises:
[0060] transmitting the login password input by the user to the data erasing switch to make the data erasing switch calculate a hash value of the login password and compare the hash value of the login password currently calculated with the hash value of the login password calculated in the device binding process;
[0061] receiving the hash value comparison result returned by the data erasing switch to determine whether the login is successful.
[0062] In a second aspect, the application provides a data erasing method, which comprises:
[0063] The data erasing switch is mounted to the operating system of the target device in a mode manner and installs a data security erasing software image package;
[0064] receiving the device information sent by the target device and signing the device information to obtain a signature file to complete the binding with the target device;
[0065] receiving the authentication request sent by the target device and returning the signature file to the target device based on the authentication request to make the target device perform signature verification to obtain an authentication result;
[0066] when the authentication result is authentication success, sending a switch signal to the target device to make the target device poll the state of the switch signal and perform an erasing operation on the data of the target device;
[0067] when the authentication result is authentication failure, sending a switch signal to the target device to make the target device lock the switch signal.
[0068] Further, the receiving of the device information sent by the target device and the signing of the device information to obtain a signature file to complete the binding with the target device comprises:
[0069] receiving the login password input by the user sent by the target device and saving the hash value of the login password;
[0070] receiving the device information and the public key request sent by the target device and creating a key pair based on the public key request, signing the device information by using the private key in the key pair to obtain a signature file;
[0071] returning the public key in the key pair and the device index number to the target device to realize the binding between the target device.
[0072] Further, the receiving of the authentication request sent by the target device and the returning of the signature file to the target device based on the authentication request to make the target device perform signature verification to obtain an authentication result comprises:
[0073] receive the authentication request and the device index number sent by the target device, and return the signature file to the target device based on the authentication request, so that the target device verifies the signature file based on the public key and the device information to obtain an authentication result;
[0074] receive the authentication result sent by the target device.
[0075] Further, the switch signal includes executing a user-set or default data erasing strategy, executing a full-disk data default strategy, executing a full-disk data complex strategy, and invalid operation.
[0076] Further, the method further includes:
[0077] displaying a current erasing state of the target device.
[0078] In a third aspect, the present application further provides a data erasing system, which includes:
[0079] a daemon process for detecting all storage medium types and partition information of a target device and generating a plurality of storage device entries in response to successful login of a user login password, wherein the storage device entries contain storage description information of the devices;
[0080] and for converting the storage device entries and setting information into a configuration file in response to an erasing command, wherein the setting information includes an erasing level, an erasing strategy entry and an erasing rule entry;
[0081] a rule parser for parsing the configuration file, converting the storage description information in the configuration file into an execution script, creating a work thread for each execution script, and mapping each erasing rule to an operation instance, and using the work thread to traverse each operation instance to execute a data erasing operation of the target device.
[0082] In a fourth aspect, the present application further provides a client, which includes a memory and a processor; wherein the processor runs a program corresponding to executable program code stored in the memory by reading the executable program code, so as to implement the data erasing method according to the first aspect.
[0083] In a fifth aspect, the present application provides a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the data erasing method according to the first aspect.
[0084] In a sixth aspect, the application provides a data erasing switch, comprising a random number entropy source, an algorithm password component, a main controller, an off-chip FLASH and an erasing switch, an output of the random number entropy source being connected with the main controller and the off-chip FLASH, an output of the erasing switch being connected with the main controller, and outputs of the main controller and the algorithm password component being connected with a USB interface through a USB interface device;
[0085] The USB interface is used for inserting a target device, so that the erasing switch is mounted to an operating system of the target device in a slave mode and installs a data security erasing software image package, wherein the off-chip FLASH is used for storing an operation log and an installation image of the security erasing software;
[0086] The main controller is used for receiving device information sent by the target device, calling the algorithm password component to sign the device information, obtaining a signature file and storing the signature file to the main controller, completing binding with the target device, receiving an authentication request sent by the target device, and returning the signature file to the target device based on the authentication request to make the target device verify the signature and obtain an authentication result;
[0087] The erasing switch is used for generating a switch signal and sending the switch signal to the target device, so that the target device polls a state of the switch signal or locks the switch signal;
[0088] The random number entropy source is used for providing random numbers for data erasing.
[0089] In a seventh aspect, the application provides a data erasing device, comprising a data erasing switch and a data erasing system installed in a target device, wherein the data erasing system comprises:
[0090] A daemon is used for detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries after a user login password is successfully logged in, the storage device entries containing storage description information of the devices;
[0091] and converting the storage device entries and setting information into a configuration file in response to an erasing command or a switch signal sent by the data erasing switch offline, wherein the setting information comprises an erasing level, an erasing strategy entry and an erasing rule entry;
[0092] A rule parser is used for parsing the configuration file, converting the storage description information in the configuration file into an execution script, creating a work thread for each execution script, mapping each erasing rule into an operation instance, and using the work thread to traverse the operation instances to execute a data erasing operation of the target device.
[0093] In an eighth aspect, the present application provides a computing processing device, comprising: a memory, wherein the computer readable code is stored; and one or more processors, when the computer readable code is executed by the one or more processors, the computing processing device performs the data erasing method according to the first aspect.
[0094] In a ninth aspect, the present application provides a computer program, comprising computer readable code, when the computer readable code is executed on a computing processing device, the computing processing device performs the data erasing method according to the first aspect.
[0095] The present application has the following advantages:
[0096] (1) The present application generates a storage device entry by detecting all storage medium types and partition information of a target device, and generates a configuration file based on the storage device entry and setting information. The configuration file is parsed, and the parsed storage description information is converted into an execution script. A work thread created by each execution script traverses an operation instance obtained by erasing rule mapping, and performs a data erasing operation on each type of storage medium of the target device. The present application can complete the data erasing operation on various types of storage media by automatically scanning the storage medium types of the target device, and the operation is simple, and the user does not need to operate the software or reset the device.
[0097] (2) The present application sets multiple erasing levels, including a basic erasing level, a medium erasing level and a high-level erasing level, supports logical erasing of data of different security levels, can support multiple application scenarios, and supports erasing all disk data in a system running state.
[0098] (3) The high-level erasing level set by the present application supports erasing high-sensitive data based on a commercial symmetric algorithm.
[0099] (4) The present application increases a hard control mode, supports hardware offline triggering of erasing operation and software triggering of erasing operation, and can realize offline data erasing when the target device is in a non-connected state.
[0100] (5) No other external device is needed. After the hardware switch is pressed, the software directly executes a pre-set or default erasing strategy, and the user does not need to make any settings during the process. The software automatically generates an erasing strategy for all storage devices recognized by the system, and the file system and partition information itself are also in the erasing range.
[0101] (6) The present application designs a binding authentication process between a data erasing switch and a target device, identifies the identity of a person who performs a data erasing operation, and ensures the safety and reliability of data erasing.
[0102] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0103] Figure 1 is a schematic flowchart of a data erasure method proposed in an embodiment of this application;
[0104] Figure 2 is a flowchart illustrating another data erasure method proposed in an embodiment of this application;
[0105] Figure 3 is a schematic diagram of the structure of a data erasure system proposed in an embodiment of this application;
[0106] Figure 4 is a schematic diagram of a data erasure switch according to an embodiment of this application;
[0107] Figure 5 is a schematic diagram of the structure of a data erasure device proposed in an embodiment of this application;
[0108] Figure 6 is a schematic diagram of the structure of a computing processing device for a data erasure method proposed in an embodiment of this application;
[0109] Figure 7 is a schematic diagram of the structure of a computer program for a data erasure method proposed in an embodiment of this application. Specific Implementation
[0110] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the embodiments of this application. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0111] Example 1
[0112] As shown in Figure 1, the data erasure method proposed in the first embodiment of this application is applied to a target device for which data needs to be erased. The method includes the following steps:
[0113] S101. In response to a successful login with a user's login password, detect all storage media types and partition information of the target device and generate several storage device entries, wherein the storage device entries contain storage description information of the device.
[0114] It should be noted that the embodiment actively identifies the storage medium of the target device through the daemon, and provides the user with safe erasing rules and algorithms of different erasing levels, configures the default or user-defined data erasing strategy, and after the user successfully logs in, all detected storage media and partitions are displayed by default, and the user can set each detected storage medium in the command line or set the full disk cleaning mode.
[0115] Specifically, after all storage devices are powered on, physical layer negotiation with the kernel, i.e. hardware identification process, is performed, in which the kernel triggers an event, and through uevent technology, the device submits bus and hardware information to the kernel, so that the medium type is identified. Then, based on the storage medium of the target device, a storage device database is generated, and the storage device database stores storage device entries.
[0116] The embodiment obtains storage-related hardware information from the kernel event through the uevent open user state interface, and then calls different tools or custom programming according to different medium types to implement the cleaning operation.
[0117] S102, in response to the erasing command, converting the storage device entry and setting information into a configuration file, wherein the setting information includes an erasing level, an erasing strategy entry and an erasing rule entry;
[0118] It should be noted that the embodiment specifically converts the storage device entry and the setting information into a data serialization format of yaml.
[0119] S103, parsing the configuration file, converting the storage description information in the configuration file into an execution script, and creating a work thread for each execution script;
[0120] S104, mapping each erasing rule to an operation instance, and using the work thread to traverse each operation instance to execute the data erasing operation of the target device.
[0121] The embodiment parses the configuration file, converts the parsed storage description information into an execution script, and traverses the operation instance obtained by mapping the erasing rule through the work thread created by each execution script to execute the data erasing operation of each type of storage medium of the target device. The application can complete the data erasing operation on various types of storage media by automatically scanning the storage medium type of the target device, and the operation is simple, and the user does not need to operate the software or reset the device
[0122] Further, the process of user login and user information setting is as follows:
[0123] Insert the data erasing switch of the hardware into the USB interface of the target device,
[0124] The user opens the erasing software client installed on the target device, and inputs a login password;
[0125] The daemon passes the login password to the data erasing switch, the data erasing switch calculates the hash value of the password, and returns the comparison result of the hash value to the target device.
[0126] It should be noted that if the user performs the erasing operation in the software mode, password login is required, and if the hash value comparison is inconsistent, the login is not allowed. After the hash value comparison result is consistent and the login is successful, all detected storage media and partitions are displayed in the form of a device tree as follows:
[0127] As a further preferred technical solution, the storage description information includes storage medium type, storage space and partition information, and the storage space includes device capacity and used space
[0128] It should be noted that the information contained in a single storage device entry includes device file name, device capacity, used space, partition table and encryption protection start. The device file name refers to the name of the device node (such as sda) registered in the kernel by the driver of the storage device; the encryption protection start refers to whether the current partition of the storage device has used encrypted storage. Start means that the physical data saved by the storage device itself is ciphertext, and the erasing strategy for such storage is different, that is, the data is not erased, but the key and partition information are directly erased.
[0129] Further, the present embodiment automatically traverses the storage device database to obtain all storage types, storage space and partition information of the target device. Through user settings or default levels, a configuration file is generated, which includes a storage medium configuration file and a full-disk erasing configuration file. The storage medium configuration file contains the file name of the storage device, the medium type, the partition configuration information, the erasing level, the implemented erasing strategy and the erasing rule set. The full-disk erasing configuration file contains the storage device list, the memory mounting directory, the erasing level, the implemented erasing strategy and the erasing rule set.
[0130] It should be noted here that under the system, one storage medium can have multiple hardware-independent storage devices, such as mechanical hard disks, which are magnetic disk media. One device can have multiple mechanical hard disks installed.
[0131] Among them, disks represent a storage medium configuration file instance as follows:
[0132] Wherein, fd represents full disk erase profile instance, and the instance is as follows:
[0133] As a further preferred technical solution, the erase strategy of the erase strategy entry is arranged according to the type of the storage medium and the erase level, and the erase strategy is used to express the clearing mode of the data in the storage medium.
[0134] The structure of the erase strategy is defined as: method_type_{ops1_count}
[0135] Wherein, the method field indicates that the current entry is an erase strategy entry, the type field indicates the type of the storage medium, the ops1 field indicates the erase field, and the count field is used to identify the execution times of the previous ops1 field.
[0136] Specifically, the definition of each field of the erase strategy is shown in Table 1 as follows:
[0137] Table 1 Field definition of erase strategy
[0138] Wherein, the default erase strategy mapped by each erase level is shown in Table 2 as follows:
[0139] Table 2 Erase strategy corresponding to data erase level
[0140] It should be noted that the erase level is used to describe the complexity of the erase process, and each erase level is composed of different erase strategies, which can be decomposed to obtain a plurality of erase rule entries.
[0141] As a further preferred technical solution, the erase rule in the erase rule entry is used to express the operation mode of data clearing, and the structure of the erase rule is defined as: action_ops2[_engine]
[0142] Wherein, the action field indicates that the current entry is an erase rule entry, the ops2 field indicates the clearing operation written to the storage medium, the engine field indicates the calling of the avx hardware acceleration unit or the neon hardware acceleration unit, and the [] indicates an optional field, which can be selected because some CPU architectures do not have the hardware acceleration function indicated by the field.
[0143] Specifically, the definition of the ops2 field is shown in Table 3 as follows:
[0144] Table 3 Definition of ops2 field
[0145] The engine field is optional and is valid only when the ops is defined as aes / sm4, and the engine field is defined as shown in Table 4.
[0146] Table 4 Definition of engine field
[0147] As a further preferred technical solution, the erasure level includes a basic clearing level, a medium clearing level and a high clearing level, wherein:
[0148] The basic clearing level is to write overwriting data to the storage medium for a single pass;
[0149] The medium clearing level is to write overwriting data to the storage medium for multiple passes;
[0150] The high clearing level is to perform an erasure operation on the data in the storage medium by combining a random number and an encryption algorithm;
[0151] The overwriting data is a fixed number, a random number or a sequential number.
[0152] Specifically, the data erasure level of each level set by the embodiment is defined as follows:
[0153] (1) Basic clearing (class 0): write overwriting data to the storage medium for a single pass, and the overwriting data can be a fixed number such as all zeros or all ones, or random data.
[0154] It should be noted that the basic clearing level set by the embodiment is used for erasing non-sensitive data, and only needs to meet the basic data elimination requirement.
[0155] It should be noted that after the non-sensitive data in the storage medium is erased by the basic clearing level, a random sample is checked in part of the area of the disk to ensure that the data is covered.
[0156] (2) Medium clearing (class 1): write overwriting data to the storage medium for multiple passes, which can include different data patterns (such as all 0 first, all 1 second, and random data third).
[0157] It should be noted that the medium clearing level set by the embodiment is used for data that needs to have confidentiality, but does not belong to sensitive data of important secrets.
[0158] It should be noted that after the sensitive data in the storage medium is erased by the medium clearing level, all areas of the disk are sampled and read to ensure that the data has been covered.
[0159] (3) High level wipe (class 2): using random numbers and cryptographic algorithms to erase device sensitive data, multiple rounds of substitution, permutation and key addition operations are performed on the erased data by block cipher algorithms, and the encryption key is destroyed after completion. After multiple executions of this process, the sensitive data will be unrecoverable, and the purpose of secure erasure will be achieved.
[0160] It should be noted that the high level wipe level set in this embodiment is used for erasing highly confidential or extremely sensitive data.
[0161] It should be noted that after the high sensitive data in the storage medium is erased by the high level wipe level, the head and tail sectors of the disk are read completely, and each partition is sampled to detect whether there is any data residue.
[0162] In particular, the erase level is set to class 0 by default.
[0163] As a further preferred technical solution, after the step S30: parsing the configuration file, converting the storage description information in the configuration file into an execution script, and creating a work thread for each execution script, the method further comprises the following steps:
[0164] When it is determined that the system disk or the main partition in the storage description information is true, the mounting point directory of the configuration file is read;
[0165] The base library, dynamic linker and basic commands are copied to the mounting point directory;
[0166] All user mode processes except the erasing process are terminated, and the root file system is remounted to the mounting point directory;
[0167] All storage medium partitions mounted by the target device are unmounted, and then the work thread is executed.
[0168] It should be noted that the basic commands are the most basic commands for maintaining the operation of a system software. These commands and libraries cannot be directly deleted because the deletion operation itself also uses these basic commands. Forced deletion of them will cause operation failure and directly lead to system unavailability, which cannot continue to complete the remaining data cleaning.
[0169] It should be noted that when it is determined that the system disk or the main partition in the storage description is true, a temporary running environment is first built to the memory mounting point and is set as a temporary root file system; if the system disk or the main partition in the storage description information is false, the erasing strategy is directly executed on the storage partition, and no temporary mounting point is built in the memory.
[0170] As a further preferred technical solution, the step S40: the operation instance is mapped to each erasure rule, and the working thread is used to traverse each operation instance to perform the data erasure operation of the target device, comprising the following steps:
[0171] S41, judging the type of the storage medium, filling the corresponding software erasure tool interface;
[0172] It should be noted that different storage media use different operation tools, for example: flash memory needs to use flashtools, hard disk needs to use fdisk, partd and other tools.
[0173] S42, reading the erasure field of the erasure strategy and filling the erasure rule set;
[0174] It should be noted that the erasure strategy can be decomposed into a set of erasure rule items through the rule parser.
[0175] S43, reading the execution times field of the erasure strategy to obtain the execution times;
[0176] Specifically, the embodiment reads the ops field of method, fills the erasure rule set, and reads the count field of method to obtain the execution times as the loop count.
[0177] S44, mapping each erasure rule in the erasure rule set to an operation instance;
[0178] S45, executing the working thread to traverse all operation instances in turn, and each operation instance is executed in a loop according to the execution times;
[0179] S46, writing 0 to the address segment of all partition information of the target device, the partition information including 0 sector, master partition header, master partition table, backup partition header and backup partition table.
[0180] Further, after the step S45: executing the working thread to traverse all operation instances in turn, and each operation instance is executed in a loop according to the execution times, the method further comprises:
[0181] When it is determined that there is an encryption algorithm call in the erasure rule, the encryption key data structure in the cache is deleted.
[0182] As a further preferred technical solution, the method further comprises the following steps:
[0183] A random number cache is created by a random thread, which is used to store the random sequence required by the data erasure operation.
[0184] Specifically, in addition to creating a worker thread, the embodiment also maintains a special thread to create a fixed-size random number block as an entropy source for the random number erasure operation. The thread acts as a pseudo-random number generator (PRNG) that uses the random number entropy source in the hardware data erasure switch as a seed to generate a random sequence. By creating a special thread, the random number generation speed is improved, and the erasure efficiency is not affected by slow random number generation.
[0185] It should be noted that the operation object of the worker thread is a device file, which is a system abstraction of different types of storage media, as shown in Table 5 below:
[0186] Table 5: Operation object of worker thread
[0187] As a further preferred technical solution, the embodiment binds the target device to the secure erasure switch to implement one-way authentication before performing the data erasure operation. After the first run of the erasure daemon, the data erasure switch hardware is detected, the target device information is sent to the data erasure switch, the target device information is signed by the data erasure switch, and the signed file is saved to the on-chip flash, completing the binding of the data erasure switch and the target device.
[0188] Specifically, before the step S10 of detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to a user login password, the method further includes a device binding process, specifically:
[0189] When the data erasure switch is detected, the login password input by the user is transmitted to the data erasure switch, so that the data erasure switch saves the hash value of the login password calculated by the SM3 algorithm or the SM4 algorithm;
[0190] The device information and public key request of the target device are sent to the data erasure switch, so that the data erasure switch creates a key pair based on the public key request and signs the device information with the private key in the key pair to obtain a signed file;
[0191] The public key and device index number returned by the data erasure switch are received and saved, and the binding between the data erasure switch and the target device is implemented.
[0192] The process of one-way authentication between the target device and the secure erasure switch includes:
[0193] When the data erasure switch is detected, an authentication request and a device index number are sent to the data erasure switch;
[0194] The signed file returned by the data erasure switch is received, the signed file is verified based on the public key and the device information, and the authentication result obtained by the verification is sent to the erasure switch.
[0195] It should be noted that the embodiment designs the binding authentication process between the data erasure switch and the target device, authenticates the personnel who implements the data erasure operation, and ensures the safety and reliability of data erasure.
[0196] As a further preferred technical solution, the method further comprises the following steps:
[0197] When the authentication result is authentication success, in response to the switch signal sent by the data erasure switch, polling the state of the switch signal, and performing an erasure operation on the data of the target device;
[0198] When the authentication result is authentication failure, locking the switch signal sent by the data erasure switch.
[0199] It should be noted that the log of the erasure operation triggered in response to the switch signal and the erasure operation triggered in response to the user using the erasure command is saved to the data erasure switch.
[0200] It should be noted that the embodiment adds a hard control mode, supports hardware offline triggering of erasure operations and software triggering of erasure operations, and can achieve offline data erasure when the target device is in a non-connected state.
[0201] Embodiment 2
[0202] As shown in FIG. 2, the second embodiment of the present application proposes a data erasure method, which is applied to a data erasure switch and comprises the following steps:
[0203] S201, the data erasure switch is mounted to the operating system of the target device in a slave mode, and a data security erasure software image package is installed;
[0204] S202, receiving device information sent by the target device, signing the device information to obtain a signature file, and completing binding with the target device;
[0205] S203, receiving an authentication request sent by the target device, and returning the signature file to the target device based on the authentication request to enable the target device to perform signature verification to obtain an authentication result;
[0206] S204, when receiving the authentication result as authentication success, sending a switch signal to the target device to enable the target device to poll the state of the switch signal and perform an erasure operation on the data of the target device;
[0207] S205, when receiving the authentication result as authentication failure, sending a switch signal to the target device to enable the target device to lock the switch signal.
[0208] As a further preferred technical solution, the step S202 of receiving the device information sent by the target device and signing the device information to obtain a signature file to complete the binding with the target device comprises the following steps:
[0209] receiving the login password input by the user sent by the target device and saving the hash value of the login password;
[0210] receiving the device information and public key request sent by the target device, and creating a key pair based on the public key request, signing the device information with the private key in the key pair to obtain a signature file;
[0211] returning the public key in the key pair and the device index number to the target device to realize the binding between the target device.
[0212] It should be noted that the data erasure switch can save multiple device signature files.
[0213] As a further preferred technical solution, the step S203 of receiving the authentication request sent by the target device and returning the signature file to the target device based on the authentication request to make the target device perform signature verification to obtain an authentication result comprises the following steps:
[0214] receiving the authentication request and the device index number sent by the target device, and returning the signature file to the target device based on the authentication request, so that the target device performs signature verification on the signature file based on the public key and the device information to obtain an authentication result;
[0215] receiving the authentication result sent by the target device.
[0216] As a further preferred technical solution, the switch signal includes executing a user-set or default data erasure strategy, executing a full-disk data default strategy, executing a full-disk data complex strategy, and invalid operation.
[0217] Specifically, the erasure switch can be a micro switch. The user sends a data erasure signal to the target device by pressing the micro switch. The signal mode is shown in Table 5 below:
[0218] Table 6 Signal mode of data erasure switch
[0219] It should be noted that the three erasure strategies shown in Table 6 are shown in Table 1 and Table 2 above.
[0220] As a further preferred technical solution, the method further comprises:
[0221] displaying the current erasure state of the target device.
[0222] Specifically, the erasing state includes a state of waiting for signal input, invalid signal input, clearing operation in progress, clearing operation completion, device authentication failure, and unbound with the device.
[0223] Embodiment 3
[0224] As shown in FIG. 3, the third embodiment of the present application provides a data erasing system, which comprises:
[0225] a daemon process for detecting all storage medium types and partition information of a target device and generating a plurality of storage device entries containing storage description information of the device in response to successful login of a user login password;
[0226] and for converting the storage device entries and setting information into a configuration file in response to an erasing command, wherein the setting information includes an erasing level, an erasing strategy entry, and an erasing rule entry;
[0227] a rule parser for parsing the configuration file, converting the storage description information in the configuration file into an execution script, and creating a work thread for each execution script; and mapping each erasing rule to an operation instance, and using the work thread to traverse the operation instances to perform a data erasing operation of the target device.
[0228] The daemon process is a core process of the system, and is mainly used for listening to a data erasing switch and a storage medium bottom event. Through event driving, the daemon process actively identifies the storage medium of the device, generates a storage device database, and the single storage device entry stored in the storage device database contains a device file name, a device capacity, a used space, a partition table, and an encryption protection start. Upon receiving an erasing command or a switch signal, the daemon process calls a strategy generator. The daemon process also periodically collects a random number entropy source of the erasing switch. The daemon process provides different levels of secure erasing rules and algorithms to the user, and configures a default or custom data clearing strategy.
[0229] Further, the data erasing levels of the system include a basic clearing level, a medium clearing level, and a high-level clearing level. The system further comprises a password algorithm library and a random number cache, which combine the password algorithm and the random number to clear high-sensitive data in an encrypted manner, and meet the high-level clearing technical specification of data.
[0230] As a further preferred technical solution, the system further comprises a strategy rule library for storing data erasing strategies and erasing rules. The strategy rules are arranged according to device categories and secure clearing levels.
[0231] As a further preferred technical solution, the rule parser provided in the system is responsible for the core process of the data clearing operation, mainly used for configuration file parsing, mapping each rule to an erasing operation instruction function, and creating a working thread group to execute the clearing operation in parallel.
[0232] As a further preferred technical solution, the system also has a switch authentication module, which is used for device binding and device authentication with the data erasing switch, and when the device authentication result is authentication success, it polls the state of the switch signal sent by the data erasing switch in response to the switch signal; when the authentication result is authentication failure, the switch signal sent by the data erasing switch is locked.
[0233] As a further preferred technical solution, the password algorithm library is used to provide a merchant secret SM2 / SM3 / SM4 algorithm acceleration interface (avx2 / neon) and a random number entropy source extension interface
[0234] As a further preferred technical solution, the general USB and device management library provided in the system is used to provide the API of uevent device management and USB management.
[0235] It should be noted that other embodiments of the data erasing system described in the present application or the implementation method can refer to the above method embodiment 1, which will not be repeated here.
[0236] Embodiment 4
[0237] As shown in Figure 4, the fourth embodiment of the present application proposes a data erasing switch, which includes a random number entropy source, an algorithm password component, a main controller, an off-chip FLASH and an erasing switch, the output of the random number entropy source is connected with the main controller and the off-chip FLASH, the output of the erasing switch is connected with the main controller, and the output of the main controller and the output of the algorithm password component are connected to the USB interface through the USB interface.
[0238] The USB interface is used for inserting the target device, so that the erasing switch is mounted to the operating system of the target device in a slave mode, and a data security erasing software image package is installed, wherein the off-chip FLASH is used to store operation logs and installation images of the security erasing software.
[0239] The main controller is used to receive device information sent by the target device, call the algorithm password component to sign the device information, obtain a signature file and store it to the main controller, and complete the binding with the target device; receive an authentication request sent by the target device, and return the signature file to the target device based on the authentication request to make the target device verify the signature and obtain an authentication result.
[0240] The erasing switch is used to generate a switch signal and send it to a target device to make the target device poll a state of the switch signal or lock the switch signal;
[0241] The random number entropy source is used to provide a random number for data erasing.
[0242] Specifically, the data security erasing switch is used as an independent hardware unit for providing user identity authentication and an erasing signal, and is matched with data security erasing software to provide a USB interface for connecting a target device.
[0243] The random number entropy source is used as a password type peripheral to provide a high-security and high-performance true random number source.
[0244] The algorithm password component is used as a commercial algorithm SM2 / SM3 / SM4 algorithm to provide an encryption algorithm.
[0245] The main controller runs firmware code, controls and calls other built-in hardware modules, and is responsible for USB communication with erasing software running on the device. The on-chip flash of the main controller stores the firmware of the password device and the digital signature of the device.
[0246] The off-chip FLASH is used to store an operation log and an installation image of the security erasing software.
[0247] The erasing switch is a small micro switch built into the mainboard. The switch cap extends out of the device shell. A user issues an erasing instruction by pressing it down.
[0248] Specifically, the data erasing switch implements one-way authentication through a switch authentication module of the erasing software system. After the erasing daemon is run for the first time, the data erasing switch is detected, the switch authentication module is called to send device information, the data erasing switch signs the device information, and the signed file is saved to the on-chip flash, thereby completing the binding of the data erasing switch and the target device. When the data erasing switch authentication fails, the data erasing software daemon locks the switch signal and does not poll the signal state. The function of triggering the clearing operation by the hardware signal is not effective. When the data erasing switch authentication passes, the data erasing software polls the switch signal state. The switch built-in firmware converts the input signal into a state value and returns it to the software.
[0249] As a further preferred technical solution, the tail of the data erasing switch is provided with an LED display lamp for notifying a user of a current erasing state. Specifically,
[0250] Orange: always on to indicate that the authentication passes and waits for signal input, and flashes to indicate that the signal input is invalid;
[0251] Green: flashes to indicate that the clearing operation is in progress, and is always on to indicate that the clearing operation is completed.
[0252] Red: flickering indicates device authentication failure;
[0253] Off: indicates not bound to the device.
[0254] It should be noted that other embodiments of the data erasure switch or implementation methods described in the present application can refer to the above method embodiment 2, which will not be repeated here.
[0255] Embodiment 5
[0256] As shown in Figure 5, the fifth embodiment of the present application proposes a data erasure device, which comprises a data erasure switch and a data erasure system installed in a target device, wherein the data erasure system comprises:
[0257] A daemon process for detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to successful login of the user login password, wherein the storage device entry contains storage description information of the device;
[0258] And for converting the storage device entry and setting information into a configuration file in response to an erasure command or a switch signal sent by the data erasure switch offline, wherein the setting information includes erasure level, erasure policy entry and erasure rule entry;
[0259] A rule parser for parsing the configuration file, converting the storage description information in the configuration file into an execution script, and creating a work thread for each execution script; each erasure rule is mapped to an operation instance, and the work thread is used to traverse each operation instance to execute the data erasure operation of the target device.
[0260] Specifically, the interaction process between the data erasure switch and the data erasure system installed in the target device is as follows:
[0261] (1) The data erasure switch binding process is as follows:
[0262] Insert the data erasure switch into the device.
[0263] The user opens the erasure software client and enters the login password.
[0264] The daemon process passes the password to the data erasure switch, and the data erasure switch saves the hash value of the password SM3.
[0265] The switch authentication module obtains the motherboard number, cpu information, host name and current time of the device, and saves them as message.
[0266] The switch authentication module sends a public key request to the data erasure switch and the message.
[0267] The data erasure switch creates and saves a key pair.
[0268] The data erasure switch signs message with the private key and returns the public key and device index number.
[0269] The switch authentication module saves the public key and device index number.
[0270] (2) The automatic authentication process of the data erasure switch is as follows:
[0271] The switch authentication module detects the insertion of the data erasure switch.
[0272] The switch authentication module sends a request and device index number to the data erasure switch.
[0273] After receiving the authentication request, the data erasure switch returns a signed file.
[0274] The switch authentication module uses the saved switch public key and message to perform signature verification.
[0275] The switch authentication module returns the signature verification result to the data erasure switch.
[0276] The data erasure switch records log information.
[0277] (3) User login and information setting process:
[0278] Insert the data erasure switch into the device.
[0279] The user opens the erasure software client and enters the login password.
[0280] The daemon process passes the password to the data erasure switch, which calculates the hash value of the password.
[0281] The data erasure switch returns the comparison result of the hash value, and allows login if the comparison is consistent, and fails to login if the comparison is inconsistent.
[0282] (4) Online data erasure process:
[0283] The daemon process detects all storage medium types and partition information of the target device and generates a number of storage device entries in response to the user successfully logging in with the login password, and the storage device entries contain device storage description information; in response to an erasure command or a switch signal sent by the data erasure switch offline, the storage device entries and setting information are converted into a configuration file, wherein the setting information includes erasure level, erasure strategy entries, and erasure rule entries.
[0284] The rule parser is used to parse the configuration file, convert the storage description information in the configuration file into execution scripts, and create a work thread for each execution script; each erasure rule is mapped to an operation instance, and the work thread is used to traverse each operation instance to perform the data erasure operation of the target device.
[0285] (5) Offline data erasure process:
[0286] The data erasure switch is mounted to the operating system of the target device in a mode manner, and installs a data security erasure software image package;
[0287] When the device authentication result is authentication success, a switch signal is sent to the target device to make the target device poll the state of the switch signal, and perform the data erasure operation on the target device;
[0288] When the device authentication result is authentication failure, a switch signal is sent to the target device to make the target device lock the switch signal.
[0289] It should be noted that other embodiments of the data erasure device described in the present application or the implementation method can refer to the above embodiments, which will not be repeated here.
[0290] Further, the present embodiment also claims a client, comprising a memory and a processor; wherein the processor runs a program corresponding to the executable program code stored in the memory by reading the executable program code, to realize the method as described in embodiment 1 above.
[0291] Further, the present embodiment proposes a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the method as described in embodiment 1 above.
[0292] The device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. According to actual needs, part or all of the modules can be selected to realize the purpose of the present embodiment. Those skilled in the art can understand and implement it without creative labor.
[0293] The various component embodiments of the present application can be implemented in hardware, or as software modules running in one or more processors, or combinations thereof. Those skilled in the art will appreciate that some or all of the functions of some or all of the components of the computing processing device according to embodiments of the present application can be implemented using a microprocessor or a digital signal processor (DSP) in practice. The present application can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, or provided on a carrier medium, or in any other form.
[0294] For example, Fig. 6 shows a computing processing device which can implement the methods according to the present application. The computing processing device conventionally comprises a processor 1010 and a computer program product or computer readable medium in the form of a memory 1020. The memory 1020 can be an electronic memory such as a flash memory, EEPROM (electrically erasable programmable read-only memory), EPROM, hard disk, or ROM. The memory 1020 has a storage space 1030 for program code 1031 for performing any of the method steps in the methods described above. For example, the storage space 1030 for program code can comprise individual program codes 1031 for implementing the various steps in the methods described above, respectively. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards, or floppy disks. Such computer program products are typically portable or stationary memory units as described with reference to Fig. 7. The memory unit can have a storage section, storage space, etc. arranged similarly to the memory 1020 in the computing processing device of Fig. 6. The program code can be compressed, for example, in a suitable form. Typically, the memory unit comprises computer readable code 1031', i.e. code which can be read by a processor such as 1010, which, when run by the computing processing device, causes the computing processing device to perform the various steps in the methods described above.
[0295] It should be understood that portions of the present application can be realized with a hardware, software, firmware or a combination thereof. In the above-described embodiments, a plurality of steps or methods can be realized with software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if realized with hardware, and as in another embodiment, it can be realized with any one or a combination of the following technologies known in the art: discrete logic circuit having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
[0296] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0297] In addition, the terms "first", "second", are used only for the purpose of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.
[0298] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and cannot be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. A data erasing method, wherein, The method comprises: in response to successful login of a user login password, detecting all storage medium types and partition information of a target device and generating a plurality of storage device entries, the storage device entries containing storage description information of the device, the storage description information including storage medium types, storage space and partition information, the storage space including device capacity and used space; in response to an erase command, converting the storage device entries and setting information into a configuration file, wherein the setting information includes an erase level, an erase strategy entry and an erase rule entry; parsing the configuration file, converting the storage description information in the configuration file into execution scripts, and creating a work thread for each execution script; mapping each erase rule to an operation instance, and using the work thread to traverse the operation instances to perform a data erasing operation on the target device.
2. The data erasing method of claim 1, wherein, The erase strategy of the erase strategy entry is arranged according to the type of the storage medium and the erase level, and is used to express a clearing mode of data in the storage medium. The structure of the erase strategy is defined as: method_type_{ops1_count} wherein the method field indicates that the current entry is an erase strategy entry, the type field indicates the type of the storage medium, the ops1 field indicates an erase field, and the count field is used to identify the execution times of the previous ops1 field.
3. The data erasing method of claim 1, wherein, The erase rule in the erase rule entry is used to express an operation mode of data clearing, and the structure of the erase rule is defined as: action_ops2[_engine] wherein the action field indicates that the current entry is an erase rule entry, the ops2 field indicates a clearing operation written to the storage medium, the engine field indicates calling an avx hardware acceleration unit or a neon hardware acceleration unit, and the [] indicates an optional field.
4. The data erasing method of claim 1, wherein, The erase level includes a basic clearing level, a medium clearing level and a high-level clearing level, wherein: The basic clearing level is to write overwriting data to the storage medium in a single pass; The medium clearing level is to write overwriting data to the storage medium in multiple passes; The high-level clearing level is to perform an erasing operation on data in the storage medium by combining a random number with an encryption algorithm; The overwriting data is a fixed number, a random number or a sequential number.
5. The data erasing method of claim 4, wherein, The erasing operation on data in the storage medium by combining a random number with an encryption algorithm comprises: using a random number as an encryption key, performing multiple rounds of substitution, permutation and key addition operations on sensitive data to be erased in the storage medium through a block cipher algorithm, and destroying the encryption key after completion.
6. The data erasing method of claim 1, wherein, After the parsing of the configuration file, the conversion of the storage description information in the configuration file into execution scripts, and the creation of a work thread for each execution script, the method further comprises: when determining that the system disk or the main partition in the storage description information is true, reading a mount point directory of the configuration file; copying a basic library, a dynamic linker and basic commands to the mount point directory; terminating all user-mode processes except the erasing process, and remounting a root file system to the mount point directory; Unloading all storage medium partitions mounted by the target device, and then executing the worker thread.
7. The data erasing method according to claim 1 or 2, wherein, The worker thread is used to traverse the operation instances to perform the data erasing operation on the target device. Determine the type of the storage medium and fill in the software erasing tool interface accordingly; Read the erasing field of the erasing strategy and fill in the erasing rule set; Read the execution times field of the erasing strategy and obtain the execution times; Map each erasing rule in the erasing rule set to an operation instance; Execute the worker thread to traverse all the operation instances in sequence, and each operation instance is executed in a loop according to the execution times; Write 0 to the address segment of all partition information of the target device, which includes the 0th sector, the master partition header, the master partition table, the backup partition header, and the backup partition table.
8. The data erasing method of claim 7, wherein, After executing the worker thread to traverse all the operation instances in sequence, and each operation instance is executed in a loop according to the execution times, the method further comprises: When it is determined that there is an encryption algorithm call in the erasing rule, delete the encryption key data structure in the cache.
9. The data erasing method of claim 1, wherein, The method further comprises: Create a random number cache through a random thread, which is used to store the random sequence required by the data erasing operation.
10. The data erasing method of claim 1, wherein, Before detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to the user login password, the method further comprises: When the data erasing switch is detected to be inserted, pass the login password input by the user to the data erasing switch, so that the data erasing switch saves the hash value of the login password; Send the device information and public key request of the target device to the data erasing switch, so that the data erasing switch creates a key pair based on the public key request and signs the device information using the private key in the key pair to obtain a signature file; Receive and save the public key and device index number returned by the data erasing switch, and realize the binding between the data erasing switch.
11. The data erasing method of claim 10, wherein, The method further comprises: When the data erasing switch is detected to be inserted, send an authentication request and a device index number to the data erasing switch; Receive the signature file returned by the data erasing switch, and verify the signature file based on the public key and the device information, and send the authentication result obtained by the verification to the erasing switch.
12. The data erasing method of claim 11, wherein, The method further comprises: When the authentication result is authentication success, respond to the switch signal sent by the data erasing switch, poll the state of the switch signal, and perform the data erasing operation on the target device; When the authentication result is authentication failure, lock the switch signal sent by the data erasing switch.
13. The data erasing method of claim 10, wherein, Before detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to the user login password, the method further comprises: Transmit the login password input by the user to the data erasing switch, so that the data erasing switch calculates the hash value of the login password, and compares the currently calculated hash value of the login password with the hash value of the login password calculated in the device binding process; Receiving the hash value comparison result returned by the data erasing switch to determine whether the login is successful.
14. A data erasing method, wherein, The method comprises: The data erasing switch is mounted to the operating system of the target device in a mode manner, and a data security erasing software image package is installed; Receiving the device information sent by the target device, signing the device information to obtain a signature file to complete the binding with the target device; Receiving the authentication request sent by the target device, and returning the signature file to the target device based on the authentication request to enable the target device to perform signature verification to obtain an authentication result; When receiving the authentication result as authentication success, sending a switch signal to the target device to enable the target device to poll the state of the switch signal to perform erasing operation on the data of the target device; When receiving the authentication result as authentication failure, sending a switch signal to the target device to enable the target device to lock the switch signal; Inserting the data erasing switch into the target device to enable the target device to perform online data erasing, comprising: in response to the successful login of the user login password, detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries, the storage device entry containing storage description information of the device, the storage description information including storage medium type, storage space and partition information, the storage space including device capacity and used space; In response to the erasing command, converting the storage device entry and setting information into a configuration file, wherein the setting information includes erasing level, erasing strategy entry and erasing rule entry; Analyzing the configuration file, converting the storage description information in the configuration file into an execution script, and creating a work thread for each execution script; Mapping each erasing rule to an operation instance, and using the work thread to traverse each operation instance to perform data erasing operation on the target device.
15. The data erasing method of claim 14, wherein, The receiving of the device information sent by the target device and the signing of the device information to obtain a signature file to complete the binding with the target device comprises: Receiving the user input login password sent by the target device and saving the hash value of the login password; Receiving the device information and public key request sent by the target device, and creating a key pair based on the public key request, signing the device information using the private key in the key pair to obtain a signature file; Returning the public key in the key pair and the device index number to the target device to realize the binding between the target device.
16. The data erasing method of claim 14, wherein, The receiving of the authentication request sent by the target device and the returning of the signature file to the target device based on the authentication request to enable the target device to perform signature verification to obtain an authentication result comprises: Receiving the authentication request and device index number sent by the target device, and returning the signature file to the target device based on the authentication request to enable the target device to perform signature verification on the signature file based on the public key in the key pair and the device information to obtain an authentication result; Receiving the authentication result sent by the target device.
17. The data erasing method of claim 14, wherein, The switch signal includes executing the data clearing strategy set by the user or by default, executing the full-disk data default strategy, executing the full-disk data complex strategy, and invalid operation.
18. The data erasing method of claim 14, wherein, The method further comprises: displaying the current erasing state of the target device.
19. A data erasure system wherein, The system comprises: a daemon process for detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to successful login of a user login password, the storage device entries containing storage description information of the device, the storage description information including storage medium types, storage space and partition information, the storage space including device capacity and used space; and for converting the storage device entries and setting information into a configuration file in response to an erasing command, wherein the setting information includes erasing levels, erasing strategy entries and erasing rule entries; a rule parser for parsing the configuration file, converting the storage description information in the configuration file into execution scripts, creating a work thread for each execution script, and mapping each erasing rule to an operation instance, and using the work thread to traverse the operation instances to perform data erasing operations on the target device.
20. A client, wherein, The client comprises a memory and a processor; wherein the processor runs a program corresponding to executable program code stored in the memory by reading the executable program code, to implement the method of any one of claims 1-13.
21. A computer readable storage medium having stored thereon a computer program, wherein, The computer program, when executed by a processor, implements the method of any one of claims 1-13.
22. A data erase switch, wherein, comprises: a random number entropy source, an algorithmic cryptographic component, a main controller, an off-chip FLASH and an erasing switch, an output of the random number entropy source being connected to the main controller and the off-chip FLASH, an output of the erasing switch being connected to the main controller, and outputs of the main controller and the algorithmic cryptographic component both being connected to a USB interface through a USB interface device; the USB interface is used for plugging into a target device, so that the erasing switch is mounted to an operating system of the target device in slave mode and installs a data security erasing software image package, wherein the off-chip FLASH is used for storing operation logs and an installation image of the security erasing software; the main controller is used for receiving device information sent by the target device, calling the algorithmic cryptographic component to sign the device information, obtaining a signature file and storing the signature file to the main controller, completing binding with the target device, receiving an authentication request sent by the target device, and returning the signature file to the target device based on the authentication request to make the target device perform signature verification and obtain an authentication result; the erasing switch is used for generating a switch signal and sending the switch signal to the target device, so that the target device polls a state of the switch signal and performs a data erasing operation on the target device when the authentication result is authentication success, or locks the switch signal when the authentication result is authentication failure; the random number entropy source is used for providing random numbers for data erasing; The method comprises the following steps: inserting a data erasing switch into the target device to make the target device perform online data erasing, including detecting all storage medium types and partition information of the target device and generating a plurality of storage device entries in response to successful login of a user login password, wherein the storage device entries contain storage description information of the device, and the storage description information includes storage medium types, storage space and partition information, and the storage space includes device capacity and used space; converting the storage device entries and setting information into a configuration file in response to an erasing command, wherein the setting information includes erasing levels, erasing strategy entries and erasing rule entries; analyzing the configuration file, converting the storage description information in the configuration file into execution scripts, and creating a work thread for each execution script; mapping each erasing rule into an operation instance, and using the work thread to traverse the operation instances to perform data erasing operation of the target device.
23. A data erasing device, wherein, The data erasing system installed in the target device, wherein the data erasing system is used to perform the data erasing method according to any one of claims 1-13, and the data erasing switch is used to perform the data erasing method according to any one of claims 14-18, and the data erasing system comprises: a daemon process used to detect all storage medium types and partition information of the target device and generate a plurality of storage device entries in response to successful login of a user login password, wherein the storage device entries contain storage description information of the device; and a rule analyzer used to convert the storage device entries and setting information into a configuration file in response to an erasing command or a switch signal sent by the data erasing switch offline, wherein the setting information includes erasing levels, erasing strategy entries and erasing rule entries; analyzing the configuration file, converting the storage description information in the configuration file into execution scripts, and creating a work thread for each execution script; mapping each erasing rule into an operation instance, and using the work thread to traverse the operation instances to perform data erasing operation of the target device.
24. A computing processing device, wherein, comprise: a memory in which computer readable code is stored; one or more processors, when the computer readable code is executed by the one or more processors, the computing processing device performs the data erasing method according to any one of claims 1-13.
25. A computer program comprising computer readable code which, when run on a computing processing device, causes the computing processing device to perform the data erasing method according to any one of claims 1-13.
Citation Information
Patent Citations
System and method for verification of a secure erase operation on a storage device
CN110045919A
Mobile storage method and device, equipment and storage medium
CN115906196A
Data erasing method and system, secure erasing switch and data erasing device
CN118520520A
Selective Storage Device Wiping System and Method
US20160253529A1