Encryption method, data transmission method and device for mobile storage device
By setting up swap areas and security areas in mobile storage devices and determining the data transmission method according to the terminal environment, the problem of file circulation barriers between different terminals or users of encrypted mobile storage devices is solved, and convenient file flow within the enterprise is achieved and external security controls.
Patent Information
- Application Number
- CN202111574746.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-12-21
AI Technical Summary
There are obstacles to the circulation of files between existing encrypted mobile storage devices in different terminals or between different users of the same terminal, which affects work efficiency, and users need to go through the cumbersome approval process to obtain usage permissions.
Switch areas and security areas are set up in the mobile storage device. The switching areas are used for internal file circulation, and the security areas are used for the control permissions of the external environment. The security areas are mounted and encrypted through the terminal kernel to determine the data transmission method based on the terminal environment.
On the premise of ensuring security, the convenience of internal documents in the enterprise has been improved, the approval process has been reduced, and work efficiency has been improved.
Smart Images

Figure CN114462057B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to an encryption method, a data transmission method and a device for a mobile storage device. Background Art
[0002] At present, enterprises have strict protection for internal confidential data and set up strict controls when using mobile storage media for operations such as data copying.
[0003] For example, for files that can be circulated within an enterprise, the encrypted USB flash drive may have different permissions in different terminals or different users on the same terminal, which will hinder the circulation of files within the enterprise and affect work efficiency. How to make file storage based on mobile storage media safe and improve the convenience of file circulation within the enterprise is an urgent problem that technicians in this field need to solve. Summary of the invention
[0004] The present invention provides an encryption method, a data transmission method and a device for a mobile storage device, so that the file circulation based on the mobile storage medium can improve the convenience of circulating files in an internal environment under the premise of ensuring security.
[0005] In a first aspect, the present invention provides an encryption method for a mobile storage device, comprising: when the mobile storage device is connected to a terminal, setting the size of a swap area and a security area based on the available storage space of the mobile storage device; determining a first free drive letter and a second free drive letter available to the terminal, and determining that the first free drive letter identifies the swap area, and determining that the second free drive letter identifies the security area; mounting a swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mounting a security area device object in the terminal kernel to the security area identified by the second free drive letter; wherein the swap area device object and the security area device object are pre-created in the kernel of the terminal; and encrypting the security area.
[0006] According to the encryption method of the mobile storage device provided by the present invention, before encrypting the security area, it also includes: formatting the exchange area and the security area; and after formatting the security area, executing the step of encrypting the security area.
[0007] According to the encryption method for a mobile storage device provided by the present invention, setting the sizes of the swap area and the security area based on the available storage space of the mobile storage device includes: setting a ratio parameter of the swap area and the security area; and setting the sizes of the swap area and the security area in the available storage space according to the ratio parameter.
[0008] According to the encryption method for a mobile storage device provided by the present invention, setting the sizes of the swap area and the security area in the available storage space according to the ratio parameter includes: setting a startup area in the available storage space of the mobile storage device, wherein an executable file is set in the startup area, and the security area and the swap area are accessed by running the executable file; and dividing the remaining storage space of the mobile storage device into a swap area and a security area according to the ratio parameter.
[0009] According to the encryption method for a mobile storage device provided by the present invention, the formatting of the swap area and the security area is: formatting the swap area and the security area through the terminal formatting interface, and the formatting includes performing read and write operations on the sectors of the mobile storage device through a file driver, and encrypting the data of the read and write operations.
[0010] According to the encryption method for a mobile storage device provided by the present invention, the exchange area device object and the secure area device object are created in the terminal kernel through a file driver loaded by the terminal.
[0011] In a second aspect, the present invention also provides a data transmission method, comprising: when a mobile storage device obtained by the encryption method as described above is connected to a terminal, confirming the terminal environment in which the mobile storage device is located; and determining the data transmission methods of the exchange area and the security area in the mobile storage device respectively according to the terminal environment.
[0012] According to the data transmission method provided by the present invention, the data transmission method of separately determining the swap area and the secure area in the mobile storage device according to the terminal environment further includes: setting a startup area in the available storage space of the mobile storage device, wherein an executable file is set in the startup area, and accessing the secure area and the swap area by running the executable file; and performing data transmission based on the access to the secure area and the swap area.
[0013] According to the data transmission method provided by the present invention, accessing the security area and the swap area by running the executable file further includes: performing security authentication on the executable file in the startup area; when the executable file passes the security authentication, accessing the security area and the swap area by running the executable file.
[0014] According to the data transmission method provided by the present invention, the data transmission based on the access to the security zone and the swap zone includes: if the terminal environment is within the enterprise: the swap zone device object is loaded into the free drive letter of the swap zone through the system interface of the terminal, and the file driver opens the swap zone device object with read and write permissions to perform sector read and write operations; and, after the security zone is mounted, the security zone device object is loaded into the security zone through the system interface of the terminal, and the way in which the file driver opens the security zone is determined according to the permissions of the mobile storage device, and the sectors of the security zone are read and / or written data are transmitted according to the way.
[0015] According to the data transmission method provided by the present invention, the data transmission method of separately determining the exchange area and the security area in the mobile storage device according to the terminal environment includes: if the terminal environment is outside the enterprise, the exchange area is not mounted; and, based on the management and control authority, the security area is used for data transmission.
[0016] In a third aspect, the present invention provides an encryption device for a mobile storage device, comprising: a swap area and a secure area size setting module, a swap area and a secure area drive letter determination module, a swap area and a secure area device object mounting module and an encryption module.
[0017] Among them, the swap area and security area size setting module is used to set the size of the swap area and the security area based on the available storage space of the mobile storage device when the mobile storage device is connected to the terminal; the swap area and security area drive letter determination module is used to determine the first free drive letter and the second free drive letter available to the terminal, and determine that the first free drive letter identifies the swap area, and determine that the second free drive letter identifies the security area; the swap area and security area device object mounting module is used to mount the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mount the security area device object in the terminal kernel to the security area identified by the second free drive letter; wherein the swap area device object and the security area device object are pre-created in the kernel of the terminal; the encryption module is used to encrypt the security area.
[0018] In a fourth aspect, the present invention further provides a data transmission device, comprising: a terminal environment confirmation module and a transmission method confirmation module. The terminal environment confirmation module is used to confirm the terminal environment in which the mobile storage device is located when the mobile storage device obtained by the encryption method as described above is connected to the terminal; the transmission method confirmation module is used to determine the data transmission method of the exchange area and the security area in the mobile storage device respectively according to the terminal environment.
[0019] In a fifth aspect, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the encryption method for a mobile storage device as described in any one of the above items are implemented, or when the processor executes the program, the steps of the data transmission method as described in any one of the above items are implemented.
[0020] In a sixth aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the encryption method for a mobile storage device as described in any one of the above items are implemented, or when the processor executes the program, the steps of the data transmission method as described in any one of the above items are implemented.
[0021] In the seventh aspect, the present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the encryption method for a mobile storage device as described in any one of the above items are implemented, or when the processor executes the program, the steps of the data transmission method as described in any one of the above items are implemented.
[0022] The present invention is proposed to address the following defects in the prior art: current encrypted mobile storage devices only have a security zone, and a user wants to give a certain file that can be circulated within the enterprise to another user through the encrypted mobile storage device. However, when the other user gets the encrypted mobile storage device, he finds that he has no permission to use the encrypted mobile storage device. He needs to go through various cumbersome approval processes and obtain permission to use the encrypted mobile storage device before he can get the file.
[0023] After adopting the present invention, it is only necessary to put the circulated files into the exchange area of the encrypted mobile storage device. Then, the user only needs to access the encrypted mobile storage device on the terminal system within the enterprise, and can get the file without going through a cumbersome approval process. If the user takes the encrypted mobile storage device out of the enterprise for use, the internal files in the mobile storage device cannot be used outside the enterprise because the exchange area cannot be used. Therefore, the convenience of circulating files within the enterprise is improved while achieving the security of the encrypted mobile storage device, and the work efficiency of the enterprise employees is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1It is a flowchart of the steps of the encryption method of the mobile storage device provided by the present invention;
[0026] Figure 2 It is a structural schematic diagram of an encryption device for a mobile storage device provided by the present invention;
[0027] Figure 3 is a flowchart of the steps of the data transmission method provided by the present invention;
[0028] Figure 4 It is a structural schematic diagram of the data transmission device provided by the present invention;
[0029] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] The present invention aims to solve the problem that it is inconvenient to transfer files between different users and different terminals within the enterprise because users use encrypted mobile storage devices such as USB flash drives at the internal terminals of the enterprise.
[0032] Reference Figure 1 , Figure 1 One of the flow charts of the encryption method of the mobile storage device provided by the present invention comprises the following steps:
[0033] Step 110: When the mobile storage device is connected to the terminal, the sizes of the exchange area and the security area are set based on the available storage space of the mobile storage device.
[0034] In specific implementation, the mobile storage device may be a mobile storage medium such as a USB flash drive, a mobile hard disk, etc. This embodiment does not limit this.
[0035] When the mobile storage device is connected to the terminal, the terminal system will detect the access notification, determine the size of the available storage space of the mobile storage device according to the detected access status, and define the size of the exchange area and the size of the security area in the available storage space.
[0036] In this embodiment, the agreed meanings of the exchange area and the security area are as follows:
[0037] Swap area: used to store files that can flow freely in the internal environment and are not mounted in the external environment.
[0038] Security zone: used to store files that can be circulated in the internal environment only after login authentication, and used to store files that can be circulated in the external environment based on control permissions.
[0039] In a preferred embodiment, the sizes of the swap area and the safe area can be set by the following two steps:
[0040] (1) setting a ratio parameter of the exchange area and the security area in the available storage space of the mobile storage device;
[0041] (2) According to the ratio parameter, the sizes of the swap area and the security area are set in the available storage space.
[0042] If the interactive area ratio of the mobile storage device is 0, it means that the mobile storage device only has a secure area but no exchange area.
[0043] In addition, in this embodiment, the available storage space of the mobile storage device is used to set the boot area, and the boot area is provided with an executable file, which is used to use the secure area and the swap area. Therefore, the size of the swap area and the secure area is obtained by dividing the remaining storage space after deducting the boot area from the available storage space of the mobile storage device according to the proportional parameter.
[0044] Step 120: Determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the swap area, and determine that the second free drive letter identifies the secure area.
[0045] Step 130, mount the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mount the security area device object in the terminal kernel to the security area identified by the second free drive letter; wherein the swap area device object and the security area device object are pre-created in the kernel of the terminal.
[0046] In one embodiment, the swap area device object and the secure area device object are created in the terminal kernel through a file driver loaded by the terminal.
[0047] Step 140, encrypt the security zone.
[0048] In a specific embodiment, before encrypting the security zone, the method further includes:
[0049] Format the swap area and the secure area;
[0050] Wherein, when formatting the security area, the security area is also encrypted.
[0051] In this step, the exchange area and the security area are formatted through the terminal formatting interface. The formatting includes performing read and write operations on the sectors of the mobile storage device through a file driver and encrypting the data of the read and write operations.
[0052] That is to say, when formatting the secure zone, encryption is driven by the file, and when formatting the swap zone, encryption or non-encryption can be used. When users use encrypted USB flash drives within the enterprise, they can use the swap zone as long as they access the terminal (without authentication), and it is not subject to permission control. After executing the executable file in the boot zone, the secure zone can be used, and the mounted secure zone is subject to the permission control of the secure zone device object driven by the file.
[0053] The user has registered an encrypted mobile storage device within the enterprise. If the files are allowed to be used by all internal employees, these files can be placed in the exchange area of the encrypted mobile storage device. In this way, all employees within the enterprise can read and write files in this area normally after obtaining the mobile storage device.
[0054] On the other hand, if the user takes the mobile storage device out of the company for external use, he or she can only use the files in the secure zone after successfully logging in with the password. This can not only ensure the safe and convenient circulation of internal files within the company, but also ensure that these internal files cannot be seen by the external environment, thereby achieving the goal of improving the convenience of internal file circulation within the company while maintaining the security of encrypted mobile storage devices.
[0055] The encryption of a mobile storage device is further explained below through an example.
[0056] In one embodiment, encrypting the USB flash drive to complete the registration includes the following steps:
[0057] (1) The terminal loads the file driver and creates the swap area and secure area device objects in the system kernel.
[0058] For example:
[0059] Swap area device object: "\\Device\\QCMEncDisk\\PublicPartion#"
[0060] Safe zone device object: "\\Device\\QCMEncDisk\\SafePartion#"
[0061] The '#' in the device object name represents the disk number.
[0062] If the connected disk number is 3,
[0063] Its swap area device object is "\\Device\\QCMEncDisk\\PublicPartion3",
[0064] Its safe zone device object is "\\Device\\QCMEncDisk\\SafePartion3".
[0065] (2) The terminal is connected to a USB flash drive or mobile hard disk and the registered swap area ratio parameters are set.
[0066] For example, the swap area ratio is 50%. Of course, as mentioned above, if the interactive area ratio of the mobile storage device is 0, it means that the mobile storage device only has a safe area and no swap area.
[0067] (3) Find two free drive letters from the system
[0068] For example, drive letter E, drive letter F.
[0069] (4) The swap area is associated with the swap area device object, and the swap area is associated with the swap area device object.
[0070] For example:
[0071] Assume that the disk number is 3, the free drive letter E is the swap drive letter, and F is the safe drive letter, then
[0072] Through the system interface
[0073] DefineDosDevice
[0074] Mount "\\Device\\QCMEncDisk\\PublicPartion3" to drive E.
[0075] For example, through the system interface
[0076] DefineDosDevice
[0077] Mount "\\Device\\QCMEncDisk\\SafePartion3" to drive F.
[0078] (5) Format the swap area and safe area
[0079] The swap area and security area are formatted through the system formatting interface. The read and write operations of the sectors are formatted through the file driver. The file driver will encrypt and decrypt the data of the read and write sectors to ensure the security of the data.
[0080] After the above steps, the encryption and registration of the USB flash drive can be completed.
[0081] The encryption method of the mobile storage device provided by the present invention is described below. The encryption device of the mobile storage device of the present invention described below and the encryption method of the mobile storage device of the present invention described above can be referred to each other.
[0082] Reference Figure 2 The present invention also provides an embodiment of an encryption device for a mobile storage device, comprising: a swap area and a security area size setting module 20, a swap area and a security area drive letter determination module 21, a swap area and a security area device object mounting module 22 and an encryption module 23. Among them:
[0083] The swap area and security area size setting module 20 is used to set the sizes of the swap area and security area based on the available storage space of the mobile storage device when the mobile storage device is connected to the terminal.
[0084] In specific implementation, the mobile storage device may be a mobile storage medium such as a USB flash drive, a mobile hard disk, etc. This embodiment does not limit this.
[0085] When the mobile storage device is connected to the terminal, the terminal system will detect the access notification, determine the size of the available storage space of the mobile storage device according to the detected access status, and define the size of the exchange area and the size of the security area in the available storage space.
[0086] In this embodiment, the agreed meanings of the exchange area and the security area are as follows:
[0087] Swap area: used to store files that can flow freely in the internal environment and are not mounted in the external environment.
[0088] Security zone: used to store files that can be circulated in the internal environment only after login authentication, and used to store files that can be circulated in the external environment based on control permissions.
[0089] In a preferred embodiment, the sizes of the swap area and the safe area can be set by the following two steps:
[0090] (1) setting a ratio parameter of the exchange area and the security area in the available storage space of the mobile storage device;
[0091] (2) According to the ratio parameter, the sizes of the swap area and the security area are set in the available storage space.
[0092] If the interactive area ratio of the mobile storage device is 0, it means that the mobile storage device only has a secure area but no exchange area.
[0093] In addition, in this embodiment, the available storage space of the mobile storage device is used to set the boot area, and the boot area is provided with an executable file, which is used to use the secure area and the swap area. Therefore, the size of the swap area and the secure area is obtained by dividing the remaining storage space after deducting the boot area from the available storage space of the mobile storage device according to the proportional parameter.
[0094] The swap area and security area drive letter determination module 21 is used to determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the swap area, and determine that the second free drive letter identifies the security area;
[0095] The swap area and security area device object mounting module 22 is used to mount the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and to mount the security area device object in the terminal kernel to the security area identified by the second free drive letter; wherein the swap area device object and the security area device object are pre-created in the kernel of the terminal;
[0096] The encryption module 23 is used to encrypt the security zone.
[0097] In one embodiment, the module may be further used to format the exchange area and the security area; and after formatting the security area, perform a step of encrypting the security area.
[0098] In this embodiment, the encryption module 23 formats the swap area and the security area through the terminal formatting interface. The formatting includes performing read and write operations on the sectors of the mobile storage device through a file driver and encrypting the data of the read and write operations.
[0099] That is to say, when formatting the secure zone, encryption is done through the file driver, and when formatting the swap zone, encryption or non-encryption can be done. When users use an encrypted USB flash drive within the enterprise, they can use the swap zone as long as they connect to the terminal (no authentication required), and it is not subject to permission control. After the executable file in the boot zone is authenticated, the secure zone can be used, and the mounted secure zone is subject to the permission control of the secure zone device object driven by the file.
[0100] Reference Figure 3 , Figure 3 The second step flow chart of the data transmission method provided by the present invention includes:
[0101] Step 310, when the mobile storage device obtained by the encryption method is connected to a terminal, confirming the terminal environment where the mobile storage device is located;
[0102] Step 320: Determine the data transmission methods of the exchange area and the security area in the mobile storage device respectively according to the terminal environment.
[0103] That is to say, when the encrypted and registered mobile storage device is connected to the terminal, the environment described by it is determined whether it is an internal environment or an external environment, and the flow of files is restricted by different access rights between the exchange area and the security area.
[0104] Specifically, when users use encrypted mobile storage devices within the enterprise, they can use the swap area as long as they access the terminal (without authentication), and it is not subject to permission control. The secure area can be used after the executable file in the startup area is authenticated, and the mounted secure area is subject to the permission control of the file-driven secure area device object.
[0105] In one embodiment, when determining the data transmission methods of the exchange area and the security area in the mobile storage device respectively according to the terminal environment, it may further include:
[0106] Setting a startup area in the available storage space of the mobile storage device, wherein an executable file is set in the startup area;
[0107] Perform security authentication on executable files in the startup area;
[0108] When the executable file passes the security authentication, accessing the security area and the exchange area by running the executable file;
[0109] Based on the access to the security area and the exchange area, data transmission is performed.
[0110] In a specific embodiment, according to the terminal environment, the method for respectively determining the data transmission of the exchange area and the security area in the mobile storage device includes:
[0111] (1) If the terminal environment is within the enterprise
[0112] (a) loading the swap area device object to the free drive letter of the swap area through the system interface of the terminal, and the file driver opens the swap area device object with read and write permissions to perform sector read and write operations; and
[0113] (b) After the secure zone is mounted, the secure zone device object is loaded into the free drive letter of the secure zone through the system interface of the terminal, and according to the permissions of the mobile storage device, a method for the file driver to open the disk corresponding to the free drive letter of the secure zone is determined, and data transmission of reading and / or writing of sectors of the secure zone is performed according to the method.
[0114] (2) If the terminal environment is outside the enterprise,
[0115] (a) the swap area is not mounted;
[0116] (b) Using the security zone for data transmission based on control authority. The following is a further explanation of using an encrypted mobile storage device for data transmission through an example.
[0117] In one embodiment, data transmission using an encrypted USB flash drive may include the following steps:
[0118] (1) The user connects the encrypted USB flash drive to the terminal
[0119] (2) Determine whether the environment of the terminal to which the USB flash drive is connected is an internal enterprise environment or an external enterprise environment.
[0120] In one embodiment, it can be determined as follows:
[0121] Determine whether the server ID of the U disk is the same as the server ID of the terminal where the U disk is located. If they are the same, it means that the encrypted U disk is in the internal environment of the enterprise and the swap area can be automatically mounted, which is convenient for users to read and write swap area data. If they are not equal or the server ID does not exist in the terminal environment, it means that the encrypted U disk is in the external environment of the enterprise and the swap area will not be mounted.
[0122] (3) Enterprise internal environment mount exchange area
[0123] Assume that the disk number is 3 and the free drive letter E is the swap drive letter, then
[0124] Through the system interface
[0125] DefineDosDevice
[0126] Mount "\\Device\\QCMEncDisk\\PublicPartion3" to drive E.
[0127] The file driver opens the disk device object with read and write permissions. The user's file read and write operations on the area are ultimately performed by the file driver through the disk device object to implement sector read and write operations on the disk.
[0128] (4) After the user successfully logs in and launches the executable file in the startup area, mount the secure area
[0129] Assume that the disk number is 3 and the free drive letter F is the safe zone drive letter, then
[0130] Through the system interface
[0131] DefineDosDevice
[0132] Mount "\\Device\\QCMEncDisk\\SafePartion3" to drive F.
[0133] If the permission of the encrypted USB disk is read-only, the file driver opens the disk device object with read-only permission. Then the user can only read the security zone sector data through the disk device object with read-only permission because the file driver can only read the security zone sector data through the disk device object with read-only permission.
[0134] If the permissions of the encrypted USB flash drive are read-write permissions, the file driver opens the disk device object with read-write permissions. Then the user can read and write the security zone sector data through the disk device object with read-write permissions because the file driver can read and write the security zone sector data through the disk device object with read-write permissions.
[0135] Reference Figure 4 The present invention also discloses a structural block diagram of a data transmission device, including:
[0136] The terminal environment confirmation module 40 is used to confirm the terminal environment where the mobile storage device is located when the mobile storage device obtained by the above encryption method is connected to the terminal;
[0137] The transmission method confirmation module 42 is used to determine the data transmission methods of the exchange area and the security area in the mobile storage device according to the terminal environment.
[0138] The above-mentioned data transmission device and the data transmission method of the present invention can be referred to each other, and will not be described in detail here.
[0139] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the encryption method of the mobile storage device, and the method includes:
[0140] When the mobile storage device is connected to the terminal, the sizes of the exchange area and the security area are set based on the available storage space of the mobile storage device;
[0141] Determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the exchange area, and determine that the second free drive letter identifies the security area;
[0142] Mounting the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mounting the secure area device object in the terminal kernel to the secure area identified by the second free drive letter; wherein the swap area device object and the secure area device object are pre-created in the kernel of the terminal;
[0143] Formatting the exchange area and the security area; wherein, when formatting the security area, the process also includes encrypting the security area.
[0144] In addition, the processor 510 may also call the logic instructions in the memory 530 to execute the data transmission method, which includes:
[0145] When the mobile storage device obtained by the encryption method described above is connected to a terminal, confirming the terminal environment where the mobile storage device is located;
[0146] According to the terminal environment, data transmission methods of the exchange area and the security area in the mobile storage device are determined respectively.
[0147] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0148] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, and when the computer program is executed by a processor, the method for encrypting a mobile storage device is executed, the method comprising:
[0149] When the mobile storage device is connected to the terminal, the sizes of the exchange area and the security area are set based on the available storage space of the mobile storage device;
[0150] Determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the exchange area, and determine that the second free drive letter identifies the security area;
[0151] Mounting the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mounting the secure area device object in the terminal kernel to the secure area identified by the second free drive letter; wherein the swap area device object and the secure area device object are pre-created in the kernel of the terminal;
[0152] Formatting the exchange area and the security area; wherein, when formatting the security area, the process also includes encrypting the security area.
[0153] Furthermore, when the computer program is executed by a processor, the computer program performs a data transmission method, the method comprising:
[0154] When the mobile storage device obtained by the encryption method described above is connected to a terminal, confirming the terminal environment where the mobile storage device is located;
[0155] According to the terminal environment, data transmission methods of the exchange area and the security area in the mobile storage device are determined respectively.
[0156] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon for executing an encryption method for a mobile storage device, the method comprising:
[0157] When the mobile storage device is connected to the terminal, the sizes of the exchange area and the security area are set based on the available storage space of the mobile storage device;
[0158] Determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the exchange area, and determine that the second free drive letter identifies the security area;
[0159] Mounting the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mounting the secure area device object in the terminal kernel to the secure area identified by the second free drive letter; wherein the swap area device object and the secure area device object are pre-created in the kernel of the terminal;
[0160] Formatting the exchange area and the security area; wherein, when formatting the security area, the process also includes encrypting the security area.
[0161] On the other hand, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, and further configured to execute a data transmission method, the method comprising:
[0162] When the mobile storage device obtained by the encryption method described above is connected to a terminal, confirming the terminal environment where the mobile storage device is located;
[0163] According to the terminal environment, data transmission methods of the exchange area and the security area in the mobile storage device are determined respectively.
[0164] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for encrypting a mobile storage device, characterized in that: include: When the mobile storage device is connected to the terminal, the sizes of the exchange area and the security area are set based on the available storage space of the mobile storage device; Determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the exchange area, and determine that the second free drive letter identifies the security area; Mounting the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and mounting the secure area device object in the terminal kernel to the secure area identified by the second free drive letter; wherein the swap area device object and the secure area device object are pre-created in the kernel of the terminal; encrypting the security zone; The swap area is used to store files that can flow freely in the internal environment, and files that are not mounted in the external environment and can be used in the internal environment without authentication; when a user uses a mobile storage device in the internal environment, the swap area can be used as long as the access terminal does not require authentication; The security zone is used to store files that can be circulated in the internal environment only after login authentication, and to store files that are circulated in the external environment based on management and control permissions.
2. The encryption method for a mobile storage device according to claim 1, characterized in that: Before encrypting the security zone, the method further includes: Formatting the swap area and the secure area; Furthermore, after formatting the security area, a step of encrypting the security area is performed.
3. The encryption method for a mobile storage device according to claim 1 or 2, characterized in that: The setting of the sizes of the swap area and the security area based on the available storage space of the mobile storage device comprises: Setting a ratio parameter between the exchange area and the safety area; The sizes of the swap area and the secure area are set in the available storage space according to the ratio parameter.
4. The encryption method for a mobile storage device according to claim 3, characterized in that: The setting the sizes of the swap area and the security area in the available storage space according to the ratio parameter comprises: A startup area is set in the available storage space of the mobile storage device, wherein an executable file is set in the startup area, and the security area and the swap area are accessed by running the executable file; The remaining storage space of the mobile storage device is divided into a swap area and a security area according to the ratio parameter.
5. The encryption method of the mobile storage device according to claim 2, characterized in that: The formatting of the swap area and the secure area is as follows: The exchange area and the security area are formatted through the terminal formatting interface. The formatting includes performing read and write operations on the sectors of the mobile storage device through a file driver and encrypting the data of the read and write operations.
6. The encryption method for a mobile storage device according to claim 1, characterized in that: The swap area device object and the secure area device object are created in the terminal kernel through a file driver loaded by the terminal.
7. A data transmission method, characterized in that: include: When the mobile storage device obtained by the encryption method according to claims 1 to 6 is connected to a terminal, confirming the terminal environment where the mobile storage device is located; According to the terminal environment, data transmission methods of the exchange area and the security area in the mobile storage device are determined respectively.
8. The data transmission method according to claim 7, characterized in that: The method for respectively determining the data transmission of the exchange area and the security area in the mobile storage device according to the terminal environment further comprises: A startup area is set in the available storage space of the mobile storage device, wherein an executable file is set in the startup area, and the security area and the swap area are accessed by running the executable file; Based on the access to the security area and the exchange area, data transmission is performed.
9. The data transmission method according to claim 8, characterized in that: The step of accessing the security area and the swap area by running the executable file further comprises: Perform security authentication on executable files in the startup area; When the executable file passes the security authentication, the security area and the swap area are accessed by running the executable file.
10. The data transmission method according to claim 9, characterized in that: The data transmission based on the access to the security area and the exchange area includes: If the terminal environment is within the enterprise: Loading the swap area device object to the free drive letter of the swap area through the system interface of the terminal, and the file driver opens the swap area device object with read and write permissions to perform sector read and write operations; and After the security zone is mounted, the security zone device object is loaded into the security zone through the system interface of the terminal, and the way in which the file driver opens the security zone is determined according to the permissions of the mobile storage device, and data transmission is performed on the sectors of the security zone for reading and / or writing according to the way.
11. The data transmission method according to claim 10, characterized in that: The method for respectively determining the data transmission of the exchange area and the security area in the mobile storage device according to the terminal environment includes: If the terminal environment is outside the enterprise, the swap area is not mounted; And, use security zones for data transmission based on control permissions.
12. An encryption device for a mobile storage device, characterized in that: include: A swap area and security area size setting module, used to set the sizes of the swap area and security area based on the available storage space of the mobile storage device when the mobile storage device is connected to the terminal; a swap area and security area drive letter determination module, configured to determine a first free drive letter and a second free drive letter available to the terminal, and determine that the first free drive letter identifies the swap area, and determine that the second free drive letter identifies the security area; A swap area and security area device object mounting module, used to mount the swap area device object in the terminal kernel to the swap area identified by the first free drive letter, and to mount the security area device object in the terminal kernel to the security area identified by the second free drive letter; wherein the swap area device object and the security area device object are pre-created in the kernel of the terminal; An encryption module, used for encrypting the security zone; The swap area is used to store files that can flow freely in the internal environment, and files that are not mounted in the external environment and can be used in the internal environment without authentication; when a user uses a mobile storage device in the internal environment, the swap area can be used as long as the access terminal does not require authentication; The security zone is used to store files that can be circulated in the internal environment only after login authentication, and to store files that are circulated in the external environment based on management and control permissions.
13. A data transmission device, characterized in that: include: A terminal environment confirmation module, used to confirm the terminal environment where the mobile storage device is located when the mobile storage device obtained by the encryption method according to claims 1 to 6 is connected to the terminal; The transmission method confirmation module is used to determine the data transmission methods of the exchange area and the security area in the mobile storage device according to the terminal environment.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the encryption method for the mobile storage device according to any one of claims 1 to 6 are implemented, or, when the processor executes the program, the steps of the data transmission method according to any one of claims 7 to 11 are implemented.
15. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the steps of the encryption method for the mobile storage device as described in any one of claims 1 to 6 are implemented, or when the processor executes the program, the steps of the data transmission method as described in any one of claims 7 to 11 are implemented.
16. A computer program product comprising a computer program, characterized in that When the computer program is executed by the processor, the steps of the encryption method for the mobile storage device as described in any one of claims 1 to 6 are implemented, or when the processor executes the program, the steps of the data transmission method as described in any one of claims 7 to 11 are implemented.
