CN114186260A - Memory card encryption method and device, electronic equipment and computer readable storage medium - Google Patents

Memory card encryption method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114186260A
CN114186260A CN202111529870.4A CN202111529870A CN114186260A CN 114186260 A CN114186260 A CN 114186260A CN 202111529870 A CN202111529870 A CN 202111529870A CN 114186260 A CN114186260 A CN 114186260A
Authority
CN
China
Prior art keywords
encryption
memory card
component
encrypted
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111529870.4A
Other languages
Chinese (zh)
Inventor
闫丽娜
徐勇华
鲁泉峰
郭利平
杨策
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Communication Technology Chengdu Ltd
Original Assignee
TCL Communication Technology Chengdu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TCL Communication Technology Chengdu Ltd filed Critical TCL Communication Technology Chengdu Ltd
Priority to CN202111529870.4A priority Critical patent/CN114186260A/en
Publication of CN114186260A publication Critical patent/CN114186260A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/78Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
    • G06F21/79Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the invention discloses a memory card encryption method, a memory card encryption device, electronic equipment and a computer readable storage medium; when an encryption request for a memory card is received, an encryption interface is called, then an encryption component is mounted to the memory card based on the encryption interface, and the memory card is encrypted through the encryption component; the scheme can improve the security of data storage in the memory card.

Description

Memory card encryption method and device, electronic equipment and computer readable storage medium
Technical Field
The invention relates to the technical field of communication, in particular to a memory card encryption method and device, electronic equipment and a computer readable storage medium.
Background
In recent years, with the rapid development of internet technology, more and more data are required to be stored. Under the limited memory of electronic equipment, a memory card (Sdcard) is widely used for various electronic equipment to store data as an external storage medium due to the limited characteristics of small volume, high data transmission speed, hot-pluggable property and the like. Nowadays, users pay more and more attention to the security of stored data, due to the characteristics of small size and the like of a memory card, the memory card is easy to lose in the plugging and unplugging process, and the stored data is leaked after the memory card is lost, so that the security of data storage in the memory card is low.
Disclosure of Invention
The embodiment of the invention provides a memory card encryption method, a memory card encryption device and a computer readable storage medium, which can improve the security of data storage in a memory card.
A memory card encryption method, comprising:
calling an encryption interface when receiving an encryption request for a memory card;
mounting an encryption component to the memory card based on the encryption interface;
encrypting the memory card by the encryption component.
Correspondingly, an embodiment of the present invention provides a memory card encryption apparatus, including:
a calling unit for calling the encryption interface when receiving an encryption request for the memory card;
the mounting unit is used for mounting the encryption component to the memory card based on the encryption interface;
and the encryption unit is used for encrypting the memory card through the encryption component.
Optionally, in some embodiments, the encryption unit may be specifically configured to detect a plug-in event of the memory card through a daemon process; and when the plugging event is detected, encrypting the memory card through the encryption component.
Optionally, in some embodiments, the encryption unit may be specifically configured to construct an encryption area in the memory card through the encryption component; traversing the storage data in the storage card, and adding the traversed storage data to the encryption area to obtain the encrypted storage card.
Optionally, in some embodiments, the memory card encryption apparatus may further include a decryption unit, where the decryption unit is specifically configured to mount the encrypted memory card to a current terminal through the daemon process when a target plug-in event of the encrypted memory card is detected; and decrypting the encrypted memory card according to the current terminal identification of the current terminal so as to read target storage data in the encrypted memory card.
Optionally, in some embodiments, the decryption unit may be specifically configured to identify, in the encrypted memory card, a target terminal identifier corresponding to the encrypted component; when the current terminal identification is the same as the target terminal identification, decrypting the stored data in the encrypted memory card through the encryption component; and when a data reading request is received, reading target storage data corresponding to the data reading request in the decrypted storage card.
Optionally, in some embodiments, the mount unit may be specifically configured to obtain encryption configuration information corresponding to a basic encryption component and a target terminal identifier, where the target terminal identifier is an identifier of a terminal that currently mounts the memory card; adding the basic encryption component and encryption configuration information to the memory card through the encryption interface; and configuring a basic encryption component in the memory card based on the encryption configuration information to obtain an encryption component corresponding to the target terminal identifier.
Optionally, in some embodiments, the invoking unit may be specifically configured to invoke an intermediate encryption interface, and start the memory card encryption service through the intermediate encryption interface; and calling an encryption interface in a daemon process based on the memory card encryption service.
In addition, an embodiment of the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the memory card encryption method provided in the embodiment of the present invention.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, where multiple instructions are stored, and the instructions are suitable for being loaded by a processor to perform the steps in any one of the memory card encryption methods provided in the embodiment of the present invention.
When an encryption request for a memory card is received, an encryption interface is called, then an encryption component is mounted to the memory card based on the encryption interface, and the memory card is encrypted through the encryption component; because this scheme can be with encrypting the subassembly carry to the storage card to encrypt through this encrypting the data of subassembly in to the storage card, thereby guarantee can not reveal the data of storage after the storage card loses, consequently, can promote the security of data storage in the storage card.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scene of a memory card encryption method according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a memory card encryption method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of different terminals reading data stored in an encrypted memory card according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an encryption process of a memory card according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a memory card encryption device according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another structure of the memory card encryption apparatus according to the embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a memory card encryption method, a memory card encryption device, electronic equipment and a computer readable storage medium. The memory card encryption device can be integrated in an electronic device, and the electronic device can be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, security service, Network acceleration service (CDN), big data and an artificial intelligence platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
For example, referring to fig. 1, taking an example that the memory card encryption device is integrated in the electronic device, when receiving an encryption request for the memory card, the electronic device calls the encryption interface, then mounts the encryption component to the memory card based on the encryption interface, and encrypts the memory card through the encryption component, thereby improving the security of data stored in the memory card.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The embodiment will be described from the perspective of a memory card encryption device, which may be specifically integrated in an electronic device, where the electronic device may be a server or a terminal; the terminal may include a tablet Computer, a notebook Computer, a Personal Computer (PC), a wearable device, a virtual reality device, or other smart devices that can encrypt a memory card.
A memory card encryption method, comprising:
when an encryption request for the memory card is received, an encryption interface is called, an encryption component is mounted to the memory card based on the encryption interface, and the memory card is encrypted through the encryption component.
As shown in fig. 2, the specific flow of the memory card encryption method is as follows:
101. when an encryption request for the memory card is received, an encryption interface is invoked.
The memory card (Sdcard) is a separate storage medium on the consumer electronic device, usually in the form of a card, has pluggable capability, and can be installed on different electronic devices.
The encryption request is used for encrypting the storage data in the storage card, so that the storage card is encrypted. The encryption request can be generated by a user triggering an encryption Application (Application) at a terminal or a client, the triggering mode can be various, for example, a memory card encryption page can be displayed at the terminal or the client, the memory card encryption page can include an encryption control, the user generates the encryption request by triggering the encryption control, or before the memory card encryption page is displayed, a memory card encryption configuration page can be displayed, the user inputs configuration parameters through a configuration parameter input control, and thus the memory card encryption is configured, for example, configuration information such as an encryption password, password prompt information, a terminal identifier associated with the password, encryption time or encryption frequency and the like can be configured.
The encryption interface is an interface inplace exttcrypto used for executing encryption operation in a Daemon process (volme Daemon, Vold). The encryption interface user mounts the encryption component to the memory card. The encryption interface may be called in various ways, which may specifically be as follows:
for example, when an encryption request that results in an encryption for the memory card is received, the intermediate encryption interface is called, and the memory card encryption service is started through the intermediate encryption interface, the encryption interface in the daemon is called based on the memory card encryption service.
The intermediate encryption interface may be an encryption function triggered interface (an interface for a user to trigger an encryption function) encapsulated in a system service of an Android Framework layer. The method for calling the intermediate encryption interface may be various, for example, the encryption request is sent to the Android Framework service, an interface for triggering the encryption function by the user is encapsulated and identified in the Android Framework service, the interface is used as the intermediate encryption interface, and the intermediate encryption interface is called.
The Android Framework service is mainly used as a bridge connection function in an APP layer and a Vold layer, encryption function is triggered by calling an upper encapsulation interface encryption () by an upper layer, and encryption operation is executed on an interface infilaceextcrypto of a lower calling Vold.
The memory card encryption service can be understood as a service for a user to start a daemon process, the service is mainly used for encrypting the memory card, and various ways for calling an encryption interface in the daemon process can be provided based on the memory card encryption service, for example, the daemon process is started based on the memory card encryption service, an interface inplaceextrcypto is called in the daemon process, and the interface inplace extcrypto is used as the encryption interface.
102. And mounting the encryption component to the memory card based on the encryption interface.
The encryption component can be an encryption file system used for encrypting data in the terminal, and the main function is to copy files and folders of the memory card into the encryption file system, so that the aim of encrypting the memory card is fulfilled.
Based on the encryption interface, the way of mounting the encryption component to the memory card may be various, and specifically may be as follows:
for example, encryption configuration information corresponding to the basic encryption component and the target terminal identifier is obtained, the basic encryption component and the encryption configuration information are added to the memory card through the encryption interface, and the basic encryption component is configured in the memory card based on the encryption configuration information to obtain the encryption component corresponding to the target terminal identifier.
The target terminal identifier is an identifier of a terminal currently mounted with the memory card, the encryption configuration information may be information configured to encrypt the memory card, and the configured information may be various, for example, may include an encryption mode, a password, an encryption format of data stored in the memory card, an encryption time, an encryption area position, and the like. The encryption configuration information may be preset in the terminal according to the target terminal identifier, and may also be generated by configuring the user through a memory card encryption configuration page.
Wherein, the basic encryption component can be understood as an encryption component framework which is not configured yet, or can also be an encryption component configured in history. Therefore, there are various ways to configure the basic encryption component by the encryption configuration information, for example, the encryption parameter may be extracted from the encryption configuration information, the adding position corresponding to each encryption parameter is identified in the basic encryption component, the encryption parameter is added to the basic encryption component according to the adding position to obtain the encryption component corresponding to the target terminal identifier, or the historical encryption parameter may be identified in the basic encryption component by extracting the target encryption parameter from the encryption configuration information, and the historical encryption parameter is replaced by the target encryption parameter to obtain the encryption component corresponding to the target terminal identifier.
103. The memory card is encrypted by the encryption component.
For example, a plug-in event of the memory card may be checked by the daemon process, and when the plug-in event is detected, the memory card is encrypted by the encryption component.
The daemon process can be a Volume daemon process for managing and controlling plug event detection of the memory card, mounting of the memory card, uninstalling of the Sdcard and formatting of the Sdcard. By a unplugging and plugging event is understood event information generated by unplugging or plugging in of the memory card in the terminal,
the method for detecting the plugging event of the memory card may be various, for example, the memory card may be monitored through a daemon process, so as to detect the plugging event, or real-time data sent by the memory card may be received, and the plugging event is detected according to the real-time data.
When a plug-in event is detected, it is indicated that the memory card has a possibility of replacing the mount terminal, at this time, the memory card needs to be encrypted by the encryption component, and the encryption mode may be various, for example, an encryption area is constructed in the memory card by the encryption component, stored data in the memory card is traversed, and the traversed stored data is added to the encryption area, so as to obtain the encrypted memory card.
The encryption module may be configured to build an encryption area in the memory card, for example, a storage area of a preset memory may be identified in the memory card, the storage area is encrypted by the encryption module, and the encrypted storage area is used as the encryption area.
Optionally, after the traversed storage data is added to the encryption area to obtain the encrypted storage card, the plug-in event of the storage card may be continuously detected, when the target plug-in event of the encrypted storage card is detected, the encrypted storage card may be decrypted, and the storage data therein may be read, where the decryption manner may be various, for example, when the target plug-in event of the encrypted storage card is detected, the encrypted storage card is mounted to the current terminal through a daemon process, and the encrypted storage card is decrypted according to the current identifier of the current terminal, so as to read the target pure color data in the encrypted storage card.
For example, a target terminal identifier corresponding to the encryption component is identified in the encrypted memory card, when the target terminal identifier is the same as the current terminal identifier, the stored data in the encrypted memory card is decrypted by the encryption component, and when a data reading request is read, the target stored data corresponding to the data reading request is read in the decrypted memory card.
When the target terminal identification is the same as the current terminal identification, it is indicated that the current terminal mounted at the moment is the terminal encrypting the memory card, at the moment, the stored data in the encrypted memory card can be decrypted through the encryption component, and the decryption mode can be various, for example, the stored data in the encrypted area is moved to the unencrypted area in the memory card, or when the stored data in the encrypted area is still in the encrypted state, the stored data can be decrypted first and the decrypted stored data is moved to the unencrypted area of the memory card, so that the decrypted memory card is obtained, or the type of the encryption component can be obtained, the decryption mode is determined according to the type of the encryption component, and the encrypted memory card is decrypted based on the decryption mode, so that the decrypted memory card is obtained.
Optionally, when the target terminal identifier is different from the current terminal identifier, it is indicated that the current terminal mounted at this time is not a terminal for encrypting the memory card, and therefore, the encryption component cannot be started to decrypt the encrypted memory card, so that the security of the stored data in the memory card can be protected. The terminal for encrypting the memory card is taken as a terminal a, the encrypted text file can be opened in the terminal a, but cannot be correctly opened in the terminal B, and specifically, as shown in fig. 3, the purpose of encryption is achieved.
The process of encrypting the memory card can be as shown in fig. 4, the memory card is encrypted by three modules, one of the modules is a StorageManagerService module, the module is a system service of an Android frame layer and mainly plays a role in bridge connection of an app layer and a Vold layer, encryption function is triggered by calling an upper encapsulation interface encryption () by an upper layer, and encryption operation is executed on an interface infixextcrypt of a lower invocation Vold. And the second module is a Vold module and is mainly used for managing and controlling the functions of plug event detection of the Sdcard, mounting of the Sdcard, uninstalling of the Sdcard, Sdcard formatting and the like. And the third module is a CryptfsExt module and an SdcCardEncryptInplace module, and the third module is mainly used for mounting an encrypted file system, traversing the Sdcard file and copying the Sdcard file into the encrypted file system.
As can be seen from the above, in the embodiment of the present application, when an encryption request for a memory card is received, an encryption interface is called, then, based on the encryption interface, an encryption component is mounted to the memory card, and the memory card is encrypted by the encryption component; because this scheme can be with encrypting the subassembly carry to the storage card to encrypt through this encrypting the data of subassembly in to the storage card, thereby guarantee can not reveal the data of storage after the storage card loses, consequently, can promote the security of data storage in the storage card.
In order to better implement the above method, the embodiment of the present invention further provides a memory card encryption apparatus, which may be integrated in an electronic device, such as a server or a terminal, and the terminal may include a tablet computer, a notebook computer, and/or a personal computer.
For example, as shown in fig. 5, the memory card encryption apparatus may include a calling unit 201, a mounting unit 202, and an encryption unit 203, as follows:
(1) a scheduling unit 201;
a calling unit 201, configured to call the encryption interface when receiving an encryption request for the memory card.
For example, the invoking unit 201 may be specifically configured to, when receiving an encryption request that results in an encryption request for the memory card, invoke an intermediate encryption interface, start a memory card encryption service through the intermediate encryption interface, and invoke an encryption interface in a daemon process based on the memory card encryption service.
(2) A mounting unit 202;
a mounting unit 202, configured to mount the encrypted component to the memory card based on the encrypted interface.
For example, the mounting unit 202 may be specifically configured to obtain encryption configuration information corresponding to the basic encryption component and the target terminal identifier, add the basic encryption component and the encryption configuration information to the memory card through the encryption interface, and configure the basic encryption component in the memory card based on the encryption configuration information to obtain the encryption component corresponding to the target terminal identifier.
(3) An encryption unit 203;
an encryption unit 203, configured to encrypt the memory card through an encryption component.
For example, the encryption unit 203 may be specifically configured to monitor the memory card through a daemon process, so as to detect the plugging event, or may further receive real-time data sent by the memory card, and detect the plugging event according to the real-time data. And constructing an encryption area in the memory card through the encryption component, traversing the storage data in the memory card, and adding the traversed storage data to the encryption area to obtain the encrypted memory card.
Optionally, the memory card encryption apparatus may further include a decryption unit 204, as shown in fig. 6, which may specifically be as follows:
and the decryption unit 204 is configured to decrypt the encrypted memory card to read target storage data in the encrypted memory card.
For example, the decryption unit 204 may be specifically configured to mount the encrypted memory card to the current terminal through a daemon process when a target plug-in event of the encrypted memory card is detected, and decrypt the encrypted memory card according to the current terminal identifier of the current terminal, so as to read target storage data in the encrypted memory card.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in this embodiment, when an encryption request for a memory card is received, an encryption interface is called, then, based on the encryption interface, an encryption component is mounted to the memory card, and the memory card is encrypted by the encryption component; because this scheme can be with encrypting the subassembly carry to the storage card to encrypt through this encrypting the data of subassembly in to the storage card, thereby guarantee can not reveal the data of storage after the storage card loses, consequently, can promote the security of data storage in the storage card.
An embodiment of the present invention further provides an electronic device, as shown in fig. 7, which shows a schematic structural diagram of the electronic device according to the embodiment of the present invention, specifically:
the electronic device may include components such as a processor 301 of one or more processing cores, memory 302 of one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 7 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 301 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 302 and calling data stored in the memory 302, thereby performing overall monitoring of the electronic device. Optionally, processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 301.
The memory 302 may be used to store software programs and modules, and the processor 301 executes various functional applications and data processing by operating the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
The electronic device further comprises a power supply 303 for supplying power to the various components, and preferably, the power supply 303 may be logically connected to the processor 301 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 303 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 304, and the input unit 304 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable file corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing various functions as follows:
when an encryption request for the memory card is received, an encryption interface is called, an encryption component is mounted to the memory card based on the encryption interface, and the memory card is encrypted through the encryption component.
For example, when an encryption request that results in an encryption for the memory card is received, the intermediate encryption interface is called, and the memory card encryption service is started through the intermediate encryption interface, the encryption interface in the daemon is called based on the memory card encryption service. Acquiring encryption configuration information corresponding to the basic encryption component and the target terminal identification, adding the basic encryption component and the encryption configuration information to the memory card through the encryption interface, and configuring the basic encryption component in the memory card based on the encryption configuration information to obtain the encryption component corresponding to the target terminal identification. The memory card is monitored through the daemon process, so that the plugging and unplugging events are detected, or real-time data sent by the memory card can be received, and the plugging and unplugging events are detected according to the real-time data. And constructing an encryption area in the memory card through the encryption component, traversing the storage data in the memory card, and adding the traversed storage data to the encryption area to obtain the encrypted memory card. When a target plugging event of the encrypted memory card is detected, the encrypted memory card is mounted to the current terminal through the daemon process, and the encrypted memory card is decrypted according to the current terminal identification of the current terminal so as to read target storage data in the encrypted memory card.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
As can be seen from the above, in the embodiment of the present invention, when an encryption request for a memory card is received, an encryption interface is called, then, based on the encryption interface, an encryption component is mounted to the memory card, and the memory card is encrypted by the encryption component; because this scheme can be with encrypting the subassembly carry to the storage card to encrypt through this encrypting the data of subassembly in to the storage card, thereby guarantee can not reveal the data of storage after the storage card loses, consequently, can promote the security of data storage in the storage card.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the embodiment of the present invention provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the memory card encryption methods provided by the embodiment of the present invention. For example, the instructions may perform the steps of:
when an encryption request for the memory card is received, an encryption interface is called, an encryption component is mounted to the memory card based on the encryption interface, and the memory card is encrypted through the encryption component.
For example, when an encryption request that results in an encryption for the memory card is received, the intermediate encryption interface is called, and the memory card encryption service is started through the intermediate encryption interface, the encryption interface in the daemon is called based on the memory card encryption service. Acquiring encryption configuration information corresponding to the basic encryption component and the target terminal identification, adding the basic encryption component and the encryption configuration information to the memory card through the encryption interface, and configuring the basic encryption component in the memory card based on the encryption configuration information to obtain the encryption component corresponding to the target terminal identification. The memory card is monitored through the daemon process, so that the plugging and unplugging events are detected, or real-time data sent by the memory card can be received, and the plugging and unplugging events are detected according to the real-time data. And constructing an encryption area in the memory card through the encryption component, traversing the storage data in the memory card, and adding the traversed storage data to the encryption area to obtain the encrypted memory card. When a target plugging event of the encrypted memory card is detected, the encrypted memory card is mounted to the current terminal through the daemon process, and the encrypted memory card is decrypted according to the current terminal identification of the current terminal so as to read target storage data in the encrypted memory card.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any memory card encryption method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any memory card encryption method provided in the embodiments of the present invention can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
According to an aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the electronic device to perform the methods provided in the various alternative implementations of the memory card encryption aspect or the Sdcard encryption aspect described above.
The memory card encryption method, the memory card encryption device, the electronic device and the computer-readable storage medium according to the embodiments of the present invention are described in detail, and a specific example is applied to illustrate the principle and the implementation of the present invention, and the description of the embodiments is only used to help understanding the method and the core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A memory card encryption method, comprising:
calling an encryption interface when receiving an encryption request for a memory card;
mounting an encryption component to the memory card based on the encryption interface;
encrypting the memory card by the encryption component.
2. The memory card encryption method of claim 1, wherein said encrypting the memory card by the encryption component comprises:
detecting the plugging and unplugging event of the memory card through a daemon process;
and when the plugging event is detected, encrypting the memory card through the encryption component.
3. The memory card encryption method of claim 2, wherein said encrypting the memory card by the encryption component comprises:
constructing an encryption area in the memory card by the encryption component;
traversing the storage data in the storage card, and adding the traversed storage data to the encryption area to obtain the encrypted storage card.
4. The memory card encryption method of claim 3, wherein after adding the traversed memory data to the encryption area to obtain the encrypted memory card, further comprising:
when a target plugging event of the encrypted memory card is detected, mounting the encrypted memory card to a current terminal through the daemon process;
and decrypting the encrypted memory card according to the current terminal identification of the current terminal so as to read target storage data in the encrypted memory card.
5. The memory card encryption method according to claim 4, wherein the decrypting the encrypted memory card according to the current terminal identifier of the current terminal to read the target storage data in the encrypted memory card comprises:
identifying a target terminal identification corresponding to the encrypted component in the encrypted memory card;
when the current terminal identification is the same as the target terminal identification, decrypting the stored data in the encrypted memory card through the encryption component;
and when a data reading request is received, reading target storage data corresponding to the data reading request in the decrypted storage card.
6. The memory card encryption method according to any one of claims 1 to 5, wherein the mounting of the encryption component to the memory card based on the encryption interface includes:
acquiring encryption configuration information corresponding to a basic encryption component and a target terminal identifier, wherein the target terminal identifier is the identifier of a terminal which is currently mounted with the memory card;
adding the basic encryption component and encryption configuration information to the memory card through the encryption interface;
and configuring a basic encryption component in the memory card based on the encryption configuration information to obtain an encryption component corresponding to the target terminal identifier.
7. The memory card encryption method of any one of claims 1 to 5, wherein the invoking an encryption interface comprises:
calling an intermediate encryption interface, and starting a memory card encryption service through the intermediate encryption interface;
and calling an encryption interface in a daemon process based on the memory card encryption service.
8. A memory card encryption apparatus, comprising:
a calling unit for calling the encryption interface when receiving an encryption request for the memory card;
the mounting unit is used for mounting the encryption component to the memory card based on the encryption interface;
and the encryption unit is used for encrypting the memory card through the encryption component.
9. An electronic device, comprising a processor and a memory, wherein the memory stores an application program, and the processor is configured to run the application program in the memory to execute the steps in the memory card encryption method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the memory card encryption method of any one of claims 1 to 7.
CN202111529870.4A 2021-12-14 2021-12-14 Memory card encryption method and device, electronic equipment and computer readable storage medium Pending CN114186260A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111529870.4A CN114186260A (en) 2021-12-14 2021-12-14 Memory card encryption method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111529870.4A CN114186260A (en) 2021-12-14 2021-12-14 Memory card encryption method and device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114186260A true CN114186260A (en) 2022-03-15

Family

ID=80605048

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111529870.4A Pending CN114186260A (en) 2021-12-14 2021-12-14 Memory card encryption method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114186260A (en)

Similar Documents

Publication Publication Date Title
US10073985B2 (en) Apparatus and method for trusted execution environment file protection
US9667703B1 (en) System, method and computer program product for generating remote views in a virtual mobile device platform
CA2901376C (en) Tracking application usage in a computing environment
US10346618B1 (en) Data encryption for virtual workspaces
CN111143869A (en) Application package processing method and device, electronic equipment and storage medium
CN111460516B (en) Non-invasive data protection method, device, terminal and storage medium
CN109995523B (en) Activation code management method and device and activation code generation method and device
CN113806777A (en) File access realization method and device, storage medium and electronic equipment
CN106778295B (en) File storage method, file display method, file storage device, file display device and terminal
CN111338641A (en) Application publishing method and device
EP3066604B1 (en) Data accessibility control
JP2015121835A (en) Log-in request device which issues log-in request to predetermined server, method, and program used therefor
CN112799925A (en) Data acquisition method and device, electronic equipment and readable storage medium
WO2015176359A1 (en) Android system-based multiuser management method, device, and computer storage medium
JP2015524128A (en) Network-based management of protected data sets
CN110619227A (en) Audit log management method, device, equipment and readable storage medium
CN114048506A (en) Application control method, device, equipment and storage medium
CN110851851B (en) Authority management method, device and equipment in block chain type account book
CN111666577A (en) Data decryption method, device, equipment and storage medium
CN114978649B (en) Information security protection method, device, equipment and medium based on big data
CN114186260A (en) Memory card encryption method and device, electronic equipment and computer readable storage medium
CN113613044B (en) Video playing method and device, storage medium and electronic equipment
CN115291973A (en) Method and device for connecting database by application on cloud, electronic equipment and storage medium
CN111292082B (en) Public key management method, device and equipment in block chain type account book
CN113434904A (en) Data processing method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination