CN114692175A - Encryption and decryption method, device, equipment, storage medium and computer program product - Google Patents

Encryption and decryption method, device, equipment, storage medium and computer program product Download PDF

Info

Publication number
CN114692175A
CN114692175A CN202011628005.0A CN202011628005A CN114692175A CN 114692175 A CN114692175 A CN 114692175A CN 202011628005 A CN202011628005 A CN 202011628005A CN 114692175 A CN114692175 A CN 114692175A
Authority
CN
China
Prior art keywords
encryption
decryption
information
communication module
soft
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
CN202011628005.0A
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.)
Chengdu TD Tech Ltd
Original Assignee
Chengdu TD Tech 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 Chengdu TD Tech Ltd filed Critical Chengdu TD Tech Ltd
Priority to CN202011628005.0A priority Critical patent/CN114692175A/en
Publication of CN114692175A publication Critical patent/CN114692175A/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

Landscapes

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

Abstract

The invention provides an encryption and decryption method, a device, equipment, a storage medium and a computer program product, which are applied to terminal equipment provided with a soft encryption and decryption application program, wherein the terminal equipment is provided with an encryption and decryption communication module and used for providing encryption and decryption services, and the method comprises the following steps: receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to an encryption and decryption communication module; packaging information to be encrypted and decrypted into a request message through an encryption and decryption communication module and sending the request message to a soft encryption and decryption application program; performing encryption and decryption operation on the request message through a soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to an encryption and decryption communication module; and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal. The embodiment of the invention can conveniently and effectively realize the encryption and decryption of the information, thereby improving the user experience.

Description

Encryption and decryption method, device, equipment, storage medium and computer program product
Technical Field
Embodiments of the present invention relate to the field of encryption and decryption technologies, and in particular, to an encryption and decryption method, apparatus, device, storage medium, and computer program product.
Background
Encryption techniques are often used to confirm the security (security) of information transfer. In encryption, a message (hereinafter, referred to as plaintext) is first encrypted at a transmitting end, and a message (hereinafter, referred to as ciphertext) is decrypted or decoded at a receiving end. Encryption or decryption of information such as this is a well-known encryption or decryption technique.
In the prior art, taking a mobile phone as an example, a hard encryption card scheme is generally adopted, and a hard encryption card is inserted into the mobile phone to realize encryption and decryption services through the hard encryption card; or a system middleware scheme is adopted to realize a set of soft encryption service at a frame (frame) layer (i.e. basic service is provided for the installed application program), and encryption service is realized through the encryption service. However, for the hard encryption card scheme, more and more mobile phones do not have a TF card slot and cannot support the hard encryption card scheme, and the hard encryption card needs to be replaced when the encryption algorithm is replaced, so that the deployment is complicated and the cost is high; aiming at the system middleware scheme, the system middleware mode strongly depends on a mobile phone system, the system needs to be upgraded for updating the algorithm, the upgrading time cost is high, and further, the resource waste is caused.
Therefore, in the prior art, information encryption and decryption cannot be conveniently and effectively realized, and user experience is further reduced.
Disclosure of Invention
Embodiments of the present invention provide an encryption and decryption method, apparatus, device, storage medium, and computer program product, which can conveniently and effectively implement encryption and decryption of information, thereby improving user experience.
In a first aspect, an embodiment of the present invention provides an encryption and decryption method, which is applied to a terminal device installed with a soft encryption and decryption application program, where the terminal device is configured with an encryption and decryption communication module, and the terminal device is configured to provide an encryption and decryption service, and the method includes:
receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module;
packaging the information to be encrypted and decrypted into a request message through the encryption and decryption communication module and sending the request message to the soft encryption and decryption application program;
performing encryption and decryption operation on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to the encryption and decryption communication module;
and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal.
In one possible design, the encryption and decryption communication module is configured with an encryption and decryption interface; before the receiving of the encryption/decryption service request sent by the target application, the method further includes:
responding to a trigger operation for starting an encryption and decryption service, and acquiring the encryption and decryption interface by loading the encryption and decryption communication module;
and detecting whether the soft encryption and decryption application program is installed, and if the soft encryption and decryption application program is installed, establishing a communication channel with the soft encryption and decryption application program through the encryption and decryption interface.
In a possible design, the sending, to the encryption and decryption communication module, information to be encrypted and decrypted in the encryption and decryption service request includes:
and sending the information to be encrypted and decrypted to the encryption and decryption communication module through the communication channel.
In a possible design, the encrypting and decrypting the request packet by the soft encryption and decryption application to obtain an encrypted and decrypted packet includes:
analyzing the request message through the soft encryption and decryption application program to obtain the information to be encrypted and decrypted;
and carrying out encryption and decryption operation on the information to be encrypted and decrypted through the soft encryption and decryption application program, and packaging the encryption and decryption information obtained by encryption and decryption to obtain an encryption and decryption message.
In one possible design, the sending the parsed encryption and decryption information to the target application includes:
and sending the encryption and decryption information to the target application through the communication channel.
In one possible design, the sending the encryption and decryption information to the target application through the communication channel includes:
receiving the encryption and decryption information sent by the encryption and decryption communication module through the callback interface;
and sending the received encryption and decryption information to the target application through the callback interface.
In a second aspect, an embodiment of the present invention provides an encryption and decryption apparatus, where the encryption and decryption apparatus is applied to a terminal device installed with a soft encryption and decryption application, the terminal device is configured with an encryption and decryption communication module, and the terminal device is configured to provide an encryption and decryption service, where the apparatus includes:
the first processing module is used for receiving an encryption and decryption service request sent by a target application and sending information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module;
the second processing module is used for packaging the information to be encrypted and decrypted into a request message through the encryption and decryption communication module and sending the request message to the soft encryption and decryption application program;
the encryption and decryption module is used for carrying out encryption and decryption operations on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to the encryption and decryption communication module;
and the third processing module analyzes the encryption and decryption message through the encryption and decryption communication module and sends the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal.
In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the computer-executable instructions stored by the memory causes the at least one processor to perform the encryption and decryption method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the encryption and decryption method according to any one of the first aspect is implemented.
In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program that, when executed by a processor, implements the encryption and decryption method according to any one of the first aspect.
The encryption and decryption method, device, equipment, storage medium and computer program product provided by the embodiment of the invention are applied to terminal equipment provided with a soft encryption and decryption application program, wherein the terminal equipment is provided with an encryption and decryption communication module and is used for providing encryption and decryption services. Firstly, receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to an encryption and decryption communication module; then, the information to be encrypted and decrypted is packaged into a request message through the encryption and decryption communication module and is sent to a soft encryption and decryption application program; then, the request message is encrypted and decrypted by the soft encryption and decryption application program to obtain an encryption and decryption message and sent to the encryption and decryption communication module; and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to the target terminal. Therefore, encryption service is provided for target application through installing the soft encryption and decryption application program and the encryption and decryption communication module, the encryption and decryption technology of the service is realized through transmission among the information, the encryption and decryption requirements of users are met, and only the soft encryption and decryption application program needs to be updated when the encryption and decryption algorithm is updated, the operating system of the terminal equipment does not need to be updated, meanwhile, the TF card slot does not need to be relied on, the encryption and decryption of the information can be conveniently and effectively realized, and further, the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of an encryption and decryption method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of an encryption and decryption method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a starting process of an encryption/decryption service according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an encryption/decryption method according to yet another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an encryption and decryption apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a terminal 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 terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Currently, two implementations are generally employed: a hard-encryption card scheme and a system middleware scheme. Taking a mobile phone as an example, aiming at a hard encryption card scheme, a hard encryption card is inserted into the mobile phone, and an encryption and decryption service is realized through the hard encryption card, however, aiming at the hard encryption card scheme, more and more mobile phones do not have TF card slots and cannot support the hard encryption card scheme, and the hard encryption card needs to be replaced when an encryption algorithm is replaced, so that the deployment is complicated and the cost is high; aiming at the scheme of the system middleware, a set of soft encryption service is realized on a frame (framework) layer (namely, basic service is provided for the installed application program), encryption service is realized through the encryption service, but the mode of the system middleware is solidified to an operating system, namely, the operating system is strongly dependent on a mobile phone system, the operating system needs to be upgraded for updating the algorithm, the upgrading time cost is high, the solving difficulty is high, and further, the resource waste is caused. Therefore, in the prior art, information encryption and decryption cannot be conveniently and effectively realized, and user experience is further reduced.
In order to solve the above problems, the technical idea of the present invention is to apply encryption/decryption to create an encryption service by using a soft encryption application and an encryption/decryption communication module, provide the encryption service to an APP (i.e. a target application) that needs an encryption/decryption service, then, the encryption and decryption communication module is used for establishing communication between the encryption and decryption service and the soft encryption and decryption application program, the encryption and decryption service transfers the encryption and decryption call to the soft encryption APP (namely the soft encryption and decryption application program), the soft encryption and decryption APP transfers the encryption and decryption result to the encryption and decryption service, the encryption and decryption service transfers the encryption and decryption result to the APP of the encryption and decryption service through a callback event, the encryption and decryption technology of the service is realized, the encryption and decryption requirements of users are met, and only the soft encryption and decryption application program needs to be updated when the encryption and decryption algorithm is updated, the operating system of the terminal equipment does not need to be updated, the encryption and decryption of information can be conveniently and effectively realized, and further the user experience is improved.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 1 is a scene schematic diagram of an encryption and decryption method according to an embodiment of the present invention, where an execution subject in the method according to the embodiment may be a terminal device, such as a terminal device of a smart phone, a tablet, a computer, and the like. The terminal equipment is provided with a soft encryption and decryption client, namely a soft encryption and decryption application program, and the terminal equipment is provided with an encryption and decryption communication module. The APP (encryption/decryption service APP or target application) which needs the encryption/decryption service is installed on the terminal device and runs on the terminal device.
In practical application, referring to fig. 1, the encryption and decryption service provided by the terminal device is applied to an android operating system, wherein the encryption and decryption service APP and the soft encryption and decryption APP are both on the APP layer, that is, on the application program layer running in the android operating system, the framework layer provides basic service for the installed APP, here, the encryption and decryption service can be provided, an encryption and decryption communication module is configured on a Native layer, and an encryption and decryption interface, a callback interface and the like are integrated in the encryption and decryption communication module. Encryption and decryption business APP sends the encryption and decryption service that waits to encrypt and decrypt information and provide in the frame layer, by encryption and decryption server will wait to encrypt and decrypt information and send the encryption and decryption communication module on Native layer, then utilize the communication channel (the Socket passageway promptly) that encryption and decryption interface established to transmit to soft encryption and decryption APP, soft encryption and decryption APP will wait to encrypt and decrypt information and carry out the encryption and decryption operation, then feed back the encryption and decryption result to encryption and decryption communication module, send to encryption and decryption server by encryption and decryption communication module, encryption and decryption server sends the encryption result to encryption and decryption business APP again, accomplish the encryption and decryption of information. Through above-mentioned encryption and decryption process, not only guaranteed the security of encryption and decryption, the secret APP of software updates easy operation moreover, and the update cost is low, need not to update operating system, and is convenient effective.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Referring to fig. 2, fig. 2 is a schematic flow chart of an encryption and decryption method according to an embodiment of the present invention. The encryption and decryption method is applied to terminal equipment, the terminal equipment is applied to an android operating system, a soft encryption and decryption application program is installed on the terminal equipment, and an encryption and decryption communication module is configured to provide encryption and decryption services for APP needing encryption and decryption services. The encryption and decryption method may include:
s101, receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module.
The target application may be any application program that needs an encryption/decryption service. When this target application was run on terminal equipment, can acquire the function of encryption and decryption service, be about to the service name configuration that is provided by android operating system, the manager information that this encryption and decryption service corresponds can be acquireed to target application like this, and then the interface that can call this encryption and decryption service, for example encryption and decryption interface realizes data communication, and then accomplishes the encryption and decryption task.
When the target application needs the encryption and decryption service, the encryption and decryption service request can be sent to the encryption and decryption server of the encryption and decryption service provided by the terminal equipment through the encryption and decryption interface, and then the information to be encrypted and decrypted in the encryption and decryption service request is sent to the encryption and decryption communication module through the encryption and decryption server. Taking the encryption service as an example, the target application sends the encryption/decryption service request to the encryption/decryption server of the encryption/decryption service provided by the terminal device through the encryption/decryption interface, and then the encryption/decryption server sends the information to be encrypted (i.e. plaintext) in the encryption/decryption service request to the encryption/decryption communication module.
And S102, packaging the information to be encrypted and decrypted into a request message through the encryption and decryption communication module, and sending the request message to the soft encryption and decryption application program.
In this embodiment, after the encryption and decryption communication module receives the information to be encrypted and decrypted, the encryption and decryption information is first encapsulated to generate a request message, then the request message is sent to the soft encryption and decryption APP through the configured encryption and decryption interface, and the soft encryption and decryption APP unpacks the request message to obtain the original data, that is, the information to be encrypted and decrypted.
S103, performing encryption and decryption operation on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to the encryption and decryption communication module.
In this embodiment, the soft encryption and decryption application program unpacks the request message and obtains information to be encrypted and decrypted, then the soft encryption and decryption application program encrypts and decrypts the information to be encrypted and decrypted, packages the encrypted information, generates an encryption and decryption message, and returns the encryption and decryption message to the encryption and decryption communication module.
S104, the encryption and decryption message is analyzed through the encryption and decryption communication module, and the analyzed encryption and decryption information is sent to the target application, so that the target application sends the encryption and decryption information to a target terminal.
In this embodiment, after receiving the encryption and decryption message, the encryption and decryption communication module analyzes the encryption and decryption message to obtain the encryption and decryption information. Taking the information to be encrypted and decrypted as the plaintext, the encrypted and decrypted information obtained by the analysis is the ciphertext. Then send this encryption and decryption information to encryption and decryption server through callback interface, by encryption and decryption server with encryption and decryption information return to encryption and decryption business APP, after this encryption and decryption business APP received encryption and decryption information, can send this encryption and decryption information to the target terminal, realize the encryption and decryption of information.
The encryption and decryption method provided by the embodiment of the invention is applied to the terminal equipment provided with the soft encryption and decryption application program, the terminal equipment is provided with the encryption and decryption communication module, and the terminal equipment is used for providing encryption and decryption services. Firstly, receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to an encryption and decryption communication module; then, the information to be encrypted and decrypted is packaged into a request message through the encryption and decryption communication module and is sent to a soft encryption and decryption application program; then, the request message is encrypted and decrypted by the soft encryption and decryption application program to obtain an encryption and decryption message and sent to the encryption and decryption communication module; and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to the target terminal. Therefore, encryption service is provided for target application through installing the soft encryption and decryption application program and the encryption and decryption communication module, the encryption and decryption technology of the service is realized through transmission among the information, the encryption and decryption requirements of users are met, and only the soft encryption and decryption application program needs to be updated when the encryption and decryption algorithm is updated, the operating system of the terminal equipment does not need to be updated, meanwhile, the TF card slot does not need to be relied on, the encryption and decryption of the information can be conveniently and effectively realized, and further, the user experience is improved.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a starting process of an encryption and decryption service according to an embodiment of the present invention. Before receiving an encryption/decryption service request sent by a target application, an encryption/decryption service needs to be started first, and then an encryption/decryption service APP is provided with the encryption/decryption service. Wherein, the encryption and decryption module is provided with an encryption and decryption interface. The encryption and decryption method can also be realized by the following steps:
step a1, responding to the trigger operation for starting the encryption and decryption service, and acquiring the encryption and decryption interface by loading the encryption and decryption communication module;
step a2, detecting whether the soft encryption and decryption application program is installed, if the soft encryption and decryption application program is installed, establishing a communication channel with the soft encryption and decryption application program through the encryption and decryption interface.
In this embodiment, when the terminal device starts to operate, an operating system service (system _ server) starts an encryption and decryption service, an encryption and decryption communication module is loaded first, after the loading is successful, whether a software encryption and decryption APP is installed in the terminal device is detected, if the software encryption and decryption APP is not installed, the starting fails, and the starting process is ended; if the encryption and decryption service is installed, a communication channel of the encryption and decryption service and a soft encryption and decryption card APP (namely the soft encryption and decryption APP) is established, the starting of the encryption and decryption service is completed, and the starting process is ended.
Through the communication channel of establishing terminal equipment and soft encryption and decryption APP, realize the information transmission between target application and the soft encryption and decryption APP, realize the encryption and decryption technique of business, satisfy user's encryption and decryption demand to only need update soft encryption and decryption application program when encryption and decryption algorithm updates can, need not to update terminal equipment's operating system, can realize the encryption and decryption of information conveniently effectively, and then improved user experience.
In a possible design, the present embodiment provides a detailed description of S101 on the basis of the above embodiments. The sending of the information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module can be realized by the following steps:
and sending the information to be encrypted and decrypted to the encryption and decryption communication module through the communication channel.
In this embodiment, the terminal device receives the service request to be encrypted and decrypted from the encryption and decryption service APP by using the established communication channel, and then transmits the information to be encrypted and decrypted in the service request to the encryption and decryption communication module through the communication channel, so that the encryption and decryption communication module encapsulates the information into the request message and sends the request message to the soft encryption and decryption APP through the communication channel, thereby implementing multi-terminal interaction.
In a possible design, the present embodiment provides a detailed description of S103 on the basis of the above embodiments. The encryption and decryption operation is performed on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message, and the encryption and decryption operation can be realized through the following steps:
step b1, analyzing the request message through the soft encryption and decryption application program to obtain the information to be encrypted and decrypted.
Step b2, performing encryption and decryption operation on the information to be encrypted and decrypted through the soft encryption and decryption application program, and packaging the encryption and decryption information obtained through encryption and decryption to obtain an encryption and decryption message.
In this embodiment, the soft encryption and decryption APP parses a received request message to obtain original data, that is, information to be encrypted and decrypted, then the soft encryption and decryption APP performs encryption and decryption operations on the information to be encrypted and decrypted to obtain an encryption result, that is, the encryption and decryption information, encapsulates the encryption result into a message to obtain an encryption and decryption message, and then the soft encryption and decryption APP sends the encryption and decryption message to the encryption and decryption communication module, the encryption and decryption server, and the encryption and decryption service APP in sequence through a communication channel. This encryption and decryption process easy operation, and realize easily, if encryption and decryption algorithm needs to be updated, only need update soft encryption and decryption APP can, need not to update terminal equipment's operating system.
In a possible design, the present embodiment provides a detailed description of S104 on the basis of the above embodiments. The sending of the analyzed encryption and decryption information to the target application can be realized by the following steps:
and sending the encryption and decryption information to the target application through the communication channel.
In this embodiment, after the encryption and decryption messages that soft encryption and decryption APP will encapsulate are sent to the encryption and decryption communication module, the encryption and decryption communication module parses the encryption and decryption messages to obtain the parsing result, that is, the encryption and decryption information, wherein, the terminal device can send the encryption and decryption information to the decryption server of the encryption terminal device through the established communication channel, and then the encryption and decryption server returns the encryption and decryption information to the encryption and decryption service APP to realize the encryption and decryption service.
In a possible design, on the basis of the foregoing embodiment, this embodiment describes in detail how to send the encryption/decryption information to the target application through the encryption communication channel. The method can be realized by the following steps:
and c1, receiving the encryption and decryption information sent by the encryption and decryption communication module through the callback interface.
And c2, sending the received encryption and decryption information to the target application through the callback interface.
And the encryption and decryption communication module is configured with a callback interface.
In this embodiment, the encryption and decryption communication module may be provided with a callback interface, and the callback interface is used to return data subjected to encryption and decryption operations. In addition, the same interface, namely an encryption and decryption interface, can be used for data return. Taking the configuration of the callback interface as an example, first, the encryption and decryption server of the terminal device may receive the encryption and decryption information sent by the encryption and decryption communication module through the callback interface, and then send the received encryption and decryption information to the target application through the callback interface.
Specifically, referring to fig. 4, fig. 4 is a schematic flowchart of an encryption and decryption method according to still another embodiment of the present invention. Firstly, when an encryption/decryption service APP has the encryption/decryption service requirement, the information to be encrypted/decrypted is sent to an encryption/decryption service (an encryption/decryption server or an encryption/decryption service layer) through an encryption/decryption interface, the encryption/decryption server sends the information to be encrypted/decrypted to an encryption/decryption communication module through the encryption/decryption interface, then the encryption/decryption communication module encapsulates the information to be encrypted/decrypted to a request message and sends the request message to a soft encryption/decryption card APP (namely, a soft encryption/decryption APP), the soft encryption/decryption APP unpacks the request message to obtain data (namely, the information to be encrypted/decrypted) and carries out encryption/decryption operation, then an encapsulation result (here, the result refers to an encryption/decryption result, namely, encryption/decryption information) is sent to a message (here, the message refers to the encryption/decryption communication module), the encryption/decryption communication module analyzes the result message and sends the encryption/decryption information to the encryption/decryption server through a callback interface, and the encryption and decryption server sends the encryption and decryption information to the encryption and decryption service APP through the callback interface to finish the encryption and decryption operation.
Therefore, the encryption service is created and provided for the APP needing the encryption and decryption service, when the encryption service is started, the encryption communication module is loaded, the connection with the soft encryption and decryption APP is initialized, the encryption and decryption service transfers the encryption and decryption call of the encryption and decryption application to the soft encryption and decryption APP, the soft encryption and decryption APP transfers the encryption and decryption result to the encryption service, and the encryption and decryption service transfers the encryption and decryption result to the encryption service APP through the callback event.
The encryption service is provided for the target application through the installation of the soft encryption and decryption application program and the encryption and decryption communication module, the encryption and decryption technology of the service is realized through the transmission between the information, the encryption and decryption requirements of users are met, and only the soft encryption and decryption application program needs to be updated when the encryption and decryption algorithm is updated, the operation system of the terminal equipment does not need to be updated, meanwhile, the TF card slot does not need to be relied on, the encryption and decryption of the information can be conveniently and effectively realized, and further, the user experience is improved.
Fig. 5 is a schematic structural diagram of an encryption and decryption apparatus according to an embodiment of the present invention, which is applied to a terminal device installed with a soft encryption and decryption application, where the terminal device is configured with an encryption and decryption communication module, and the terminal device is configured to provide an encryption and decryption service. As shown in fig. 5, the encryption and decryption apparatus 50 may include: a first processing module 501, a second processing module 502, an encryption/decryption module 503, and a third processing module 504.
The first processing module 501 is configured to receive an encryption/decryption service request sent by a target application, and send information to be encrypted/decrypted in the encryption/decryption service request to the encryption/decryption communication module; the second processing module 502 is configured to encapsulate, through the encryption and decryption communication module, the information to be encrypted and decrypted into a request message and send the request message to the soft encryption and decryption application program; the encryption and decryption module 503 is configured to perform encryption and decryption operations on the request message through the soft encryption and decryption application program, obtain an encryption and decryption message, and send the encryption and decryption message to the encryption and decryption communication module; the third processing module 504 is configured to analyze the encryption and decryption packet through the encryption and decryption communication module, and send the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal.
In this embodiment, a first processing module 501, a second processing module 502, an encryption/decryption module 503, and a third processing module 504 are provided, and are configured to receive an encryption/decryption service request sent by a target application, and send information to be encrypted and decrypted in the encryption/decryption service request to an encryption/decryption communication module; then, the information to be encrypted and decrypted is packaged into a request message through the encryption and decryption communication module and is sent to a soft encryption and decryption application program; then, the request message is encrypted and decrypted by the soft encryption and decryption application program to obtain an encryption and decryption message and sent to the encryption and decryption communication module; and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to the target terminal. Therefore, encryption service is provided for target application through installing the soft encryption and decryption application program and the encryption and decryption communication module, the encryption and decryption technology of the service is realized through transmission among the information, the encryption and decryption requirements of users are met, and only the soft encryption and decryption application program needs to be updated when the encryption and decryption algorithm is updated, the operating system of the terminal equipment does not need to be updated, meanwhile, the TF card slot does not need to be relied on, the encryption and decryption of the information can be conveniently and effectively realized, and further, the user experience is improved.
In one possible design, the encryption and decryption communication module is configured with an encryption and decryption interface; the device further comprises: a service initiation module; the service starting module is used for responding to the triggering operation for starting the encryption and decryption service before the encryption and decryption service request sent by the target application is received, and acquiring the encryption and decryption interface by loading the encryption and decryption communication module; and detecting whether the soft encryption and decryption application program is installed, and if the soft encryption and decryption application program is installed, establishing a communication channel with the soft encryption and decryption application program through the encryption and decryption interface.
In one possible design, the first processing module is specifically configured to: and sending the information to be encrypted and decrypted to the encryption and decryption communication module through the communication channel.
In one possible design, the encryption/decryption module is specifically configured to:
analyzing the request message through the soft encryption and decryption application program to obtain the information to be encrypted and decrypted; and carrying out encryption and decryption operation on the information to be encrypted and decrypted through the soft encryption and decryption application program, and packaging the encryption and decryption information obtained by encryption and decryption to obtain an encryption and decryption message.
In one possible design, the third processing module is specifically configured to: and sending the encryption and decryption information to the target application through the communication channel.
In one possible design, the encryption and decryption communication module is configured with a callback interface; the third processing module is specifically configured to:
receiving the encryption and decryption information sent by the encryption and decryption communication module through the callback interface; and sending the received encryption and decryption information to the target application through the callback interface. The encryption and decryption device provided by the embodiment of the present invention can implement the encryption and decryption method of the above-described embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
Fig. 6 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 60 provided in the present embodiment includes: at least one processor 601 and memory 602. The processor 601 and the memory 602 are connected by a bus 603.
In a specific implementation, at least one processor 601 executes computer-executable instructions stored by the memory 602 to cause the at least one processor 601 to perform the methods of the above-described method embodiments.
For a specific implementation process of the processor 601, reference may be made to the above method embodiments, which implement the principle and the technical effect similarly, and details of this embodiment are not described herein again.
In the embodiment shown in fig. 6, it should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose processors, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise high speed RAM memory and may also include non-volatile storage NVM, such as at least one disk memory.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present invention are not limited to only one bus or one type of bus.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the encryption and decryption method according to the above method embodiment is implemented.
The embodiment of the invention also provides a computer program product, and when being executed by a processor, the computer program product realizes the encryption and decryption method of the embodiment of the method.
The computer-readable storage medium may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and these modifications or substitutions do not depart from the spirit of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An encryption and decryption method is applied to terminal equipment provided with a soft encryption and decryption application program, the terminal equipment is provided with an encryption and decryption communication module, and the terminal equipment is used for providing encryption and decryption services, and the method comprises the following steps:
receiving an encryption and decryption service request sent by a target application, and sending information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module;
packaging the information to be encrypted and decrypted into a request message through the encryption and decryption communication module and sending the request message to the soft encryption and decryption application program;
performing encryption and decryption operation on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to the encryption and decryption communication module;
and analyzing the encryption and decryption message through the encryption and decryption communication module, and sending the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal.
2. The method of claim 1, wherein the encryption and decryption communication module is configured with an encryption and decryption interface; before the receiving of the encryption/decryption service request sent by the target application, the method further includes:
responding to a trigger operation for starting an encryption and decryption service, and acquiring the encryption and decryption interface by loading the encryption and decryption communication module;
and detecting whether the soft encryption and decryption application program is installed, and if the soft encryption and decryption application program is installed, establishing a communication channel with the soft encryption and decryption application program through the encryption and decryption interface.
3. The method according to claim 2, wherein the sending the information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module includes:
and sending the information to be encrypted and decrypted to the encryption and decryption communication module through the communication channel.
4. The method according to claim 2 or 3, wherein the encrypting and decrypting the request packet by the soft encryption and decryption application program to obtain an encrypted and decrypted packet includes:
analyzing the request message through the soft encryption and decryption application program to obtain the information to be encrypted and decrypted;
and carrying out encryption and decryption operation on the information to be encrypted and decrypted through the soft encryption and decryption application program, and packaging the encryption and decryption information obtained by encryption and decryption to obtain an encryption and decryption message.
5. The method of claim 2, wherein sending the parsed encryption and decryption information to the target application comprises:
and sending the encryption and decryption information to the target application through the communication channel.
6. The method of claim 5, wherein the encryption and decryption communication module is configured with a callback interface; the sending the encryption and decryption information to the target application through the communication channel comprises:
receiving the encryption and decryption information sent by the encryption and decryption communication module through the callback interface;
and sending the received encryption and decryption information to the target application through the callback interface.
7. An encryption and decryption device is applied to a terminal device installed with a soft encryption and decryption application program, the terminal device is configured with an encryption and decryption communication module, the terminal device is used for providing encryption and decryption services, and the device comprises:
the first processing module is used for receiving an encryption and decryption service request sent by a target application and sending information to be encrypted and decrypted in the encryption and decryption service request to the encryption and decryption communication module;
the second processing module is used for packaging the information to be encrypted and decrypted into a request message through the encryption and decryption communication module and sending the request message to the soft encryption and decryption application program;
the encryption and decryption module is used for carrying out encryption and decryption operations on the request message through the soft encryption and decryption application program to obtain an encryption and decryption message and sending the encryption and decryption message to the encryption and decryption communication module;
and the third processing module analyzes the encryption and decryption message through the encryption and decryption communication module and sends the analyzed encryption and decryption information to the target application, so that the target application sends the encryption and decryption information to a target terminal.
8. A terminal device, comprising: at least one processor and memory;
the memory stores computer execution instructions;
the at least one processor executing the memory-stored computer-executable instructions causes the at least one processor to perform the encryption/decryption method of any one of claims 1-6.
9. A computer-readable storage medium having stored thereon computer-executable instructions which, when executed by a processor, implement the encryption and decryption method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the encryption/decryption method of any one of claims 1 to 6 when executed by a processor.
CN202011628005.0A 2020-12-30 2020-12-30 Encryption and decryption method, device, equipment, storage medium and computer program product Pending CN114692175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011628005.0A CN114692175A (en) 2020-12-30 2020-12-30 Encryption and decryption method, device, equipment, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011628005.0A CN114692175A (en) 2020-12-30 2020-12-30 Encryption and decryption method, device, equipment, storage medium and computer program product

Publications (1)

Publication Number Publication Date
CN114692175A true CN114692175A (en) 2022-07-01

Family

ID=82134074

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011628005.0A Pending CN114692175A (en) 2020-12-30 2020-12-30 Encryption and decryption method, device, equipment, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN114692175A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7330978B1 (en) * 1999-04-08 2008-02-12 Microsoft Corporation Encrypted software installer
CN105812332A (en) * 2014-12-31 2016-07-27 北京握奇智能科技有限公司 Data protection method
CN106845256A (en) * 2017-01-24 2017-06-13 腾讯科技(深圳)有限公司 A kind of method and terminal of encryption and decryption data in the application
CN107026824A (en) * 2016-02-02 2017-08-08 腾讯科技(深圳)有限公司 A kind of message encryption, decryption method and device
CN108880806A (en) * 2018-08-01 2018-11-23 深圳三角形科技有限公司 Encryption and decryption method, chip and readable storage medium storing program for executing
CN110866262A (en) * 2019-11-05 2020-03-06 郑州信大捷安信息技术股份有限公司 Asynchronous encryption and decryption system and method with cooperative work of software and hardware
CN111310213A (en) * 2020-02-20 2020-06-19 苏州浪潮智能科技有限公司 Service data protection method, device, equipment and readable storage medium
CN112035860A (en) * 2020-09-03 2020-12-04 深圳市百富智能新技术有限公司 File encryption method, terminal, device, equipment and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7330978B1 (en) * 1999-04-08 2008-02-12 Microsoft Corporation Encrypted software installer
CN105812332A (en) * 2014-12-31 2016-07-27 北京握奇智能科技有限公司 Data protection method
CN107026824A (en) * 2016-02-02 2017-08-08 腾讯科技(深圳)有限公司 A kind of message encryption, decryption method and device
CN106845256A (en) * 2017-01-24 2017-06-13 腾讯科技(深圳)有限公司 A kind of method and terminal of encryption and decryption data in the application
CN108880806A (en) * 2018-08-01 2018-11-23 深圳三角形科技有限公司 Encryption and decryption method, chip and readable storage medium storing program for executing
CN110866262A (en) * 2019-11-05 2020-03-06 郑州信大捷安信息技术股份有限公司 Asynchronous encryption and decryption system and method with cooperative work of software and hardware
CN111310213A (en) * 2020-02-20 2020-06-19 苏州浪潮智能科技有限公司 Service data protection method, device, equipment and readable storage medium
CN112035860A (en) * 2020-09-03 2020-12-04 深圳市百富智能新技术有限公司 File encryption method, terminal, device, equipment and medium

Similar Documents

Publication Publication Date Title
US11601809B2 (en) Method and system for updating certificate issuer public key, and related device
US11019482B2 (en) Method, system, and terminal device for realizing local profile assistant based on remote subscriber identification module provisioning
KR100883556B1 (en) Method for processing and transmitting data on a mobile telephone network and microchip onboard system
CN110352605B (en) Method for adding authentication algorithm program, related equipment and system
US10977021B2 (en) SE applet processing method, terminal, and server
CN111274611A (en) Data desensitization method, device and computer readable storage medium
CN111918274B (en) Code number configuration and management method and device, electronic equipment and readable storage medium
CN109831775B (en) Processor, baseband chip and SIM card information transmission method
CN112686358A (en) Data transmission method, NFC electronic tag, terminal device and storage medium
CN112153015A (en) Multi-encryption interface authentication method, device, equipment and readable storage medium
CN111381848A (en) Resource file updating method, device, equipment and storage medium
CN114692175A (en) Encryption and decryption method, device, equipment, storage medium and computer program product
CN111262837B (en) Data encryption method, data decryption method, system, equipment and medium
CN113709088B (en) Data transmission method, device, equipment and storage medium based on wearable equipment
CN109933960B (en) Service calling control method, service calling method, device and terminal
CN114679287A (en) Data processing method, system, electronic device and storage medium
CN113626833A (en) Card application data backup and recovery method and related equipment
US20240236674A1 (en) Method and System for Updating Certificate Issuer Public Key, and Related Device
CN114124880B (en) Secret communication method and device based on public cloud, computer equipment and storage medium
EP2991314A1 (en) Method and first device for loading an application
US20230388801A1 (en) Method for implimenting request from app by sim in mobile phone
CN109905417B (en) Tax billing system and tax control converter
CN115643052A (en) Data encryption method, data decryption method, device, system, equipment and storage medium
US10616212B2 (en) Method of sending a data from a secure token to a server
CN115174252A (en) Video encryption transmission method, device, equipment and 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