CN113553125B - Method, device and equipment for calling trusted application program and computer storage medium - Google Patents

Method, device and equipment for calling trusted application program and computer storage medium Download PDF

Info

Publication number
CN113553125B
CN113553125B CN202010336880.5A CN202010336880A CN113553125B CN 113553125 B CN113553125 B CN 113553125B CN 202010336880 A CN202010336880 A CN 202010336880A CN 113553125 B CN113553125 B CN 113553125B
Authority
CN
China
Prior art keywords
communication information
application program
character string
preset
condition
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.)
Active
Application number
CN202010336880.5A
Other languages
Chinese (zh)
Other versions
CN113553125A (en
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.)
China Mobile Communications Group Co Ltd
China Mobile Chengdu ICT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Chengdu ICT Co 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 China Mobile Communications Group Co Ltd, China Mobile Chengdu ICT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010336880.5A priority Critical patent/CN113553125B/en
Publication of CN113553125A publication Critical patent/CN113553125A/en
Application granted granted Critical
Publication of CN113553125B publication Critical patent/CN113553125B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability

Landscapes

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

Abstract

The embodiment of the invention provides a method, a device, equipment and a computer storage medium for calling a trusted application program. The calling method of the trusted application program comprises the following steps: receiving first communication information sent by a client application program; judging whether the first communication information meets a preset condition or not; and if the first communication information meets the preset condition, controlling the client application program to call the trusted application program corresponding to the client application program. According to the method, the device, the equipment and the computer storage medium for calling the trusted application program, which are provided by the embodiment of the invention, the trusted application program can be called more safely.

Description

Method, device and equipment for calling trusted application program and computer storage medium
Technical Field
The invention belongs to the technical field of information security, and particularly relates to a method and a device for calling a trusted application program, electronic equipment and a computer storage medium.
Background
With the development of network information technology, the information security problem is also becoming more important. However, in order to improve the service processing efficiency, the processors in the related art (e.g., financial field) are time-shared by two separate sets of systems (trusted execution environment (Trust Execution Environment, TEE) and environment (Rich Execution Environment, re)) executing rich instructions in completing the corresponding service.
The TEE is a set of software and hardware components that can provide the necessary facilities for an application. The trusted application (Trusted Application, TA) is an application running in the TEE environment, and the TA must be signed by the TEE OS. The TEE OS is an operating system in the TEE environment, such as an open-source OPTEE. The REEs correspond to TEEs, and the client applications (Client Application, CA) are applications running in the REE environment.
At present, in the process of completing corresponding services, the processor needs to control the CA at the REE side to call the TA at the TEE side, and only check whether the signature of the TEE OS on the TA is legal or not, so that a certain information security risk exists.
Therefore, how to make the invocation of the trusted application more securely is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention provides a method, a device, electronic equipment and a computer storage medium for calling a trusted application program, which can call the trusted application program more safely.
In a first aspect, an embodiment of the present invention provides a method for calling a trusted application, including:
receiving first communication information sent by a client application program;
judging whether the first communication information meets a preset condition or not;
and if the first communication information meets the preset condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, the preset condition includes a composition structural condition and/or an information content condition that the communication information should satisfy; judging whether the first communication information meets the preset condition or not comprises the following steps:
judging whether the first communication information meets the composition structural condition and/or the information content condition;
if the first communication information meets the preset condition, the client application program is controlled to call the trusted application program corresponding to the client application program, and the method comprises the following steps:
and if the first communication information meets the composition structural condition and/or the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, the composition structural conditions are: the communication information consists of a random character string, preset information and a time stamp; if the first communication information meets the composition structural condition and the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program, including:
when the first communication information is judged to meet the composition structural condition, determining first preset information in the first communication information;
judging whether the first preset information meets the information content condition or not;
and if the first preset information meets the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, the preset condition further includes an exclusivity condition that the random character string in the communication information should meet, and/or an expiration date condition that the timestamp in the communication information should meet; after judging that the first communication information meets the composition structural condition, the method further comprises:
determining a first random string and/or a first timestamp in the first communication;
judging whether the first random character string meets the exclusivity condition and/or judging whether the first timestamp meets the validity period condition;
and if the first random character string meets the exclusivity condition and/or if the first timestamp meets the validity period condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, receiving the first communication information sent by the client application program includes:
receiving second communication information sent by a client application program; wherein the second communication information is encrypted communication information;
and decrypting the second communication information by using a preset first key to obtain the first communication information.
Optionally, before decrypting the second communication information with the preset first key to obtain the first communication information, the method further includes:
generating a first key based on an encryption algorithm; the encryption algorithm comprises at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
Optionally, generating the first key based on an encryption algorithm includes:
generating a second key according to an asymmetric encryption algorithm;
encrypting the second key based on a symmetric encryption algorithm or a multiple hybrid hash encryption algorithm to obtain a third key;
the third key is determined to be the first key.
In a second aspect, an embodiment of the present invention provides a calling device for a trusted application, including:
the receiving module is used for receiving the first communication information sent by the client application program;
the judging module is used for judging whether the first communication information meets preset conditions or not;
and the control module is used for controlling the client application program to call the trusted application program corresponding to the client application program if the first communication information meets the preset condition.
Optionally, the preset condition includes a composition structural condition and/or an information content condition that the communication information should satisfy; the judging module is used for judging whether the first communication information meets the composition structural condition and/or the information content condition; and the control module is used for controlling the client application program to call the trusted application program corresponding to the client application program if the first communication information meets the composition structural condition and/or the information content condition.
Optionally, the composition structural conditions are: the communication information consists of a random character string, preset information and a time stamp; the control module is used for determining first preset information in the first communication information when judging that the first communication information meets the composition structural condition; judging whether the first preset information meets the information content condition or not; and if the first preset information meets the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, the preset condition further includes an exclusivity condition that the random character string in the communication information should meet, and/or an expiration date condition that the timestamp in the communication information should meet; the judging module is further used for determining a first random character string and/or a first timestamp in the first communication information; judging whether the first random character string meets the exclusivity condition and/or judging whether the first timestamp meets the validity period condition; and if the first random character string meets the exclusivity condition and/or if the first timestamp meets the validity period condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, the receiving module is configured to receive second communication information sent by the client application program; wherein the second communication information is encrypted communication information; and decrypting the second communication information by using a preset first key to obtain the first communication information.
Optionally, the calling device of the trusted application further comprises a key generation module, configured to generate a first key based on an encryption algorithm; the encryption algorithm comprises at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
Optionally, the key generation module is used for generating a second key according to an asymmetric encryption algorithm; encrypting the second key based on a symmetric encryption algorithm or a multiple hybrid hash encryption algorithm to obtain a third key; the third key is determined to be the first key.
In a third aspect, an embodiment of the present invention provides an electronic device, including: a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement the method of invoking the trusted application in the first aspect or any of the alternative implementations of the first aspect.
In a fourth aspect, embodiments of the present invention provide a computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method of invoking a trusted application in the first aspect or any alternative implementation of the first aspect.
The method, the device, the electronic equipment and the computer storage medium for calling the trusted application program can call the trusted application program more safely. According to the calling method of the trusted application program, after the first communication information sent by the client application program is received, whether the client application program is legal or not is judged by judging whether the first communication information meets the preset condition or not. And when the first communication information meets the preset condition, namely, the client application program is judged to be legal, the client application program is controlled to call the trusted application program corresponding to the client application program. Compared with the prior art, the calling method of the trusted application program carries out validity detection on the client application program, and safety is improved.
Drawings
In order to more clearly illustrate the technical solution of the embodiments of the present invention, the drawings that are needed to be used in the embodiments of the present invention will be briefly described, and it is possible for a person skilled in the art to obtain other drawings according to these drawings without inventive effort.
FIG. 1 is a schematic diagram of REE and TEE structures in the prior art;
FIG. 2 is a flow chart of a method for invoking a trusted application according to an embodiment of the present invention;
FIG. 3 is a flowchart of detecting validity of a first communication according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a trusted application calling device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and the detailed embodiments. It should be understood that the specific embodiments described herein are merely configured to illustrate the invention and are not configured to limit the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the invention by showing examples of the invention.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
Currently, in the process of completing corresponding service by a processor, a developer designs CA and TA corresponding to the service function. The TA must be signed by the TEE OS and then deployed to the designated location separately from the CA and TA. And initiating normal service functions through an upper service APK, executing a function code to a CA on the REE side, initiating a TA call by a CA program, then switching a system, switching from the REE environment to a safe TEE environment, checking whether a legal signature exists on the TA by the TEE OS, starting to execute loading the TA after the check is passed, and executing the code. Since only the signature of the TEE OS on the TA is checked to be legal, there is a certain information security risk.
As shown in fig. 1, normal World is REE and Secure World is TEE in fig. 1. In fig. 1, user is the User, and Kernel is the core. Normal World includes: client APP (Client application), TEE-support (trusted execution environment request), TEE Client API (trusted execution environment Client application interface), genetic TEE API (universal trusted execution environment application interface), TEE subsystem (trusted execution environment subsystem), OP-TEE driver (trusted execution environment driver), OP-TEE Msg SMC call (trusted execution environment short message SMC call). Secure World includes: dynamic Trusted APP (dynamic Trusted application), TEE Internal APIs (Trusted execution environment internal application program interface), OP-TEE Trusted OS (Trusted execution environment Trusted operating system), static Trusted APP (static Trusted application).
During this traffic handling, the default CA is secure, but the CA may also be illegal. If the CA is illegal, a certain information security risk will be caused after the CA calls the TA.
For example, in the current fingerprint payment schemes in the financial field, each fingerprint payment scheme is implemented by using a key pre-embedded in a secure storage area to generate a subsequent series of service operation keys. Therefore, the key pre-embedded in the secure storage area is important, and once it is destroyed, the fingerprint payment function cannot be used. In the current fingerprint payment schemes, the function code of the key pre-embedded in the secure storage area is integrated in the TA, and if the TA is called by illegal CA exception, a significant information security risk is caused.
In addition, illegal CA can cause the service function of the equipment to be unable to be executed normally, and the normal use of the equipment is affected. If the illegal CA executes the destruction instruction, the important data of the firmware preimplanted in the factory can be damaged, and the factory can only be returned for maintenance, so that the cost performance is high. These situations all bring bad user experience to the user.
The inventor finds that the root cause of the problems is that in the service treatment process, the CA is directly defaulted to be safe, and the validity of the CA is not detected. Therefore, in order to make the invocation of the trusted application more secure, the CA may be subjected to validity detection before the control client application invokes the trusted application corresponding to the client application. And how to realize the validity detection of the CA, whether the first communication information sent by the CA meets the preset condition or not can be judged by judging whether the CA is legal or not, namely, when the first communication information meets the preset condition, the CA is judged to be legal; and when the first communication information does not meet the preset condition, judging that the CA is illegal. Only when the CA is judged to be legal, the CA is allowed to call the corresponding TA, and compared with the prior art, the CA can call the TA more safely.
In order to solve the problems in the prior art, the embodiment of the invention provides a method and a device for calling a trusted application, electronic equipment and a computer storage medium. The following first describes a method for calling a trusted application provided by an embodiment of the present invention.
Fig. 2 is a schematic flow chart of a method for calling a trusted application according to an embodiment of the present invention. As shown in fig. 2, the calling method of the trusted application may include the following steps:
s110, receiving first communication information sent by the client application program.
In order to increase the security of the information transmission, in one embodiment, the step S110 may include: receiving second communication information sent by a client application program; wherein the second communication information is encrypted communication information; and decrypting the second communication information by using a preset first key to obtain the first communication information.
It can be seen that in this embodiment, the first communication information is encrypted by the CA to be the second communication information, and the CA may include an encryption module, which generates a key for encrypting the information according to an encryption algorithm, and encrypts the first communication information by using the key for encrypting the information to obtain the second communication information.
The encryption algorithm may include at least one of a symmetric encryption algorithm (e.g., DES encryption algorithm), an asymmetric encryption algorithm (e.g., RSA encryption algorithm), and a multiple hybrid hash encryption algorithm (including MD5 encryption algorithm, SHA1 encryption algorithm, etc.).
It should be noted that the key for information encryption may be generated by sequentially using a plurality of encryption algorithms, for example, an asymmetric encryption algorithm may be used to generate a key, and then a symmetric encryption algorithm or a multiple hybrid hash encryption algorithm may be used to encrypt the key to obtain a key for information encryption.
After receiving the second communication information, it is decrypted using a preset first key, which is a key for decryption, which corresponds to a key for encryption, i.e. the generation process of which corresponds to the generation process of the key for encryption.
For example, the generating of the first key may include: generating a first key based on an encryption algorithm; the encryption algorithm comprises at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
Note that, since the key for information encryption can be generated by sequentially using a plurality of encryption algorithms, the first key can be generated by sequentially using a plurality of encryption algorithms.
In one embodiment, the generating the first key based on the encryption algorithm may include: generating a second key according to an asymmetric encryption algorithm; encrypting the second key based on a symmetric encryption algorithm or a multiple hybrid hash encryption algorithm to obtain a third key; the third key is determined to be the first key.
As can be seen from the above, the first communication information is a communication information to be verified, and step S120 may be executed to verify the first communication information; upon completion of step S120, step S130 may be performed in order to satisfy the business requirements.
S120, judging whether the first communication information meets the preset condition.
And S130, if the first communication information meets the preset condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Judging whether the first communication information meets the preset condition, namely judging whether the first communication information is legal communication information. The following describes the relevant content of legal communication information, specifically as follows:
when the user calls the CA through the service operation, the CA generates a series of messages according to the preset rule. Alternatively, the CA may include an information generation module that may generate legal communication information according to preset rules.
The preset rule may be: a length-fixed random character string is added with the message content agreed in advance by both communication parties and a time stamp. For example, each time a call is initiated by the CA terminal, a 64-bit random string may be generated, and the random string for each call is different. The composition of legal communication information may be as follows:
{ a 64-bit random string+contracted message content+current time (yyymmddhhmiss) }
Where "current time (yyyymmddhhmiss)" is a 14-bit timestamp. Based on the above constitution, it can be understood that 64 bits are taken from the head as a random string, 14 bits from the tail as a time stamp, and the rest of the intermediate data as agreed message contents when the communication information is parsed.
It should be noted that legal communication information may also be encrypted using a key and then transmitted in encrypted form. Legal communication information can also be encrypted by using an encryption algorithm, and the encryption algorithm can also comprise at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
Illustratively, in transmitting data, the CA will perform multiple hybrid hash encryption on the key stored on the REE storage medium, and the encryption process may include: after the secret key and the encryption password on the storage medium are respectively encrypted by an MD5 encryption algorithm, two corresponding hash strings are respectively obtained, the two hash strings are spliced by a cascading function to obtain a new character string, and the new character string is encrypted by an SHA1 encryption algorithm to obtain a new secret key:
NewKey=SHA1(Concat(MD5(key),MD5(password)))
and encrypting the generated communication message by using the new key, and finally transmitting the encrypted ciphertext information to the TA corresponding to the TEE side by a mechanism of calling the incidental parameters initiated by the CA.
The above description has been made of the related content of the legitimate communication information, and based on the above, it is possible to determine the preset condition that the first communication information should satisfy.
In order to more accurately perform validity detection on the first communication information, in one embodiment, if the preset condition includes a component structure condition and/or an information content condition that should be satisfied by the communication information, step S120 may include: it is determined whether the first communication information satisfies a composition structural condition and/or an information content condition.
Accordingly, step S130 may include: and if the first communication information meets the composition structural condition and/or the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
In order to more accurately perform validity detection on the first communication information, in one embodiment, the structural conditions are as follows: the communication information consists of a random character string, preset information and a time stamp. If the first communication information satisfies the composition structural condition and the information content condition, the controlling the client application program to call the trusted application program corresponding to the client application program may include: when the first communication information is judged to meet the composition structural condition, determining first preset information in the first communication information; judging whether the first preset information meets the information content condition or not; and if the first preset information meets the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
In addition, in order to more accurately perform validity detection on the first communication information, in one embodiment, the preset condition further includes an exclusivity condition that a random string in the communication information should meet, and/or a validity period condition that a timestamp in the communication information should meet. After determining that the first communication information satisfies the composition structural condition, the method may further include: determining a first random string and/or a first timestamp in the first communication; judging whether the first random character string meets the exclusivity condition and/or judging whether the first timestamp meets the validity period condition; and if the first random character string meets the exclusivity condition and/or if the first timestamp meets the validity period condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Based on the above embodiments, in order to more accurately perform validity detection on the first communication information, in one embodiment, the verification module may perform multiple validity detections on the first communication information, as shown in fig. 3, and the specific procedure is as follows:
step (1): the encrypted first communication information sent by the CA is decrypted by using a preset key. If the decryption is successful, performing the step (2); if decryption fails, the first communication information is illegal, that is, CA is illegal, and TA call fails.
Step (2): and (3) decomposing the first communication information decrypted in the step (1) to obtain the random character string of the head. The random string is compared with the random string of the last operation. If the two are different, performing the step (3); if the first communication information and the second communication information are the same, the first communication information is illegal, namely the CA is illegal, and the TA call fails. It should be noted that, if the random string of the previous operation is null, the random string of the current operation is different from the default random string of the previous operation.
Step (3): and (3) acquiring middle part data of the decrypted first communication information, if the message content of the middle part data is consistent with the agreed message content, performing step (4), otherwise, the first communication information is illegal, namely CA is illegal, and TA call fails.
Step (4): and acquiring tail data of the decrypted first communication information and also obtaining a time stamp. Judging whether the time stamp is in the valid period, if the time stamp is in the valid period, the first communication information is legal, namely CA is legal, and TA call is successful. Otherwise, the first communication information is illegal, that is, the CA is illegal, and the TA call fails.
In summary, the embodiment of the present invention provides a method for invoking a trusted application, and after receiving first communication information sent by a client application, determines whether the client application is legal by determining whether the first communication information meets a preset condition. And when the first communication information meets the preset condition, namely, the client application program is judged to be legal, the client application program is controlled to call the trusted application program corresponding to the client application program. Compared with the prior art, the calling method of the trusted application program carries out validity detection on the client application program, and safety is improved.
In addition, in some embodiments, the preset conditions are defined, and/or decryption conditions need to be met, so that the validity of the first communication information can be detected more accurately, and further, the validity of the client application program can be detected more accurately, thereby increasing security.
The foregoing describes a method for calling a trusted application provided by the embodiment of the present invention, and the embodiment of the present invention further provides a device for calling a trusted application, as shown in fig. 4, where the device for calling a trusted application may include:
a receiving module 301, configured to receive first communication information sent by a client application program;
a judging module 302, configured to judge whether the first communication information meets a preset condition;
and the control module 303 is configured to control the client application program to call the trusted application program corresponding to the client application program if the first communication information meets the preset condition.
Optionally, in one embodiment, the preset condition includes a composition structural condition and/or an information content condition that should be satisfied by the communication information; a judging module 302, configured to judge whether the first communication information meets a composition structural condition and/or an information content condition; and the control module 303 is configured to control the client application program to call the trusted application program corresponding to the client application program if the first communication information meets the composition structural condition and/or the information content condition.
Optionally, in one embodiment, the compositional structural conditions are: the communication information consists of a random character string, preset information and a time stamp; a control module 303, configured to determine first preset information in the first communication information when it is determined that the first communication information meets the composition structural condition; judging whether the first preset information meets the information content condition or not; and if the first preset information meets the information content condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, in one embodiment, the preset condition further includes an exclusivity condition that the random string in the communication information should meet, and/or a validity period condition that the timestamp in the communication information should meet; the judging module 302 is further configured to determine a first random string and/or a first timestamp in the first communication information; judging whether the first random character string meets the exclusivity condition and/or judging whether the first timestamp meets the validity period condition; and if the first random character string meets the exclusivity condition and/or if the first timestamp meets the validity period condition, controlling the client application program to call the trusted application program corresponding to the client application program.
Optionally, in one embodiment, the receiving module 301 is configured to receive second communication information sent by the client application program; wherein the second communication information is encrypted communication information; and decrypting the second communication information by using a preset first key to obtain the first communication information.
Optionally, in one embodiment, the calling device of the trusted application further includes a key generation module 304 for generating a first key based on an encryption algorithm; the encryption algorithm comprises at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
Optionally, in one embodiment, the key generating module 304 is configured to generate the second key according to an asymmetric encryption algorithm; encrypting the second key based on a symmetric encryption algorithm or a multiple hybrid hash encryption algorithm to obtain a third key; the third key is determined to be the first key.
Each module in the apparatus shown in fig. 4 has a function of implementing each step shown in fig. 2, and can achieve a corresponding technical effect, which is not described herein for brevity.
Fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present invention.
The electronic device may comprise a processor 401 and a memory 402 in which computer program instructions are stored.
In particular, the processor 401 described above may include a central processing unit (Central Processing Unit, CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits implementing embodiments of the present invention.
Memory 402 may include mass storage for data or instructions. By way of example, and not limitation, memory 402 may comprise a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the foregoing. In one example, the memory 402 may include removable or non-removable (or fixed) media, or the memory 402 is a non-volatile solid state memory. The memory 402 may be internal or external to the electronic device.
In one example, memory 402 may be Read Only Memory (ROM). In one example, the ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
The processor 401 reads and executes the computer program instructions stored in the memory 402 to implement the method in the embodiment shown in fig. 2, and achieves the corresponding technical effects achieved by executing the method in the embodiment shown in fig. 2, which will not be described herein for brevity.
In one example, the electronic device may also include a communication interface 403 and a bus 410. As shown in fig. 5, the processor 401, the memory 402, and the communication interface 403 are connected by a bus 410 and perform communication with each other.
The communication interface 403 is mainly used to implement communication between each module, device, unit and/or apparatus in the embodiment of the present invention.
Bus 410 includes hardware, software, or both, coupling components of the electronic device to one another. By way of example, and not limitation, the buses may include an accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics Bus, an enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) Bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (Industry Standard Architecture, ISA) Bus, an infiniband interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a micro channel architecture (MCa) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a video electronics standards association local (VLB) Bus, or other suitable Bus, or a combination of two or more of the above. Bus 410 may include one or more buses, where appropriate. Although embodiments of the invention have been described and illustrated with respect to a particular bus, the invention contemplates any suitable bus or interconnect.
In addition, embodiments of the present invention may be implemented by providing a computer storage medium. The computer storage medium has stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement a method of invoking any of the trusted applications of the above embodiments.
It should be understood that the invention is not limited to the particular arrangements and instrumentality described above and shown in the drawings. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between steps, after appreciating the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine readable medium or transmitted over transmission media or communication links by a data signal carried in a carrier wave. A "machine-readable medium" may include any medium that can store or transfer information. Examples of machine-readable media include electronic circuitry, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio Frequency (RF) links, and the like. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should also be noted that the exemplary embodiments mentioned in this disclosure describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, or may be performed in a different order from the order in the embodiments, or several steps may be performed simultaneously.
In the foregoing, only the specific embodiments of the present invention are described, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the systems, modules and units described above may refer to the corresponding processes in the foregoing method embodiments, which are not repeated herein. It should be understood that the scope of the present invention is not limited thereto, and any equivalent modifications or substitutions can be easily made by those skilled in the art within the technical scope of the present invention, and they should be included in the scope of the present invention.

Claims (7)

1. A method of invoking a trusted application, comprising:
receiving first communication information sent by a client application program;
judging whether the first communication information meets a preset condition or not;
if the first communication information meets the preset condition, controlling the client application program to call a trusted application program corresponding to the client application program;
the preset conditions comprise composition structural conditions and information content conditions which are required to be met by the communication information, wherein the composition structural conditions are as follows: the communication information comprises a random character string of a message head, preset information of a middle part and a timestamp of a tail part, the information content condition comprises that the random character string in the communication information is different from a random character string operated last time, the preset information of the middle part is the same as the content of a contracted message, and the timestamp in the communication information is in a valid period;
the judging whether the first communication information meets the preset condition comprises the following steps:
judging whether the composition structure of the first communication information meets the composition structure condition;
when judging that the composition structure of the first communication information meets the composition structure condition, determining a first random character string, middle part data and a first timestamp in the first communication information;
judging whether the first random character string is identical with the random character string operated last time;
when judging that the first random character string is different from the random character string operated last time, judging whether the content of the middle part data and the content of the appointed message are the same or not;
when judging that the content of the middle part data is the same as that of the appointed message, judging whether the first timestamp is in the validity period or not;
and when the first timestamp is judged to be in the validity period, determining that the first communication information meets a preset condition.
2. The method for invoking a trusted application as defined in claim 1, wherein said receiving the first communication sent by the client application comprises:
receiving second communication information sent by the client application program; wherein the second communication information is encrypted communication information;
and decrypting the second communication information by using a preset first key to obtain the first communication information.
3. The method of claim 2, wherein prior to decrypting the second communication using the preset first key to obtain the first communication, the method further comprises:
generating the first key based on an encryption algorithm; the encryption algorithm comprises at least one of a symmetric encryption algorithm, an asymmetric encryption algorithm and a multiple hybrid hash encryption algorithm.
4. A method of invoking a trusted application as claimed in claim 3, wherein said generating said first key based on an encryption algorithm comprises:
generating a second key according to the asymmetric encryption algorithm;
encrypting the second key based on the symmetric encryption algorithm or the multiple hybrid hash encryption algorithm to obtain a third key;
the third key is determined to be the first key.
5. A trusted application invocation apparatus, comprising:
the receiving module is used for receiving the first communication information sent by the client application program;
the judging module is used for judging whether the first communication information meets preset conditions or not;
the control module is used for controlling the client application program to call a trusted application program corresponding to the client application program if the first communication information meets the preset condition;
the preset conditions comprise composition structural conditions and information content conditions which are required to be met by the communication information, wherein the composition structural conditions are as follows: the communication information comprises a random character string of a message head, preset information of a middle part and a timestamp of a tail part, the information content condition comprises that the random character string in the communication information is different from a random character string operated last time, the preset information of the middle part is the same as the content of a contracted message, and the timestamp in the communication information is in a valid period;
the judging module is specifically configured to:
judging whether the composition structure of the first communication information meets the composition structure condition;
when judging that the composition structure of the first communication information meets the composition structure condition, determining a first random character string, middle part data and a first timestamp in the first communication information;
judging whether the first random character string is identical with the random character string operated last time;
when judging that the first random character string is different from the random character string operated last time, judging whether the content of the middle part data and the content of the appointed message are the same or not;
when judging that the content of the middle part data is the same as that of the appointed message, judging whether the first timestamp is in the validity period or not;
and when the first timestamp is judged to be in the validity period, determining that the first communication information meets a preset condition.
6. An electronic device, the electronic device comprising: a processor and a memory storing computer program instructions;
the processor reads and executes the computer program instructions to implement a method of invoking a trusted application as claimed in any one of claims 1 to 4.
7. A computer storage medium having stored thereon computer program instructions which, when executed by a processor, implement a method of invoking a trusted application as claimed in any of claims 1-4.
CN202010336880.5A 2020-04-26 2020-04-26 Method, device and equipment for calling trusted application program and computer storage medium Active CN113553125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010336880.5A CN113553125B (en) 2020-04-26 2020-04-26 Method, device and equipment for calling trusted application program and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010336880.5A CN113553125B (en) 2020-04-26 2020-04-26 Method, device and equipment for calling trusted application program and computer storage medium

Publications (2)

Publication Number Publication Date
CN113553125A CN113553125A (en) 2021-10-26
CN113553125B true CN113553125B (en) 2024-03-19

Family

ID=78101478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010336880.5A Active CN113553125B (en) 2020-04-26 2020-04-26 Method, device and equipment for calling trusted application program and computer storage medium

Country Status (1)

Country Link
CN (1) CN113553125B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852800A (en) * 2015-05-25 2015-08-19 小米科技有限责任公司 Data transmission method and device
CN105260663A (en) * 2015-09-15 2016-01-20 中国科学院信息工程研究所 Secure storage service system and method based on TrustZone technology
CN105978920A (en) * 2016-07-28 2016-09-28 恒宝股份有限公司 Method for having access to credible application, CA and TA
CN105978917A (en) * 2016-07-19 2016-09-28 恒宝股份有限公司 System and method for trusted application security authentication
CN107689868A (en) * 2017-09-12 2018-02-13 北京握奇智能科技有限公司 The communication means of client application and trusted application, device and terminal
CN107688729A (en) * 2017-07-27 2018-02-13 大唐高鸿信安(浙江)信息科技有限公司 Protection system of application program and method based on trusted host
CN107743133A (en) * 2017-11-30 2018-02-27 中国石油大学(北京) Mobile terminal and its access control method and system based on trustable security environment
CN108600268A (en) * 2018-05-09 2018-09-28 聚龙股份有限公司 A kind of encrypting and decrypting method applied to non-credit certification and non-credit Verification System
CN108600222A (en) * 2018-04-24 2018-09-28 北京握奇智能科技有限公司 The communication means of client application and trusted application, system and terminal
CN109905395A (en) * 2019-03-07 2019-06-18 武汉斗鱼鱼乐网络科技有限公司 A kind of believable method of verifying client and relevant apparatus
CN110096881A (en) * 2019-05-07 2019-08-06 百度在线网络技术(北京)有限公司 Malice calls means of defence, device, equipment and computer-readable medium
CN110545542A (en) * 2019-06-13 2019-12-06 银联商务股份有限公司 Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852800A (en) * 2015-05-25 2015-08-19 小米科技有限责任公司 Data transmission method and device
CN105260663A (en) * 2015-09-15 2016-01-20 中国科学院信息工程研究所 Secure storage service system and method based on TrustZone technology
CN105978917A (en) * 2016-07-19 2016-09-28 恒宝股份有限公司 System and method for trusted application security authentication
CN105978920A (en) * 2016-07-28 2016-09-28 恒宝股份有限公司 Method for having access to credible application, CA and TA
CN107688729A (en) * 2017-07-27 2018-02-13 大唐高鸿信安(浙江)信息科技有限公司 Protection system of application program and method based on trusted host
CN107689868A (en) * 2017-09-12 2018-02-13 北京握奇智能科技有限公司 The communication means of client application and trusted application, device and terminal
CN107743133A (en) * 2017-11-30 2018-02-27 中国石油大学(北京) Mobile terminal and its access control method and system based on trustable security environment
CN108600222A (en) * 2018-04-24 2018-09-28 北京握奇智能科技有限公司 The communication means of client application and trusted application, system and terminal
CN108600268A (en) * 2018-05-09 2018-09-28 聚龙股份有限公司 A kind of encrypting and decrypting method applied to non-credit certification and non-credit Verification System
CN109905395A (en) * 2019-03-07 2019-06-18 武汉斗鱼鱼乐网络科技有限公司 A kind of believable method of verifying client and relevant apparatus
CN110096881A (en) * 2019-05-07 2019-08-06 百度在线网络技术(北京)有限公司 Malice calls means of defence, device, equipment and computer-readable medium
CN110545542A (en) * 2019-06-13 2019-12-06 银联商务股份有限公司 Main control key downloading method and device based on asymmetric encryption algorithm and computer equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
TrustZone架构保护移动终端设备信息安全;邱建斌;《通讯世界》;第26卷(第12期);第44-45页 *
移动互联网的通行证式统一威胁管理架构;李宁;《信息网络安全》;20200310(第3期);18-28 *

Also Published As

Publication number Publication date
CN113553125A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
US6948065B2 (en) Platform and method for securely transmitting an authorization secret
CN111404696B (en) Collaborative signature method, security service middleware, related platform and system
EP3457309B1 (en) Processing method for presenting copy attack, and server and client
US20180204004A1 (en) Authentication method and apparatus for reinforced software
CN114662087B (en) Multi-terminal verification security chip firmware updating method and device
JP6387908B2 (en) Authentication system
CN111950035A (en) Method, system, equipment and storage medium for protecting integrity of apk file
CN111130798A (en) Request authentication method and related equipment
CN114499859A (en) Password verification method, device, equipment and storage medium
CN109302442B (en) Data storage proving method and related equipment
US7779269B2 (en) Technique for preventing illegal invocation of software programs
CN112769789B (en) Encryption communication method and system
CN113553125B (en) Method, device and equipment for calling trusted application program and computer storage medium
CN116707758A (en) Authentication method, equipment and server of trusted computing equipment
CN116484379A (en) System starting method, system comprising trusted computing base software, equipment and medium
CN114172923B (en) Data transmission method, communication system and communication device
CN108242997B (en) Method and apparatus for secure communication
CN110610079A (en) Safe starting method, device and system
CN116956298A (en) Application running environment detection method and device
CN112422292B (en) Network security protection method, system, equipment and storage medium
CN114168909A (en) Program protection method, device, equipment and storage medium based on code signature
CN116418511A (en) Firmware integrity checking method and system of QKD (quality of service) equipment based on cryptographic algorithm
CN113094708A (en) Electronic file processing method and device, storage medium and processor
CN115146284A (en) Data processing method and device, electronic equipment and storage medium
CN114626050A (en) Authentication 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
GR01 Patent grant
GR01 Patent grant