WO2018223509A1 - 管理安全装置中应用的方法和装置 - Google Patents

管理安全装置中应用的方法和装置 Download PDF

Info

Publication number
WO2018223509A1
WO2018223509A1 PCT/CN2017/094811 CN2017094811W WO2018223509A1 WO 2018223509 A1 WO2018223509 A1 WO 2018223509A1 CN 2017094811 W CN2017094811 W CN 2017094811W WO 2018223509 A1 WO2018223509 A1 WO 2018223509A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
security device
instruction
attribute information
content management
Prior art date
Application number
PCT/CN2017/094811
Other languages
English (en)
French (fr)
Inventor
李国庆
常新苗
梅敬青
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201780009736.7A priority Critical patent/CN108780482B/zh
Publication of WO2018223509A1 publication Critical patent/WO2018223509A1/zh

Links

Images

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/445Program loading or initiating

Definitions

  • the secure element is a key element in the implementation of mobile payment services. It provides a tamper resistant operability and storage environment and cryptographic operations for installing and running payment card applications and saving. User confidential data, such as keys, certificates, etc., can also be used to store access rules for SE or device sensitive application programming interfaces.
  • the SE can be packaged into a universal intergrated circuit card (UICC), then installed in the terminal, or encapsulated as an embedded secure element (eSE), and then soldered to the motherboard of the terminal, no matter which In a package form, the terminal's central processing unit (CPU) can communicate with the SE of the terminal.
  • UICC universal intergrated circuit card
  • eSE embedded secure element
  • the reserved memory is used to reserve storage resources for the card application and utilize the storage quota (memory quota)
  • the parameter specifies the scalable storage space for the card application.
  • the management mode of the resource reservation causes the card application to occupy extra space, and the utilization of the SE space is not high, which exacerbates the tension of the SE space.
  • Embodiments of the present invention provide a management method and apparatus for an application in a security unit. By migrating (or unloading) the application in the SE, the problem of insufficient storage space available to the SE user is solved.
  • the content management device receives the first response sent by the security device, and the first response includes an identification letter of the user data packet of the application
  • the first response is used to indicate that the security device has successfully uninstalled the application.
  • the method releases the user space available in the security device by uninstalling the installed application in the security device.
  • the method further includes: the content management device establishes a mapping relationship between the identifier information of the user data packet and the attribute information of the application, and stores the After uninstalling the application, the user ensures that the uninstalled application can be reinstalled locally from the terminal, which is convenient for the user.
  • the method further includes: the content management device marking the status of the application as a recoverable state, and presenting to the user through the management interface, to facilitate the user. Reinstall the app when needed.
  • the method further includes: the content management device sends a second instruction to the security device, where the second instruction is used to instruct the security device to increase available storage space, The increased storage space is no larger than the storage space occupied by the application in the security device.
  • the content management device receives the second response of the security device, and the second response is used to confirm that the security device increases the available storage space, and further solves the problem that the storage space available to the user of the security device is insufficient.
  • the method further includes: the content management device receiving the recovery installation request, where the recovery installation request may include the attribute information of the application.
  • the content management device determines, according to the attribute information of the application, the identification information of the user data packet corresponding to the attribute information of the application, to confirm that the application is an application that has been uninstalled.
  • the content management device sends a fourth instruction to the security device, the fourth instruction may include attribute information of the application and an ELF, and the fourth instruction is used to instruct the security device to install the application.
  • the content management device receives the fourth response sent by the security device, and the fourth response is used to confirm that the application has been successfully installed.
  • the method improves the security by obtaining an executable loading file from the TEE of the terminal by not relying on the unstable OTA channel between the server terminals, and realizes convenient and quick recovery installation.
  • the method further includes: the content management device sending a sixth instruction to the security device, where the sixth instruction includes the attribute information of the application and the user data packet.
  • the identifier information is used to instruct the security device to personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the content management device receives the sixth response sent by the security device, The sixth response is used to confirm that the security device successfully performs the personalization of the application, thereby completing a personalized recovery installation of the application.
  • the method further includes: the content management device sending a sixth instruction to the security device, where the sixth instruction includes attribute information of the application.
  • the sixth instruction is used to instruct the security device to personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the content management device receives a sixth response sent by the security device, and the sixth response is used to confirm that the security device has completed personalization of the application, thereby completing a personalized recovery installation of the application.
  • the method further includes: the content management device sends a sixth instruction to the security device, where the sixth instruction may include the identification information of the user data packet of the application. .
  • the sixth instruction is used to instruct the security device to personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the content management device receives a sixth response sent by the security device, and the sixth response is used to confirm that the security device successfully performs personalization of the application, thereby completing a personalized recovery installation of the application.
  • the method further includes: the content management device marking the status of the application as an available state.
  • a security device receiving a first instruction sent by a content management device, the first instruction comprising attribute information of an application installed in the security device, the first instruction being used for Instruct the security device to uninstall the application.
  • the security device acquires the user data package of the application according to the attribute information of the application, and the user data package includes all data configured in the application personalization process, and stores the user data package of the application.
  • the security device configures the identification information of the user data packet according to the user data packet.
  • the security device uninstalls the application according to the attribute information of the application, and releases the occupied storage space.
  • the method further includes: the security device establishes a mapping relationship between the identifier information of the user data packet and the attribute information of the application, and stores the information. After the user uninstalls the application, it is ensured that the uninstalled application can be reinstalled locally from the terminal, which is convenient for the user.
  • the method further includes: the security device receiving the second instruction sent by the content management device.
  • the security device increases the available storage space of the security device according to the second instruction, and the increased storage space is not greater than the storage space occupied by the application in the security device.
  • the security device sends a second response to the content management device, and the second response is used to notify the content management device security device to increase the available storage space, and further solves the problem that the available storage space of the user of the security device is insufficient.
  • the device implements the backup of the executable executable file or the encrypted executable load file and the application attribute information of the application in the TEE environment, and manages the backup executable load file or the encrypted executable load file through management.
  • the interface is presented, and the integrity data of the corresponding encrypted executable file is recorded in the security device, and the user's data information is protected.
  • the method before the security device sends the third response to the content management device, the method further includes: the ELF is an encrypted ELF, and the security device obtains the first hash value of the encrypted ELF.
  • the security device stores the first hash value.
  • the security device establishes a mapping relationship between the first hash value and the attribute information of the application, so that the user reinstalls the application when needed.
  • the method improves the security by obtaining an executable loading file from the TEE (including the content management device) of the terminal by not relying on the unstable OTA channel between the server terminals, and realizes convenient and quick recovery installation.
  • the method further includes: the security device receiving the fourth instruction sent by the content management device, where the fourth instruction includes the attribute information of the application and the encrypted ELF
  • the fourth instruction is used to instruct the security device to install the application.
  • the security device obtains a second hash value of the encrypted ELF.
  • the security device obtains the stored first hash value according to the attribute information of the application.
  • the security device decrypts the encrypted ELF to obtain the ELF.
  • the safety device installs the application according to the ELF. Thereafter, the security device sends a fourth response to the content management device to notify the content management device that the application is successfully installed.
  • the method before the security device receives the fourth instruction sent by the content management device, the method further includes: the security device receiving the fifth instruction sent by the content management device.
  • the security device acquires status information of available storage space of the security device according to the fifth instruction. When the status information of the available storage space of the security device is sufficient, the security device sends a fifth response to the content management device.
  • the method further includes: the security device receiving the sixth instruction sent by the content management device, where the sixth instruction includes the attribute information of the application and the user corresponding to the application. Identification information of the packet.
  • the security device personalizes the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the security device sends a sixth response to the content management device to notify the security device to complete the personalization of the application, thereby confirming that the security device successfully performs the personalization of the application, and completes the personalized installation and restoration of the application.
  • the method further includes: the security device receiving the sixth instruction sent by the content management device, where the sixth instruction includes the attribute information of the application.
  • the security device acquires the identification information of the user data packet of the application according to the mapping relationship between the stored identification information of the user data packet and the attribute information of the application, and the attribute of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the application to be restored corresponding to the information is personalized.
  • the security device sends a sixth response to the content management device, the sixth response being used to confirm that the security device has completed personalization of the application, thereby confirming that the security device successfully performs personalization of the application, and completing a personalized recovery installation of the application.
  • the method further includes: the security device receiving the sixth instruction sent by the content management device, where the sixth instruction may include the identifier of the user data packet of the application information.
  • the processor obtains the attribute information of the application according to the mapping relationship between the identifier information of the stored user data packet and the attribute information of the application, and corresponding to the attribute information of the application to be restored according to the user data packet corresponding to the identification information of the user data packet.
  • the application to be restored is personalized to confirm that the security device successfully performs the personalization of the application, and completes the personalized installation and restoration of the application.
  • a security device having the function of implementing the behavior of the security device in practice in the above method.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • another content management apparatus can include: a processor, a transmitter, a receiver, and a storage.
  • the processor is configured to obtain attribute information of an application installed in the security device, and determine, according to the attribute information of the application, that the executable load file ELF corresponding to the attribute information of the application is stored.
  • the transmitter is configured to send the first instruction to the security device, wherein the first instruction includes attribute information of the application, and the first instruction is used to instruct the security device to uninstall the application.
  • the receiver is configured to receive a first response sent by the security device, where the first response includes identification information of the user data packet of the application, and the first response is used to indicate that the security device has successfully uninstalled the application. The user space available in the security device is released by uninstalling the installed application in the security device.
  • the processor is further configured to mark the status of the application as a recoverable state for presentation to the user through the management interface, so that the user can reinstall the application when needed.
  • the transmitter is further configured to send a second instruction to the security device, where the second instruction is used to instruct the security device to increase available storage space, and the added storage space is not greater than the storage space occupied by the application in the security device.
  • the receiver is further configured to receive a second response of the security device, and the second response is used to confirm that the security device increases available storage space, and further solves the problem that the storage space available to the user of the security device is insufficient.
  • the backup is implemented in the TEE environment, and the backed up executable load file or the encrypted executable load file is presented through the management interface, and the integrity data of the corresponding encrypted executable load file is recorded in the security device, and the protection is protected. User's data information.
  • the receiver is further configured to receive a restore installation request, and the restore installation request includes attribute information of the application.
  • the processor is further configured to determine, according to the attribute information of the application, identifier information that stores a user data packet corresponding to the attribute information of the application.
  • the transmitter is further configured to send a fourth instruction to the security device, the fourth instruction includes attribute information of the application and an ELF, and the fourth instruction is used to instruct the security device to install the application.
  • the receiver is further configured to receive a fourth response sent by the security device, and the fourth response is used to confirm that the application has been successfully installed.
  • the OTA channel is used for application installation. Instead, the executable file is obtained from the TEE of the terminal, which improves security and facilitates quick and easy recovery and installation.
  • the transmitter is further configured to send a fifth instruction to the security device, where the fifth instruction is used to instruct the security device to obtain state information of the available storage space.
  • the receiver is further configured to receive a fifth response sent by the security device, and the fifth response is used to indicate that the status information of the available storage space is sufficient.
  • the transmitter is further configured to send a sixth instruction to the security device, where the sixth instruction includes attribute information of the application.
  • the sixth instruction is used to instruct the security device to personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the content management device receives a sixth response sent by the security device, and the sixth response is used to confirm that the security device has completed personalization of the application, thereby completing a personalized recovery installation of the application.
  • the transmitter is further configured to send a sixth instruction to the security device, where the sixth instruction may include identification information of the user data packet of the application.
  • the sixth instruction is used to instruct the security device to personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the content management device receives a sixth response sent by the security device, and the sixth response is used to confirm that the security device successfully performs personalization of the application, thereby completing a personalized recovery installation of the application.
  • the processor is also used to mark the status of the application as available.
  • the device can include: a receiver, a processor, a storage, and a transmitter.
  • the receiver is configured to receive a first instruction sent by the content management device, where the first instruction includes attribute information of an application installed in the security device, and the first instruction is used to instruct the processor to uninstall the application.
  • the processor is configured to obtain a user data packet of the application according to the attribute information of the application.
  • the storage is used to store the user data packets for the application.
  • the processor is further configured to configure identification information of the user data packet according to the user data packet.
  • the processor is further configured to uninstall the application according to the attribute information of the application by the security device.
  • the processor is further configured to establish a mapping relationship between the identifier information of the user data packet and the attribute information of the application, so that the storage is stored, and the user ensures that the user can be localized from the terminal after uninstalling the application. It is convenient for users to reinstall the uninstalled application.
  • the receiver is further configured to receive a third instruction sent by the content management device, where the third instruction includes applying attribute information of the corresponding executable load file ELF, and the third instruction is used to instruct the security device to return the ELF.
  • the processor is further configured to obtain the encrypted ELF and the attribute information of the application according to the attribute information of the ELF.
  • the transmitter is further configured to send a third response to the content management device, where the third response includes the ELF and the attribute information of the application, so that the content management device can be executable after the application is installed without increasing the available storage space of the security device.
  • the ELF may be an encrypted ELF
  • the processor is further configured to obtain a first hash value of the encrypted ELF.
  • the storage is also used to store the first hash value.
  • the processor is further configured to establish a mapping relationship between the first hash value and the attribute information of the application, so that the user reinstalls the application when needed.
  • the application installation is performed by not relying on the unstable OTA channel between the server terminals, but the executable loading file is obtained from the TEE (including the content management device) of the terminal, thereby improving security and realizing convenient and quick recovery installation.
  • the receiver is further configured to receive a fourth instruction sent by the content management device, where the fourth instruction includes the attribute information of the application and the encrypted ELF, and the fourth instruction is used to instruct the processor to install the application.
  • the processor is further configured to obtain a second hash value of the encrypted ELF.
  • the processor is further configured to obtain the stored first hash value according to the attribute information of the application, and match the stored first hash value with the calculated hash value.
  • the processor decrypts the encrypted ELF, acquires the ELF, and installs the application according to the ELF.
  • the transmitter is further configured to send a fourth response to the content management device, where the fourth response is used to notify the content management device that the application is successfully installed.
  • the receiver is further configured to receive a fifth instruction sent by the content management device.
  • the processor 810 is further configured to acquire state information of an available storage space of the security device according to the fifth instruction.
  • the transmitter is further configured to send the available fifth response to the content management device when the status information of the available storage space of the security device is sufficient.
  • the receiver is further configured to receive a sixth instruction sent by the content management apparatus, where the sixth instruction includes the attribute information of the application and the identification information of the user data packet corresponding to the application.
  • the processor is further configured to: personalize the application corresponding to the attribute information of the application according to the user data packet corresponding to the identification information of the user data packet.
  • the sender is further configured to send a sixth response to the content management device to notify the processor to complete the personalization of the application, and complete a personalized recovery installation of the application.
  • the receiver is further configured to receive a sixth instruction sent by the content management device, where the sixth instruction includes attribute information of the application.
  • the processor is further configured to obtain, according to the mapping relationship between the stored identification information of the user data packet and the attribute information of the application, the identification information of the user data packet of the application, and according to the user data packet corresponding to the identification information of the user data packet, The application to be restored corresponding to the attribute information of the application is personalized.
  • the transmitter is further configured to send a sixth response to the content management device, where the sixth response is used to notify the security device to complete the personalization of the application, thereby confirming that the security device successfully performs personalization of the application, and completes personalized recovery of the application. installation.
  • the above aspects of the present application reduce the dependence of the application on the server in the security device by backing up the program code in a secure environment, and improve the flexibility of the application in the security device by using the terminal. And reduce server pressure (reloading applications without the need to connect to a trusted service manager (TSM)), while extending the available storage space of the security device through a trusted excution environment (TEE). It is convenient to implement the installation and uninstallation of the application in the security device, and the management of the storage space available in the security device, so that the security device with limited storage space can accommodate more applications.
  • TSM trusted service manager
  • TEE trusted excution environment
  • FIG. 1 is a schematic structural diagram of a system according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of still another method for managing an application in a security unit SE according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a security device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another content management apparatus according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of another security device according to an embodiment of the present invention.
  • the TSM Agent can be an application in the REE. It can also be an application in TEE.
  • the TSM Agent and the SE, and the Mgt agent and the SE can communicate through a secure channel. Among them, the content transmitted through the secure channel is encrypted.
  • the content management agent is a trusted application in the TEE, or a trusted operating system (operating system, Part of OS).
  • TEE and SE can be connected through serial peripheral interface (SPI) or universal asynchronous receiver/transmitter (UART), and can also be connected through single wire protocol (SWP) interface.
  • SPI serial peripheral interface
  • UART universal asynchronous receiver/transmitter
  • SWP single wire protocol
  • the present application relates to a hardware configuration of a terminal that needs to have both TEE and SE, and can implement SE storage management functions in the TEE.
  • the terminal may be a user equipment (UE), such as a mobile phone, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a tablet computer.
  • UE user equipment
  • SIP session initiation protocol
  • WLL wireless local loop
  • PDA personal digital assistant
  • handheld device with wireless communication function computing device, vehicle communication module, M2M device, smart watch, mobile station (MS), mobile terminal (mobile terminal), computer , microcomputer, etc., this application is not limited thereto.
  • the SE storage management function can be implemented through a TEE operating system (TEE OS) or a trusted application (TA).
  • TEE OS TEE operating system
  • TA trusted application
  • the TSM Agent sends a content management command or a content management script to the SE through the secure channel established by the TSM Agent and the SE in the REE or TEE, and the SE executes the content management command;
  • the Mgt Agent can pass the TSM.
  • the Agent obtains a content management command or a content management script from the SE; the Mgt Agent can also directly establish a secure channel with the SE, thereby directly obtaining a content management command or a content management script in the SE.
  • the content management script includes at least one content management command, which is an application protocol data unit (APDU) defined by the GPCS.
  • APDU application protocol data unit
  • the Mgt Agent caches the executable load file (ELF) of the card application in the TEE, and monitors the available storage space of the SE.
  • the card application may be a short-range wireless communication technology. (near field communication, NFC) payment applications (such as virtual bank card applications, bus card applications, etc.), access card applications, membership card applications, security domain applications, or other card applications in security units.
  • NFC near field communication
  • the terminal saves the user data of the card application to be uninstalled in the SE according to the usage of the SE memory space or the user selection, and simultaneously uninstalls the card application to release the space occupied by the card application and the space reserved for the card application. Make it available storage space.
  • the terminal When the user needs the card application again (recovering the installed card application), the terminal does not need to connect to the TSM server, and can directly install the card application to the SE through the ELF saved in the TEE, and utilize the user data paired in the SE.
  • the application is personalized to install the already uninstalled card application and restore it to its pre-uninstall state in a convenient and quick way.
  • the terminal or the user can set the minimum available storage space amount M of the SE (M is greater than zero), set the maximum number of loaded card applications N (N is a natural number), and provide the migration (or uninstall). )
  • M is greater than zero
  • N is a natural number
  • the card application is collectively referred to as an application below.
  • the application implements the management of the application in the SE in the three stages of installing the application, uninstalling the application, and reinstalling the application, and backing up the encrypted ELF and the application attribute information in the TEE on the terminal side, and backing up the user data in the SE. It reduces the dependence on the TSM server when managing the application in the SE, expands the available space of the SE, realizes the installation, uninstallation and management of the available storage space of the SE card application, and makes the reloading card application convenient and quick.
  • FIG. 2 is a flowchart of a method for managing an application in a security unit SE according to an embodiment of the present invention. As shown in Figure 2, The method can include:
  • Step 210 The content management device acquires attribute information of an executable load file of an application installed in the security device.
  • the content management device may be the content management agent (Mgt Agent) described above, and the security device may be the security unit (SE) described above.
  • the Mgt Agent obtains attribute information of an executable load file corresponding to an application installed in the SE.
  • the application may be an NFC payment application, wherein the attribute information of the executable load file may be identification information of the executable load file, such as AID1.
  • the SE sends an installation notification message to the Mgt Agent, where the installation notification message may include attribute information of the executable loading file, to instruct the Mgt Agent to perform the following steps in the embodiment to perform an executable corresponding to an application installed in the SE. Load the file for backup and save.
  • the terminal transmits the selected attribute information of the application (such as the application identification information AID2) to the Mgt Agent, and the Mgt Agent can obtain the attribute information according to the application.
  • the attribute information of the corresponding ELF may also send a query message to the SE to obtain the attribute information of the ELF.
  • the security device may further obtain the encrypted executable load file according to the attribute information of the executable load file.
  • the SE can also obtain the digital signature by signing the encrypted executable load file to ensure the integrity of the ELF.
  • the digital signature can be generated by the SE using the private key of the asymmetric key generated by the SE to ensure the integrity of the ELF.
  • Step 240 The security device sends a third response to the content management device, where the third response includes the executable load file and the attribute information of the application corresponding to the executable load file.
  • the third response may further include attribute information of the encrypted executable executable file and the application corresponding to the executable load file.
  • the SE maps the first hash value of the encrypted executable load file to the attribute information of the application, and stores the mapping relationship.
  • the third response may be a response to a data command.
  • Step 250 The content management apparatus backs up and saves the attribute information of the executable loading file and the application corresponding to the executable loading file.
  • the response to the data request may further include only the executable load file or the encrypted executable load file, and then the security unit sends the attribute information (AID2) of the application corresponding to the executable load file to the content management agent.
  • AID2 attribute information
  • the executable file or the encrypted executable file and the attribute information of the application corresponding to the executable load file may also be backed up in the trusted storage area of the TEE stored outside the content management agent, when the content management agent When the encrypted executable executable file and/or the attribute information of the application corresponding to the executable load file are required, the content management agent reads from the storage area.
  • the Mgt Agent may directly send a third instruction to the SE or to a specific security domain in the SE, and obtain a third response; or the Mgt Agent may forward the third instruction to the SE through the TSM Agent, so that the Mgt Agent passes the TSM.
  • the Agent obtains a third response, causing the Mgt Agent to communicate with a particular security domain in the SE.
  • the ELF allows the Mgt Agent to send an INSTALL[for load] command to a specific security domain for reinstalling an application to the secure domain, and the Mgt Agent backs up the encrypted ELF of the application.
  • the INSTALL[for load] command sent by the Mgt Agent is defined in the embodiment of the present invention, and is used to send an executable load file from the terminal TEE to the SE and instruct the SE to install the application by using the ELF.
  • FIG. 3 is a flowchart of another method for managing an application in a security unit SE according to an embodiment of the present invention. As described in FIG. 3, the method can include:
  • Step 310 The content management device acquires attribute information of the application to be uninstalled.
  • the content management device may be a content management agent (Mgt Agent) as described above.
  • the application to be uninstalled is an application already installed in the SE, such as an NFC payment application.
  • M is a SE preset or a minimum available storage space value set by the user
  • the Mgt Agent is based on the frequency of use of at least one application installed in the SE and/or The last used time, the at least one application whose frequency is lower than the preset threshold frequency value or the last used time distance exceeds the preset threshold time value is determined as the application to be uninstalled, and the Mgt Agent obtains the attribute information of the application, or
  • the uninstall request may include attribute information of the application, so that the Mgt Agent acquires attribute information of the application to be uninstalled.
  • Step 320 The content management apparatus determines, according to the attribute information of the application to be uninstalled, that the encrypted executable load file corresponding to the attribute information of the application is stored.
  • the content management agent searches for the attribute information of the application to be uninstalled in the attribute information of the at least one application that is backed up in step 250. If it does not exist, it indicates that the application has not been installed before, and the uninstall operation is refused; if yes, the execution is performed. Step 330.
  • Step 330 The content management apparatus sends a first instruction to the security apparatus, where the first instruction includes attribute information of the application to be uninstalled, and the first instruction is used to instruct the SE to uninstall the application.
  • the security device may be a security unit (SE) as described above.
  • SE security unit
  • the first instruction can be an unload instruction, such as a DELETE instruction defined by the GPCS.
  • the NFC payment application As an example, that is, install an NFC payment application for the first time in the SE, and use the NFC payment application and point of sale (point of sale, Before the POS) terminal conducts the transaction, the user needs to perform data configuration or personalization of the NFC payment application through the TSM Agent, that is, the TSM Agent configures personal data, such as a token and a card key, into the NFC payment application, wherein
  • the virtual account (Token) is obtained by submitting the personal account number (PAN) of the real card owned by the user to the Token server, the cardholder information, the expiration date and other necessary information, and the Token server is issued by the debit.
  • PAN personal account number
  • the security unit After the security unit receives the first instruction, the security unit acquires a user data packet of the application according to the attribute information (AID2) of the application included in the first instruction, where the user data packet includes all data configured in the application personalization process, For example, for an NFC payment application, including Token, expiration date, and card key, and storing and storing user data packets of the application.
  • the security unit can configure the identification information of the user data packet according to the user data packet of the application.
  • the security unit backs up and stores the obtained user data packet, protects the user data packet by using the key of the original associated security domain or the user password PIN, and saves it in the current associated security domain or a dedicated data backup security domain, and configures
  • the identifier information of the user data packet where the identifier information may be an identifier generated by the SE according to the attribute information of the application and the backup time, or may be a hash value of the user data packet.
  • the security unit uninstalls the application to be uninstalled to release the space occupied by the application to be uninstalled and adjust the available storage space of the security unit. If the EL of the application to be uninstalled is saved in the SE, the SE deletes the ELF.
  • the SE sends a first response to the Mgt Agent, which may be an unload response to indicate that the application to be uninstalled has been successfully uninstalled.
  • the uninstalled application is an NFC payment application.
  • the Mgt Agent sends a second instruction to the SE, and the SE increases the available storage space of the M according to the second instruction, where M is not more than the number of bytes of available storage space that the NFC payment should occupy.
  • the SE sends a second response to the Mgt Agent, which may be to adjust the available storage space response to notify the Mgt Agent that the SE increases the available storage space, such as increasing the available storage space of the M.
  • the foregoing embodiment of the present invention releases the available storage space in the SE by uninstalling the application, and saves the user data corresponding to the application in the SE, thereby ensuring the security of the user data, and setting the identification information of the user data packet and the executable loading.
  • the association of files provides convenience for users to reinstall the application.
  • FIG. 4 is a flowchart of still another method for managing an application in a security unit SE according to an embodiment of the present invention. As shown in FIG. 4, the method may include:
  • Step 420 The content management device determines, according to the attribute information of the application to be restored, identifier information of the user data packet corresponding to the attribute information of the application to be restored.
  • the content management agent searches for the attribute information of the application to be restored. If yes, step 430 is performed. If not, the application to be restored is required to be a new application. The server downloads the installation and refuses to restore it locally.
  • the content management agent acquires, according to the attribute information of the application to be restored, the executable load file stored by the content management agent and stored by the step 250 and stored by the step 250.
  • the content management agent may send a fifth instruction to the security unit, so that the security unit sends a fifth response to the content management agent according to the fifth instruction, so that the content management agent acquires state information of the available storage space.
  • the fifth instruction can be an available storage space query instruction.
  • the security unit sends an uninstall instruction to the content management agent, and step 310 is performed to obtain the available storage space.
  • the security unit sends a fifth response to the content management agent, and the fifth response may be an available storage space sufficient response.
  • the security unit matches the first hash value stored above with the second hash value. If the matching is successful, step 450 is performed; if the matching is unsuccessful, the security unit returns a reject installation instruction to the content management agent to indicate that the device is to be restored.
  • the application has been tampered with, and prompts the Mgt Agent to delete the cached ELF, or prompts that the hash values are inconsistent, there is a risk, and the user decides whether to continue the installation.
  • the security domain associated with the application to be restored is simultaneously uninstalled during the uninstallation process shown in FIG. 2, then The stage needs to install SD first and then install the application.
  • Step 450 The security device sends a fourth response to the content management device, where the fourth response is used to confirm that the application has been successfully installed.
  • the security unit decrypts the encrypted ELF according to the stored corresponding key, acquires the ELF, and associates the application to the security domain according to the ELF installation application. The security unit then sends an installation response to the content management agent.
  • the SE obtains the attribute information of the application to be restored according to the mapping relationship between the identification information of the user data packet stored in the step 360 and the attribute information of the application;
  • the sixth instruction may include attribute information of the application to be restored.
  • the SE obtains the identification information of the user data packet of the application to be restored according to the mapping relationship between the identification information of the user data packet and the attribute information of the application stored in step 360;
  • the SE personalizes the application to be restored corresponding to the attribute information of the application to be restored according to the user data packet corresponding to the identification information of the user data packet.
  • the SE personalizes the application to be restored corresponding to the attribute information of the application to be restored according to the user data packet corresponding to the identification information of the user data packet.
  • the SE sends a sixth response to the content management agent to inform the SE that the personalization of the application is completed.
  • the content management agent marks the status of the application as available.
  • the foregoing embodiment of the present invention selects an executable loading file (or a program installation package) from the TEE of the terminal by using an unstable OTA channel between the server terminals, and selects the user data to be applied by the SE. Recovering and personalizing the recovery, improving the flexibility and security of the application in the management SE, and implementing a convenient and quick recovery installation method.
  • the present application backs up the user data in the security device by backing up the program code in the security environment, reduces the dependence of the application on the server in the management security device, and improves the utilization of the terminal management.
  • the flexibility of the application in the security device and the reduction of server pressure (removing the application without the need to connect to the TSM), while extending the available storage space of the security device through TEE. It is convenient to install and uninstall applications in the security device. And the management of the available storage space in the security device, so that the security device with limited storage space can accommodate more applications.
  • the embodiment of the present invention further provides a content management apparatus.
  • the apparatus may include: a processing unit 510, a sending unit 520, and a receiving unit 530.
  • the sending unit 520 is configured to send the first instruction to the security device, where the first instruction includes attribute information of the application, and the first instruction is used to instruct the security device to uninstall the application.
  • the receiving unit 530 is configured to receive the first response sent by the security device, where the first response includes the identification information of the user data packet of the application, and the first response is used to indicate that the security device has successfully uninstalled the application.
  • the user space available in the security device is released by uninstalling the installed application in the security device.
  • the processing unit 510 is further configured to establish a mapping relationship between the identifier information of the user data packet and the attribute information of the application. After the user uninstalls the application, it is ensured that the uninstalled application can be reinstalled locally from the terminal, which is convenient for the user.
  • the receiving unit 530 is further configured to receive a second response of the security device, where the second response is used to confirm that the security device increases the available storage space, and further solves the problem that the storage space available to the user of the security device is insufficient.
  • the device may further include a storage unit 540.
  • the processing unit 510 is further configured to acquire attribute information of the ELF corresponding to the application.
  • the receiving unit 530 is further configured to receive a third response sent by the security device, where the third response includes attribute information of the ELF and the application.
  • the storage unit 540 is configured to store the attribute information of the ELF and the application, so as to install the executable executable file or the encrypted executable load file and the attribute of the application on the basis of not increasing the storage space available to the security device.
  • the information is backed up in the TEE environment, and the backed up executable load file or the encrypted executable load file is presented through the management interface, and the integrity data of the corresponding encrypted executable load file is recorded in the security device.
  • the receiving unit 530 is further configured to receive a recovery installation request, where the recovery installation request includes attribute information of the application.
  • the processing unit 510 is further configured to determine, according to the attribute information of the application, identifier information that stores a user data packet corresponding to the attribute information of the application.
  • the sending unit 520 is further configured to send, to the security device, a fourth instruction, where the fourth instruction includes an attribute information of the application and an ELF, where the fourth instruction is used to instruct the security device to install the application.
  • the sending unit 520 is further configured to send, to the security device, a fifth instruction, where the fifth instruction is used to instruct the security device to acquire state information of the available storage space.
  • the sending unit 520 is further configured to send, to the security device, a sixth instruction, where the sixth instruction includes the attribute information of the application and the identifier information of the user data packet, where the sixth instruction is used to indicate the identification information of the security device according to the user data packet.
  • the sixth instruction includes the attribute information of the application and the identifier information of the user data packet, where the sixth instruction is used to indicate the identification information of the security device according to the user data packet.
  • Corresponding user data packet personalizing the application corresponding to the attribute information of the application.
  • processing unit 510 is further configured to mark the status of the application as an available state.
  • the functions of the functional units of the content management apparatus can be implemented by the steps of the foregoing embodiments in FIG. 2 to FIG. 4, and the specific implementation process can refer to the related description of the foregoing method embodiments, and details are not described herein.
  • the processing unit 620 is further configured to establish a mapping relationship between the identifier information of the user data packet and the attribute information of the application. After the user uninstalls the application, it is ensured that the uninstalled application can be reinstalled locally from the terminal, which is convenient for the user.
  • the processing unit 620 is further configured to increase an available storage space of the security device according to the second instruction, and increase the storage space.
  • the space is not greater than the storage space occupied by the application in the security device.
  • the receiving unit 610 is further configured to receive a third instruction sent by the content management apparatus, where the third instruction includes the attribute information of the corresponding executable load file ELF, and the third instruction is used to instruct the security device to return the ELF.
  • the content management device performs backup on the executable loading file or the encrypted executable loading file and the attribute information of the application in the TEE environment, without increasing the storage space available for the security device. And the backed up executable load file or the encrypted executable load file is presented through the management interface, and the integrity data of the corresponding encrypted executable load file is recorded in the security device.
  • the processing unit 620 is further configured to obtain the stored first hash value according to the attribute information of the application, and when the stored first hash value matches the second hash value, the processing unit 620 decrypts the encrypted ELF. , get the ELF, and install the app according to the ELF.
  • FIG. 7 is a schematic structural diagram of another content management apparatus according to an embodiment of the present invention.
  • the content management apparatus may include a receiver 710, a processor 720, a memory 730, a transmitter 740, and a management interface 750.
  • the transmitter 740 is further configured to send a second instruction to the security device, where the second instruction is used to indicate that the security device increases the available storage space, and the increased storage space is not greater than the storage space occupied by the application in the security device.
  • the processor 810 is further configured to configure identifier information of the user data packet according to the user data packet.
  • the user space available in the security device is released by uninstalling the installed application in the security device, thereby solving the problem that the available storage space of the user of the security device is insufficient, and the user data packet corresponding to the application is saved in the security device. Ensure the security of user data.
  • the processor 810 is further configured to acquire the attribute information of the ELF and the application according to the attribute information of the ELF.
  • the transmitter 820 is further configured to send a third response to the content management device, where the third response includes attribute information of the ELF and the application.
  • the application installation is performed by not relying on the unstable OTA channel between the server terminals, but the executable loading file is obtained from the TEE (including the content management device) of the terminal, thereby improving security and realizing quick and convenient recovery and installation. method.
  • the transmitter 820 is further configured to send a fourth response to the content management device, where the fourth response is used to notify the content management device that the application is successfully installed.
  • the transmitter 820 is further configured to send a sixth response to the content management device, where the sixth response is used to confirm that the processor 810 completes personalization of the application, thereby completing a personalized recovery installation of the application.
  • the present application reduces the dependence of the application on the server in the management security device by backing up the program code in a secure environment (such as a content management device) and backing up the user data in the security device.
  • a secure environment such as a content management device
  • server pressure removing the application without connecting to the TSM
  • TEE server pressure

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

一种管理安全装置中应用的方法和装置,该方法包括:内容管理装置获取安全装置中已安装的一个应用的属性信息,并根据应用的属性信息,确定存储有与该应用的属性信息对应的加密过的可执行加载文件;内容管理装置向安全装置发送第一指令,以指示安全装置卸载该应用,其中,第一指令包括该应用的属性信息;安全装置根据待卸载的应用的属性信息,获取待卸载的应用对应的用户数据包的标识信息;内容管理装置接收安全装置发送的第一应答,其中第一应答包括该应用的用户数据包的标识信息。通过卸载安全装置中已安装的应用,解决了安全装置的用户可用存储空间不足的问题,同时在安全装置中保留用户数据,确保了用户数据的安全;在内容管理装置中保存了被卸载应用的ELF,确保了可以从终端本地重新安装被卸载的应用。

Description

管理安全装置中应用的方法和装置 技术领域
本申请实施例涉及信息处理技术领域,尤其涉及一种对安全装置中应用的管理方法和装置。
背景技术
安全单元(secure element,SE)是实现移动支付业务的关键因素,它提供了一个具有防篡改(tamper resistant)能力的运行和存储环境以及密码学运算功能,可用于安装、运行支付卡应用和保存用户机密数据,如密钥、证书等,还可用于保存SE或设备敏感应用程序编程接口(device sensitive application programming interface)的访问控制规则(access rules)等。SE可以封装到通用集成电路卡(universal intergrated circuit card,UICC)里,然后安装到终端中,也可以封装为嵌入式安全单元(embedded secure element,eSE),然后焊接到终端的主板上,无论哪种封装形式,终端的中央处理单元(central processing unit,CPU)都可以和终端的SE进行通信。
针对SE中卡应用的管理(也称卡内容管理或SE内容管理),即SE中卡应用的安装、删除、个人化等操作,可以由可信应用管理服务器(trusted service manager,TSM)通过终端向SE发送内容管理命令或内容管理脚本,或者将SE中卡应用的安装脚本加密后和安装包(Android Package,APK)打包在一起,下载到终端中,在SE管理服务代理(SE management service device agent)控制下进行安装。依据现有的全球平台卡片规范(global platform card specification,GPCS),对于卡应用,安装到SE中,需要关联到一个安全域(security domain,SD)以便利用安全域提供的安全通道(secure channel)服务,这一要求带来了额外的空间占用;而支持存储管理特性的SE安装卡应用时,要利用预留内存(reserved memory)参数为卡应用预留存储资源,并利用存储配额(memory quota)参数为卡应用指定可扩展的存储空间,这种资源预留的管理方式导致卡应用占据了额外的空间,对SE空间利用率不高,加剧了SE空间的紧张。
发明内容
本发明实施例提供了一种对安全单元中应用的管理方法和装置。通过迁移(或称卸载)SE中的应用,解决了SE的用户可用存储空间不足的问题。
第一方面,提供了一种管理安全装置中应用的方法,该方法可以包括:内容管理装置获取安全装置中已安装的一个应用(如NFC支付应用)的属性信息。内容管理装置根据应用的属性信息,确定存储有与应用的属性信息对应的可执行加载文件ELF,以表明该应用在内容管理装置中已备份相应的ELF。内容管理装置向安全装置发送第一指令(或卸载指令),其中,第一指令包括应用的属性信息,第一指令用于指示安全装置卸载该应用。内容管理装置接收安全装置发送的第一应答,第一应答包括该应用的用户数据包的标识信 息,第一应答用于指示安全装置已成功卸载该应用。该方法通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间。
在一个可选的实现中,内容管理装置接收安全装置发送的第一应答之后,该方法还包括:内容管理装置建立用户数据包的标识信息与应用的属性信息的映射关系,并进行存储,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
在一个可选的实现中,内容管理装置接收安全装置发送的第一应答之后,该方法还包括:内容管理装置将应用的状态标记为可恢复状态,并通过管理界面呈现给用户,以方便用户在需要时重新安装该应用。
在一个可选的实现中,内容管理装置接收安全装置发送的第一应答之后,该方法还包括:内容管理装置向安全装置发送第二指令,第二指令用于指示安全装置增加可用存储空间,增加的存储空间不大于应用在安全装置中占用的存储空间。内容管理装置接收安全装置的第二应答,第二应答用于确认安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
在一个可选的实现中,内容管理装置获取安全装置中已安装的一个应用的属性信息之前,该方法还包括:内容管理装置获取应用对应的ELF的属性信息。内容管理装置向安全装置发送第三指令(或获取数据指令),第三指令包括ELF的属性信息,第三指令用于指示安全装置返回ELF。内容管理装置接收安全装置发送的第三应答,第三应答包括ELF和应用的属性信息。该方法通过内容管理装置存储ELF和应用的属性信息,实现在没有增加安全装置可用存储空间占用的基础上,对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现了备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据,保护了用户的数据信息。
在一个可选的实现中,内容管理装置接收安全装置发送的第一应答之后,该方法还包括:内容管理装置接收恢复安装请求,恢复安装请求可以包括应用的属性信息。内容管理装置根据应用的属性信息,确定存储有与应用的属性信息对应的用户数据包的标识信息,以确认该应用是曾卸载过的应用。内容管理装置向安全装置发送第四指令,第四指令可以包括应用的属性信息和ELF,第四指令用于指示安全装置安装该应用。内容管理装置接收安全装置发送的第四应答,第四应答用于确认该应用已安装成功。该方法通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
在一个可选的实现中,内容管理装置向安全装置发送第四指令之前,该方法还包括:内容管理装置向安全装置发送第五指令,第五指令用于指示安全装置获取可用存储空间的状态信息。内容管理装置接收安全装置发送的第五应答,第五应答用于指示可用存储空间的状态信息为充足。
在一个可选的实现中,内容管理装置接收安全装置发送的第四应答之后,该方法还包括:内容管理装置向安全装置发送第六指令,第六指令包括应用的属性信息和用户数据包的标识信息,第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。内容管理装置接收安全装置发送的第六应答, 第六应答用于确认安全装置成功执行应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,内容管理装置接收安全装置发送的第四应答之后,该方法还包括:内容管理装置向安全装置发送第六指令,第六指令包括该应用的属性信息。第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。内容管理装置接收安全装置发送的第六应答,第六应答用于确认安全装置完成了对该应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,安全装置向内容管理装置发送第四应答之后,该方法还包括:内容管理装置向安全装置发送第六指令,第六指令可以包括该应用的用户数据包的标识信息。第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。内容管理装置接收安全装置发送的第六应答,第六应答用于确认安全装置成功执行应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,所述内容管理装置接收安全装置发送的第六应答之后,该方法还包括:内容管理装置将应用的状态标记为可用状态。
第二方面,提供了另一种管理安全装置中应用的方法,安全装置接收内容管理装置发送的第一指令,第一指令包括安全装置中已安装的一个应用的属性信息,第一指令用于指示安全装置卸载应用。安全装置根据应用的属性信息,获取应用的用户数据包,该用户数据包包括应用个人化过程中配置的所有数据,并对应用的用户数据包进行存储。安全装置根据用户数据包,配置用户数据包的标识信息。安全装置根据应用的属性信息,卸载应用,已释放占用的存储空间。安全装置向内容管理装置发送第一应答,第一应答包括应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载应用。该方法通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间,解决了安全装置的用户可用存储空间不足的问题,同时在安全装置中保存了该应用对应的用户数据包,确保了用户数据的安全。
在一个可选的实现中,安全装置根据用户数据包,配置用户数据包的标识信息之后,该方法还包括:安全装置建立用户数据包的标识信息和应用的属性信息的映射关系,并进行存储,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
在一个可选的实现中,安全装置向内容管理装置发送第一应答之后,该方法还包括:安全装置接收内容管理装置发送的第二指令。安全装置根据第二指令,增加安全装置的可用存储空间,增加的存储空间不大于应用在安全装置中占用的存储空间。安全装置向内容管理装置发送第二应答,第二应答用于通知内容管理装置安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
在一个可选的实现中,安全装置接收内容管理装置发送的第一指令之前,该方法还包括:安全装置接收内容管理装置发送的第三指令,第三指令包括应用对应的可执行加载文件ELF的属性信息,所述第三指令用于指示安全装置返回ELF。安全装置根据ELF的属性信息,获取ELF和应用的属性信息。安全装置向内容管理装置发送第三应答,第三应答包括ELF和应用的属性信息。以在没有增加安全装置可用存储空间占用的基础上,使内容管 理装置对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据,保护了用户的数据信息。
在一个可选的实现中,安全装置向内容管理装置发送第三应答之前,该方法还包括:ELF为加密过的ELF,安全装置获取加密过的ELF的第一哈希值。安全装置对第一哈希值进行存储。安全装置建立第一哈希值与应用的属性信息的映射关系,以便用户在需要时重新安装该应用。该方法通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE(包括内容管理装置)中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
在一个可选的实现中,安全装置向内容管理装置发送第一应答之后,该方法还包括:安全装置接收内容管理装置发送的第四指令,第四指令包括应用的属性信息和加密过的ELF,第四指令用于指示安全装置安装该应用。安全装置获取加密过的ELF的第二哈希值。安全装置根据应用的属性信息,获取存储的第一哈希值。当存储的第一哈希值与第二哈希值匹配时,安全装置对加密过的ELF进行解密,获取ELF。安全装置根据ELF,安装应用。之后,安全装置向内容管理装置发送第四应答,以通知内容管理装置应用安装成功。
在一个可选的实现中,安全装置接收内容管理装置发送的第四指令之前,该方法还包括:安全装置接收内容管理装置发送的第五指令。安全装置根据第五指令,获取安全装置的可用存储空间的状态信息。当安全装置的可用存储空间的状态信息为充足时,安全装置向内容管理装置发送第五应答。
在一个可选的实现中,安全装置向内容管理装置发送第四应答之后,该方法还包括:安全装置接收内容管理装置发送的第六指令,第六指令包括应用的属性信息和应用对应的用户数据包的标识信息。安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。安全装置向内容管理装置发送第六应答,以通知安全装置完成了对应用的个人化,从而确认安全装置成功执行应用的个人化,完成对该应用进行个人化的恢复安装。
在一个可选的实现中,安全装置向内容管理装置发送第四应答之后,该方法还包括:安全装置接收内容管理装置发送的第六指令,第六指令包括该应用的属性信息。安全装置根据存储的用户数据包的标识信息和应用的属性信息的映射关系,获取该应用的用户数据包的标识信息,并根据用户数据包的标识信息对应的用户数据包,对该应用的属性信息对应的待恢复的应用进行个人化。安全装置向内容管理装置发送第六应答,第六应答用于确认安全装置完成了对应用的个人化,从而确认安全装置成功执行应用的个人化,完成对该应用进行个人化的恢复安装。
在一个可选的实现中,安全装置向内容管理装置发送第四应答之后,该方法还包括:安全装置接收内容管理装置发送的第六指令,第六指令可以包括该应用的用户数据包的标识信息。处理器根据存储的用户数据包的标识信息和应用的属性信息的映射关系,获取该应用的属性信息,并根据用户数据包的标识信息对应的用户数据包,对待恢复的应用的属性信息对应的待恢复的应用进行个人化,从而确认安全装置成功执行应用的个人化,完成对该应用进行个人化的恢复安装。
第三方面,提供了一种内容管理装置,该内容管理装置具有实现上述方法实际中内容管理装置行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第四方面,提供了一种安全装置,该安全装置具有实现上述方法实际中安全装置行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
第五方面,提供了另一种内容管理装置,该装置可以包括:处理器、发送器、接收器和储存器。处理器用于获取安全装置中已安装的一个应用的属性信息,并根据该应用的属性信息,确定存储有与该应用的属性信息对应的可执行加载文件ELF。发送器用于向安全装置发送第一指令,其中,第一指令包括该应用的属性信息,第一指令用于指示安全装置卸载该应用。接收器用于接收安全装置发送的第一应答,第一应答包括应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载该应用。通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间。
在一个可选的实现中,处理器还用于建立用户数据包的标识信息与该应用的属性信息的映射关系,并进行存储,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
在一个可选的实现中,处理器还用于将该应用的状态标记为可恢复状态,以通过管理界面呈现给用户,方便用户在需要时重新安装该应用。
在一个可选的实现中,发送器还用于向安全装置发送第二指令,第二指令用于指示安全装置增加可用存储空间,增加的存储空间不大于该应用在安全装置中占用的存储空间。接收器还用于接收安全装置的第二应答,第二应答用于确认安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
在一个可选的实现中,处理器还用于获取该应用对应的ELF的属性信息。发送器还用于向安全装置发送第三指令,第三指令包括ELF的属性信息,第三指令用于指示安全装置返回ELF。接收器还用于接收安全装置发送的第三应答,第三应答包括ELF和应用的属性信息。存储器用于存储ELF和应用的属性信息,并通过管理界面向用户呈现应用的属性信息。通过内容管理装置存储ELF和应用的属性信息,实现在没有增加安全装置可用存储空间占用的基础上,对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现了备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据,保护了用户的数据信息。
在一个可选的实现中,接收器还用于接收恢复安装请求,恢复安装请求包括该应用的属性信息。处理器还用于根据该应用的属性信息,确定存储有与该应用的属性信息对应的用户数据包的标识信息。发送器还用于向安全装置发送第四指令,第四指令包括应用的属性信息和ELF,第四指令用于指示安全装置安装该应用。接收器还用于接收安全装置发送的第四应答,第四应答用于确认该应用已安装成功。通过不依赖于服务器终端间不稳定 OTA通道进行应用安装,而是通过从终端的TEE中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
在一个可选的实现中,发送器还用于向安全装置发送第五指令,第五指令用于指示安全装置获取可用存储空间的状态信息。接收器还用于接收安全装置发送的第五应答,第五应答用于指示可用存储空间的状态信息为充足。
在一个可选的实现中,发送器还用于向安全装置发送第六指令,第六指令包括应用的属性信息和用户数据包的标识信息,第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对该应用的属性信息对应的该应用进行个人化。接收器还用于接收安全装置发送的第六应答,第六应答用于确认安全装置完成了对该应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,发送器还用于向安全装置发送第六指令,第六指令包括该应用的属性信息。第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。内容管理装置接收安全装置发送的第六应答,第六应答用于确认安全装置完成了对该应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,发送器还用于向安全装置发送第六指令,第六指令可以包括该应用的用户数据包的标识信息。第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。内容管理装置接收安全装置发送的第六应答,第六应答用于确认安全装置成功执行应用的个人化,从而完成对该应用进行个人化的恢复安装。
在一个可选的实现中,处理器还用于将该应用的状态标记为可用状态。
第六方面,提供了另一种安全装置,该装置可以包括:接收器、处理器、储存器和发送器。接收器用于接收内容管理装置发送的第一指令,第一指令包括安全装置中已安装的一个应用的属性信息,第一指令用于指示处理器卸载该应用。处理器用于根据该应用的属性信息,获取该应用的用户数据包。储存器用于并对该应用的用户数据包进行存储。处理器还用于根据用户数据包,配置用户数据包的标识信息。处理器还用于安全装置根据应用的属性信息,卸载该应用。发送器用于向内容管理装置发送第一应答,第一应答包括该应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载该应用。通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间,解决了安全装置的用户可用存储空间不足的问题,同时在安全装置中保存了该应用对应的用户数据包,确保了用户数据的安全。
在一个可选的实现中,处理器还用于建立用户数据包的标识信息和应用的属性信息的映射关系,以使储存器进行存储,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第二指令。处理器还用于根据第二指令,增加安全装置的可用存储空间,增加的存储空间不大于应用在安全装置中占用的存储空间。发送器还用于向内容管理装置发送第二应答,第二应答用于通知内容管理装置安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不 足的问题。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第三指令,第三指令包括应用对应的可执行加载文件ELF的属性信息,第三指令用于指示安全装置返回ELF。处理器还用于根据ELF的属性信息,获取加密过的ELF和应用的属性信息。发送器还用于向内容管理装置发送第三应答,第三应答包括ELF和应用的属性信息,以在没有增加安全装置可用存储空间占用的基础上,使内容管理装置对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据,保护了用户的数据信息。
在一个可选的实现中,ELF可以是加密过的ELF,处理器还用于获取加密过的ELF的第一哈希值。储存器还用于对该第一哈希值进行存储。处理器还用于建立第一哈希值与应用的属性信息的映射关系,以便用户在需要时重新安装该应用。通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE(包括内容管理装置)中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第四指令,第四指令包括应用的属性信息和加密过的ELF,第四指令用于指示处理器安装该应用。处理器还用于获取加密过的ELF的第二哈希值。处理器还用于根据应用的属性信息,获取存储的第一哈希值,并将存储第一哈希值与计算出的哈希值进行匹配。当存储的第一哈希值与第二哈希值匹配时,处理器对加密过的ELF进行解密,获取ELF,并根据ELF,安装该应用。发送器还用于向内容管理装置发送第四应答,第四应答用于通知内容管理装置该应用安装成功。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第五指令。处理器810,还用于根据第五指令,获取安全装置的可用存储空间的状态信息。发送器还用于当安全装置的可用存储空间的状态信息为充足时,向内容管理装置发送可用第五应答。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第六指令,第六指令包括应用的属性信息和应用对应的用户数据包的标识信息。处理器还用于根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。发送器还用于向内容管理装置发送第六应答,以通知处理器完成了对应用的个人化,完成对该应用进行个人化的恢复安装。
在一个可选的实现中,接收器还用于接收内容管理装置发送的第六指令,第六指令包括该应用的属性信息。处理器还用于根据存储的用户数据包的标识信息和应用的属性信息的映射关系,获取该应用的用户数据包的标识信息,并根据用户数据包的标识信息对应的用户数据包,对该应用的属性信息对应的待恢复的应用进行个人化。发送器还用于向内容管理装置发送第六应答,第六应答用于通知安全装置完成了对应用的个人化,从而确认安全装置成功执行应用的个人化,完成对该应用进行个人化的恢复安装。
在一个可选的实现中,接收器还用于安全装置接收内容管理装置发送的第六指令,第六指令可以包括该应用的用户数据包的标识信息。处理器根据存储的用户数据包的标识信息和应用的属性信息的映射关系,获取该应用的属性信息,并根据用户数据包的标识信息对应的用户数据包,对待恢复的应用的属性信息对应的待恢复的应用进行个人化,从而确认安全装置成功执行应用的个人化,完成对该应用进行个人化的恢复安装。
第七方面,提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述第一方面或第二方面所述的方法。
第八方面,提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机程序,该程序被处理器执行时实现上述第一方面或第二方面所述的方法。
由此可知,本申请上述各方面通过在安全环境中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接可信应用管理服务器(trusted service manager,TSM)),同时通过可信执行环境(trusted excution environment,TEE)扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载,以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
附图说明
图1为本发明实施例提供的一种系统架构图;
图2为本发明实施例提供的一种对安全单元SE中应用的安装的方法流程图;
图3为本发明实施例提供的另一种管理安全单元SE中应用的方法流程图;
图4为本发明实施例提供的再一种管理安全单元SE中应用的方法流程图;
图5为本发明实施例提供的一种内容管理装置的结构示意图;
图6为本发明实施例提供的一种安全装置的结构示意图;
图7为本发明实施例提供的另一种内容管理装置的结构示意图;
图8为本发明实施例提供的另一种安全装置的结构示意图。
具体实施方式
下面通过附图和实施例,对本申请的技术方案做进一步的详细描述。
本申请提供的管理SE中应用的方法可以应用在图1所示的系统中。如图1所示,该系统可以包括服务器和终端。服务器可以包括可信应用管理服务器(trusted service manager,TSM)。终端可以包括富执行环境(rich execution environment,REE)、可信执行环境(trusted excution environment,TEE)和安全单元SE。其中,富执行环境可以是安卓操作环境,TEE中可以包括SE内容管理代理(management agent/Mgt agent)、卡应用代码存储单元(executable load file storage/ELF Storage)和卡应用管理界面(management UI/Mgt UI)。TSM Agent是终端中为TSM和SE之间通信服务的实体,TSM Agent可以存在于REE中,也可以存在于TEE中(如图1所示),也就是说,TSM Agent可以是REE中的应用也可以是TEE中的应用。TSM Agent与SE之间,以及Mgt agent与SE之间均可通过安全通道(secure channel)进行通信。其中,通过该安全通道传输的内容都是加密过的。内容管理代理是TEE中一个可信应用,或可信操作系统(operating system, OS)的一部分。
TEE和SE之间可以通过串行外设接口(serial peripheral interface,SPI)或通用异步收发传输接口(universal asynchronous receiver/transmitter,UART)连接,还可通过单线协议(single wire protocol,SWP)接口连接。
本申请涉及终端的硬件配置需要同时具有TEE和SE,并且可以在TEE中实现SE存储管理功能。该终端可以是用户设备(user equipment,UE),如移动电话、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、平板电脑、个人数字助手(personal digital assistant,PDA)、具备无线通信功能的手持设备、计算设备、车载通信模块、M2M设备,智能手表、移动台(mobile station,MS)、移动终端(mobile terminal),计算机,微机等等,本申请对此并不限定。
进一步的,在TEE中可以通过TEE操作系统(TEE OS)或可信应用(trusted applications,TA)来实现SE存储管理功能。终端对SE进行卡应用管理时,通过位于REE或TEE中的TSM Agent与SE建立的安全通道,TSM Agent将内容管理命令或内容管理脚本发送给SE,SE执行内容管理命令;Mgt Agent可通过TSM Agent从SE获得内容管理命令或内容管理脚本;Mgt Agent还可直接与SE建立安全通道,从而直接获得SE中的内容管理命令或内容管理脚本。内容管理脚本包含至少一条内容管理命令,所述内容管理命令是GPCS定义的应用协议数据单元(application protocol data unit,APDU)。
在终端上安装卡应用时,Mgt Agent在TEE中缓存该卡应用的可执行加载文件(executable load file,ELF),并监控SE可用存储空间使用状况,其中,卡应用可以是近距离无线通讯技术(near field communication,NFC)支付应用(如虚拟银行卡应用、公交卡应用等)、门禁卡应用、会员卡应用、安全域应用,或其他的安全单元中的卡应用。终端根据SE内存空间的使用情况或者用户选择,将待卸载的卡应用的用户数据保存于SE中,同时卸载该卡应用,以将该卡应用占用空间和预留给该卡应用的空间释放,使之成为可用存储空间。当用户再次需要该卡应用(恢复安装已经卸载的卡应用)时,此时终端无需连接TSM服务器,可直接通过TEE中保存的ELF向SE安装卡应用,并利用SE中备份的用户数据对卡应用进行个人化(personal ization),从而以方便快捷的方式安装已经卸载过的卡应用并恢复成卸载前的状态。
需要说明的是,终端或用户可以根据需要,设定SE的最小可用存储空间剩余量M(M大于零)、设定最多加载的卡应用数N(N为自然数)和提供迁出(或卸载)卡应用的功能。其中,下面将卡应用统称为应用。
本申请在安装应用、卸载应用与重安装应用的三个阶段实现了对SE中应用的管理,通过在终端侧的TEE中备份加密后的ELF和应用的属性信息,以及在SE中备份用户数据,减少了管理SE中的应用时对TSM服务器的依赖,扩展了SE可用的空间,实现了SE中卡应用的安装、卸载和可用存储空间的管理,同时使重装卡应用变得方便快捷。
下面针对安装卡应用、卸载卡应用和重安装卡应用三个过程对SE中卡应用的管理方法进行详细描述。
图2为本发明实施例提供的一种管理安全单元SE中应用的方法流程图。如图2所述, 该方法可以包括:
步骤210、内容管理装置获取安全装置中已安装的一个应用的可执行加载文件的属性信息。
其中,内容管理装置可以是前文所述的内容管理代理(Mgt Agent),安全装置可以是前文所述的安全单元(SE)。Mgt Agent获取SE中已安装的一个应用对应的可执行加载文件的属性信息。该应用可以是NFC支付应用,其中,可执行加载文件的属性信息可以是该可执行加载文件的标识信息,如AID1。
具体的,Mgt Agent可以通过以下方式获取SE中已安装的一个应用对应的可执行加载文件的属性信息:
方式一,TSM Agent在向SE发送内容管理脚本时,检测到内容管理脚本中包含安装指令,如INSTALL[for load]指令;当TSM Agent接收到SE发送的INSTALL[for load]指令的应答,确认该指令执行状态为成功时,TSM Agent向Mgt Agent发送安装通知消息,该安装通知消息可以包括从INSTALL[for load]指令中获得的可执行加载文件的属性信息,以指示Mgt Agent执行本实施例下面的步骤对SE中已安装的一个应用对应的可执行加载文件进行备份保存。这里的INSTALL[for load]指令是GPCS定义的。
方式二,SE直接向Mgt Agent发送安装通知消息,该安装通知消息可以包括可执行加载文件的属性信息,以指示Mgt Agent执行本实施例下面的步骤对SE中已安装的一个应用对应的可执行加载文件进行备份保存。
方式三,当TSM Agent向SE发送内容管理脚本,SE成功的执行内容管理脚本,完成一个应用的安装时,SE将脚本执行状态信息返回给TSM Agent,TSM Agent将内容管理脚本和脚本执行成功的状态信息发送给Mgt Agent,其中,内容管理脚本可以包括安装指令、ELF、ELF对应的应用的属性信息等,Mgt Agent从内容管理脚本和脚本执行状态信息中提取ELF的属性信息(如ELF的标识AID1)。在这一方式中,Mgt Agent还可以提取利用该ELF安装成功的应用的属性信息(如应用的标识信息AID2)。Mgt Agent还可从内容管理脚本中提取ELF,并保存于TEE中。
方式四,用户通过内容管理界面选中SE中已安装的一个应用时,终端将选中的该应用的属性信息(如应用的标识信息AID2)传给Mgt Agent,Mgt Agent可以根据应用的属性信息,获得其对应的ELF的属性信息,也可以向SE发送查询消息获得ELF的属性信息。
步骤220、内容管理装置向安全装置发送第三指令,第三指令包括可执行加载文件的属性信息。
第三指令可以是获取数据指令,如GET DATA指令。Mgt Agent可通过TSM Agent向SE发送获取数据指令,也可直接向SE发送获取数据指令。这里的GET DATA指令是本发明实施例定义的,GET DATA包含可执行加载文件的属性信息,用于指示SE返回可执行加载文件。
步骤230、安全装置根据可执行加载文件的属性信息,获取可执行加载文件和可执行加载文件对应的应用的属性信息。
SE收到获取数据指令后,查找与可执行加载文件的属性信息对应的可执行加载文件, 以及可执行加载文件对应的应用的属性信息,如AID2。例如,SE可通过查询SE中的GP注册表获得应用的属性信息对应的ELF,以及ELF对应的应用的属性信息。
可选地,安全装置根据可执行加载文件的属性信息,还可以获取加密过的可执行加载文件。
支持Java Card API的SE,具有密钥生成功能。SE调用其支持的Java Card API,生成加密密钥(如AES Key),利用加密密钥和加密算法对可执行加载文件进行加密处理,获取加密过的可执行加载文件。SE对加密过的可执行加载文件进行预设的哈希运算(例如,SHA256,SHA512等),获取加密过的可执行加载文件的第一哈希值,以保证可执行加载文件的完整性。最后,SE保存加密过的可执行加载文件的第一哈希值和加密密钥,并建立应用的属性信息和加密密钥的映射关系。其中,加密算法可以是利用对称密钥加密的DES、AES等算法,或RSA、ECC等利用非对称密钥进行加密的算法,也就是说该加密算法可以是SE支持的任一加密算法。
可以理解的是,SE还可以通过对加密过的可执行加载文件进行签名处理,获取数字签名来保证ELF的完整性。其中,该数字签名可以由SE利用SE生成的非对称密钥的私钥生成,以保证ELF的完整性。
步骤240、安全装置向内容管理装置发送第三应答,该第三应答包括可执行加载文件和可执行加载文件对应的应用的属性信息。
该第三应答还可以包括加密后的可执行加载文件和可执行加载文件对应的应用的属性信息。
在执行该步骤之前,SE将加密过的可执行加载文件的第一哈希值与该应用的属性信息建立映射关系,并存储该映射关系。
该第三应答可以是获取数据指令的应答。
步骤250、内容管理装置对可执行加载文件和可执行加载文件对应的应用的属性信息进行备份保存。
Mgt Agent提供管理界面(Mgt UI),Mgt Agent将接收到的可执行加载文件或加密过的可执行加载文件和对应的应用的属性信息添加到管理界面,通过该界面向用户呈现,以便用户在必要时利用存储的ELF重新安装应用。
可选地,获取数据指令的应答还可以只包括可执行加载文件或加密过的可执行加载文件,之后安全单元再向内容管理代理发送可执行加载文件对应的应用的属性信息(AID2)。
可选地,可执行加载文件或加密过的可执行加载文件和可执行加载文件对应的应用的属性信息还可以备份存储在内容管理代理之外的TEE的可信存储区域中,当内容管理代理需要加密过的可执行加载文件和/或可执行加载文件对应的应用的属性信息时,内容管理代理从该存储区域进行读取。
需要说明的是,Mgt Agent可直接向SE或向SE中特定的安全域发送第三指令,并获得第三应答;或者Mgt Agent可通过TSM Agent向SE转发第三指令,以使Mgt Agent通过TSM Agent获得第三应答,使得Mgt Agent与SE中特定的安全域通信。
TSM Agent向SE发送内容管理脚本时,可向SE添加一条访问控制规则,该访问控制 规则用于允许Mgt Agent访问SE中正在处理内容管理脚本的安全域(即ELF关联的安全域,也是内容管理脚本中要利用ELF安装的应用关联的安全域),这样,即使SE中不包含预设的访问控制规则,也可通过这种后添加的方式修改SE配置,使得Mgt Agent可与SE中特定的安全域通信,例如,允许Mgt Agent向特定的安全域发送GET DATA指令用于获得加密过的ELF;允许Mgt Agent向特定的安全域发送INSTALL[for load]指令,用于向安全域恢复安装一个应用,Mgt Agent备份了这个应用的加密过的ELF。注意,Mgt Agent发送的INSTALL[for load]指令是本发明实施例定义的,用于从终端TEE中向SE发送可执行加载文件并指示SE利用ELF安装应用。
本发明上述实施例在没有增加SE可用存储空间占用的基础上,对已安装到SE中的应用对应的可执行加载文件和该应用的属性信息在TEE环境中进行了备份,并且将备份的加密过的可执行加载文件通过管理界面呈现,同时在SE中记录了相应加密过的可执行加载文件的完整性数据。
图3为本发明实施例提供的另一种管理安全单元SE中应用的方法流程图。如图3所述,该方法可以包括:
步骤310、内容管理装置获取待卸载的应用的属性信息。
其中,内容管理装置可以是前文所述的内容管理代理(Mgt Agent)。待卸载的应用为SE中已安装的一个应用,如NFC支付应用。当Mgt Agent检测到SE的可用存储空间剩余量不足M(M为SE预设或用户设定的一个最低可用存储空间值)时,Mgt Agent依据SE中安装的至少一个应用的使用频率和/或上一次使用的时间,将至少一个使用频率低于预设门限频率值或上次使用时间距离现在超过预设门限时间值的应用确定为待卸载的应用,Mgt Agent获取该应用的属性信息,或者,当用户向Mgt Agent发送卸载请求时,该卸载请求可以包括应用的属性信息,从而Mgt Agent获取待卸载的应用的属性信息。
步骤320、内容管理装置根据待卸载的应用的属性信息,确定存储有与该应用的属性信息对应的加密过的可执行加载文件。
内容管理代理在步骤250中备份的至少一个应用的属性信息中,查找是否存在待卸载的应用的属性信息,若不存在,则表明该应用之前没有安装过,拒绝卸载操作;若存在,则执行步骤330。
步骤330、内容管理装置向安全装置发送第一指令,第一指令包括待卸载的应用的属性信息,第一指令用于指示SE卸载该应用。
其中,安全装置可以是前文所述的安全单元(SE)。
第一指令可以是卸载指令,如GPCS定义的DELETE指令。
步骤340、安全装置根据待卸载的应用的属性信息,获取待卸载的应用对应的用户数据包的标识信息。
在初次安装应用后,使用该应用进行交易之前,以NFC支付应用为例,也就是说,在向SE中首次安装某个NFC支付应用,并使用该NFC支付应用与销售点(point of sale, POS)终端进行交易之前,用户需要通过TSM Agent对该NFC支付应用进行数据配置,或个人化(personalization),即TSM Agent向NFC支付应用中配置个人数据,如token和卡片密钥等信息,其中,虚拟账号(Token)是通过向Token服务器提交用户拥有的一张真实卡片的账号信息(personal account number,PAN)、持卡人信息、有效期和其他必要信息获取到的,Token服务器由发行借记卡或信用卡的银行,或银行卡组织,如中国银联,维萨(Visa),万事达卡(Mastercard)等维护,为用户提供token服务;Token是保存于NFC支付应用中的一个标识,POS终端和POS终端连接的支付网络可依据Token追查到用户真实卡片的账号,完成扣费交易,卡片密钥是指至少一个用于向POS证明卡片是合法卡片的密钥。
在安全单元接收到第一指令后,安全单元根据第一指令中包括的应用的属性信息(AID2),获取该应用的用户数据包,该用户数据包包括应用个人化过程中配置的所有数据,例如,对NFC支付应用来说,包括Token、有效期和卡片密钥等,并对应用的用户数据包进行备份存储。安全单元可以根据应用的用户数据包,配置用户数据包的标识信息。或者,安全单元可以根据应用的属性信息和应用的用户数据包,配置用户数据包的标识信息,标识信息可以是利用应用的属性信息和备份时间生成的标识,例如,AID2-2017-05-05-14:50:55,以对该用户数据包进行标识。
安全单元对获取的用户数据包进行备份存储,利用原关联安全域的密钥或用户密码PIN对该用户数据包进行保护后,保存于当前关联安全域或专门的数据备份安全域中,并配置该用户数据包的标识信息,该标识信息可以是SE根据应用的属性信息和备份时间生成的标识,还可以是该用户数据包的哈希值。
进一步的,安全单元建立用户数据包的标识信息和应用的属性信息的映射关系,并对该映射关系进行存储。
安全单元根据步骤240中加密过的可执行加载文件的哈希值与应用的属性信息间的映射关系,可以获取到用户数据包的标识信息与相应加密过的可执行加载文件的哈希值间的映射关系。
可选地,安全单元也可以建立步骤230中加密过的可执行加载文件的哈希值与用户数据包的标识信息建立映射关系,并对该映射关系进行存储。
之后,安全单元对待卸载的应用进行卸载,以释放待卸载的应用占用的空间,并调整安全单元的可用存储空间。若SE中保存了待卸载应用的ELF,则SE删除该ELF。
可选地,如果该待卸载的应用的关联安全域(security domain,SD)有缓存安全域的可执行加载文件,并且只关联了待卸载的应用,则安全单元可启动安全域清理,备份安全域用户数据后,卸载安全域并调整为安全域预留的空间。
步骤350、安全装置向内容管理装置发送第一应答,第一应答包括用户数据包的标识信息。
SE向Mgt Agent发送第一应答,该第一应答可以是卸载应答,以指示该待卸载的应用已被成功卸载。
可选地,成功卸载该应用后,Mgt Agent向SE发送第二指令,其中,第二指令可以 是调整存储空间指令,以指示SE增加可用存储空间,且增加的存储空间不大于卸载的该应用在SE中占用的存储空间。SE收到该指令后,调整SE的可用存储空间。
在一个例子中,卸载的该应用为NFC支付应用。Mgt Agent向SE发送第二指令,SE根据第二指令,增加M的可用存储空间,M为不大于NFC支付应占用的可用存储空间的字节数。
SE向Mgt Agent发送第二应答,该第二应答可以是调整可用存储空间应答,以通知Mgt Agent,SE增加了可用存储空间,如增加了M的可用存储空间。
可选地,安全单元将用户数据包的标识信息与在安装应用过程中SE保存的待卸载的应用对应的哈希值(步骤230中保存的哈希值)建立映射进行关联,即建立用户数据包的标识信息与待卸载的应用对应的哈希值的映射关系。待卸载的应用对应的哈希值,为安装待卸载应用过程中,对该应用的ELF进行加密后再对加密过的ELF进行预设哈希运算得到的哈希值。
步骤360、内容管理装置建立用户数据包的标识信息与待卸载的应用的属性信息的映射关系。
Mgt Agent接收和保存第一应答中包含的用户数据包的标识信息,并建立用户数据包的标识信息与步骤250存储的该应用的属性信息的映射关系,并将该映射关系保存到位于TEE中的可恢复应用列表中,该可恢复应用列表可通过界面向用户呈现(即用户通过UI界面可查询到哪些应用可恢复),也就是说,Mgt Agent通过应用的属性信息,可以查询到与应用的属性信息有映射关系的用户数据包的标识信息,以及ELF或加密过的ELF。
可选地,内容管理代理将该应用标记为可恢复状态,并通过UI呈现给用户,以便用户在需要时恢复安装该应用。
本发明上述实施例通过卸载应用释放了SE中可用存储空间,同时在SE中保存了该应用对应的用户数据,确保了用户数据的安全,并通过设定用户数据包的标识信息与可执行加载文件的关联关系,为用户重新安装该应用提供了便利。
图4为本发明实施例提供的再一种管理安全单元SE中应用的方法流程图。如图4所示,该方法可以包括:
步骤410、内容管理装置接收恢复安装请求,恢复安装请求包括应用的属性信息(AID2)。
Mgt Agent可以接收用户通过管理界面(Mgt UI)发送的恢复应用请求,该恢复应用请求可以包括待恢复的应用的属性信息(AID2)。该应用可以是NFC支付应用。
步骤420、内容管理装置根据待恢复的应用的属性信息,确定存储有与该待恢复的应用的属性信息对应的用户数据包的标识信息。
内容管理代理在步骤250中备份的应用的属性信息中,查找是否存在待恢复的应用的属性信息,若存在,则执行步骤430,若不存在,则指示待恢复的应用为新应用需要通过TSM服务器下载安装,拒绝从本地恢复。
步骤430、内容管理装置向安全装置发送第四指令,第四指令可以包括待恢复的应用的属性信息和该应用对应的加密过的可执行加载文件。
可选地,第四指令可以包括待恢复的应用的属性信息和该应用对应的可执行加载文件。
第四指令可以是安装指令,如INSTALL[for load]指令,以指示SE对该应用进行恢复安装。注意,这里的INSTALL[for load]指令是本申请实施例定义的,用于从终端TEE向SE加载可执行加载文件ELF,并指示SE利用ELF恢复安装应用。
内容管理代理根据待恢复的应用的属性信息,获取内容管理代理存储的与该应用对应的由步骤250存储的加密过的可执行加载文件。
可选地,内容管理代理根据待恢复的应用的属性信息,获取内容管理代理存储的与该应用对应的由步骤250存储的可执行加载文件。
内容管理代理向安全单元发送ISNTALL[for load]指令,该INSTALL[for load]指令可以包括待恢复的应用的属性信息和该应用对应的加密过的可执行加载文件,或者,该指令可以包括待恢复的应用的属性信息和该应用对应的可执行加载文件。
该INSTALL[for load]指令还可以包括待恢复的应用要关联的SD的标识信息,以使SE将接收的待恢复的应用的属性信息和加密过的可执行加载文件存储到SD的标识信息对应的可用存储空间中进行安装。或者,
在内容管理代理向安全单元发送INSTALL[for load]之前,内容管理代理可以向安全单元发送本发明实施例定义的INSTALL[for restore],该指令可以包括待恢复的应用对应的加密过的ELF的属性信息和SD的标识信息,用于指示SE将后续收到的ELF关联到制定的安全域。之后,内容管理代理向安全单元发送INSTALL[for load]指令,用于将加密过的可执行加载文件存储到SD的标识信息对应的可用存储空间中进行安装。
可选地,在执行该步骤之前,内容管理代理可以向安全单元发送第五指令,以使安全单元根据第五指令向内容管理代理发送第五应答,使得内容管理代理获取可用存储空间的状态信息。该第五指令可以是可用存储空间查询指令。
当内容管理代理根据第五应答确定状态信息为不足时,安全单元向内容管理代理发送卸载指令,执行步骤310以获取可用存储空间。
当内容管理代理根据第五应答确定状态信息为充足时,安全单元向内容管理代理发送第五应答,第五应答可以是可用存储空间充足应答。
步骤440、安全装置将存储的加密过的可执行加载文件的第一哈希值与接收的加密过的可执行加载文件的第二哈希值进行匹配。
安全单元根据待恢复的应用的属性信息,获取在步骤230中存储的加密过的可执行加载文件的第一哈希值,同时对接收的加密过的可执行加载文件进行预设的哈希运算(例如,SHA256等),获取第二哈希值。
安全单元将上述存储的第一哈希值与第二哈希值进行匹配,若匹配成功,则执行步骤450;若匹配不成功,则安全单元向内容管理代理返回拒绝安装指令,以指示待恢复应用已被篡改,并提示Mgt Agent删除缓存的ELF,或者,提示两者哈希值不一致,存在风险,由用户决定是否继续安装。
可选地,如果在图2所示的卸载过程中同时卸载了待恢复应用关联的安全域,则在此 阶段需要先安装SD,再对该应用进行安装。
如果步骤430中第四指令包括的是待恢复的应用的属性信息和该应用对应的可执行加载文件,则可直接利用第四指令中的可执行加载文件进行应用安装而无需执行步骤440的完整性校验。
步骤450、安全装置向内容管理装置发送第四应答,第四应答用于确认应用已安装成功。
安全单元根据存储的相应密钥,对加密过的ELF进行解密,获取ELF,并根据ELF安装应用,将应用关联到安全域。之后,安全单元向内容管理代理发送安装应答。
如果步骤430中第四指令包括的是待恢复的应用的属性信息和该应用对应的可执行加载文件,则可直接利用第四指令中的可执行加载文件进行应用安装,并向内容管理代理发送安装应答。
在执行该步骤之后,内容管理代理可以向安全单元发送第六指令,该第六指令可以是个人化指令。
其中,第六指令可以包括待恢复的应用的用户数据包的标识信息。
SE根据步骤360存储的用户数据包的标识信息和应用的属性信息的映射关系,获取待恢复的应用的属性信息;
SE根据用户数据包的标识信息对应的用户数据包,对待恢复的应用的属性信息对应的待恢复的应用进行个人化。
或者,第六指令可以包括待恢复的应用的属性信息。
SE根据步骤360存储的用户数据包的标识信息和应用的属性信息的映射关系,获取待恢复的应用的用户数据包的标识信息;
SE根据用户数据包的标识信息对应的用户数据包,对待恢复的应用的属性信息对应的待恢复的应用进行个人化。
或者,第六指令可以包括待恢复的应用的属性信息和待恢复的应用的用户数据包的标识信息;
SE根据用户数据包的标识信息对应的用户数据包,对待恢复的应用的属性信息对应的待恢复的应用进行个人化。
SE向内容管理代理发送第六应答,以通知SE完成了对该应用的个人化。
可选地,内容管理代理将该应用的状态标记为可用状态。
本发明上述实施例通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是选择从终端的TEE中获取可执行加载文件(或称程序安装包),并利用SE保存的用户数据对应用进行恢复安装和个人化,提高了管理SE中应用的灵活性和安全性,实现了方便快捷的恢复安装方法。
从上述安装、卸载、卸载后安装的实施例可知,本申请通过在安全环境中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接TSM),同时通过TEE扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载, 以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
本发明实施例还提供一种内容管理装置,如图5所示,该装置可以包括:处理单元510、发送单元520和接收单元530。
处理单元510,用于获取安全装置中已安装的一个应用的属性信息,并根据该应用的属性信息,确定存储有与该应用的属性信息对应的可执行加载文件ELF。
发送单元520,用于向安全装置发送第一指令,其中,第一指令包括该应用的属性信息,第一指令用于指示安全装置卸载该应用。
接收单元530,用于接收安全装置发送的第一应答,第一应答包括应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载该应用。通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间。
可选地,处理单元510,还用于建立用户数据包的标识信息与该应用的属性信息的映射关系。为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
可选地,处理单元510,还用于将该应用的状态标记为可恢复状态,以便用户在需要时重新安装该应用。
可选地,发送单元520,还用于向安全装置发送第二指令,第二指令用于指示安全装置增加可用存储空间,增加的存储空间不大于该应用在安全装置中占用的存储空间。
接收单元530,还用于接收安全装置的第二应答,第二应答用于确认安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
可选地,该装置还可以包括存储单元540。处理单元510,还用于获取该应用对应的ELF的属性信息。
发送单元520,还用于向安全装置发送第三指令,第三指令包括ELF的属性信息,第三指令用于指示安全装置返回ELF。
接收单元530,还用于接收安全装置发送的第三应答,第三应答包括ELF和应用的属性信息。
存储单元540,用于存储ELF和应用的属性信息,从而在没有增加安全装置可用存储空间占用的基础上,对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现了备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据。
可选地,接收单元530,还用于接收恢复安装请求,恢复安装请求包括该应用的属性信息。
处理单元510,还用于根据该应用的属性信息,确定存储有与该应用的属性信息对应的用户数据包的标识信息。
发送单元520,还用于向安全装置发送第四指令,第四指令包括应用的属性信息和的ELF,第四指令用于指示安全装置安装该应用。
接收单元530,还用于接收安全装置发送的第四应答,第四应答用于确认该应用已 安装成功。由此通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
可选地,发送单元520,还用于向安全装置发送第五指令,第五指令用于指示安全装置获取可用存储空间的状态信息。
接收单元530,还用于接收安全装置发送的第五应答,第五应答用于指示可用存储空间的状态信息为充足。
可选地,发送单元520,还用于向安全装置发送第六指令,第六指令包括应用的属性信息和用户数据包的标识信息,第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对该应用的属性信息对应的该应用进行个人化。
接收单元530,还用于接收安全装置发送的第六应答,以确认安全装置完成了对该应用的个人化,从而完成对该应用的个人化恢复安装。
可选地,处理单元510,还用于将该应用的状态标记为可用状态。
该内容管理装置的各功能单元的功能,可以通过上述图2-图4中实施例的各步骤来实现,其具体实现过程可以参照上述方法实施例的相关描述,在此不复赘述。
从上述安装、卸载、卸载后安装的实施例可知,本申请通过在安全环境(如内容管理装置)中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接TSM),同时通过TEE扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载,以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
本发明实施例还提供一种安全装置,如图6所示,该装置可以包括:接收单元610、处理单元620、存储单元630和发送单元640。
接收单元610,用于接收内容管理装置发送的第一指令,第一指令包括安全装置中已安装的一个应用的属性信息,第一指令用于指示处理单元620卸载该应用。
处理单元620,用于根据该应用的属性信息,获取该应用的用户数据包。
存储单元630,用于对该应用的用户数据包进行存储。处理单元620,还用于根据用户数据包,配置用户数据包的标识信息。
处理单元620,还用于根据应用的属性信息,卸载该应用。
发送单元640,用于向内容管理装置发送第一应答,第一应答包括该应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载该应用。
通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间,解决了安全装置的用户可用存储空间不足的问题,同时在安全装置中保存了该应用对应的用户数据包,确保了用户数据的安全。
可选地,处理单元620,还用于建立用户数据包的标识信息和应用的属性信息的映射关系。为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
可选地,接收单元610,还用于接收内容管理装置发送的第二指令。
处理单元620,还用于根据第二指令,增加安全装置的可用存储空间,增加的存储空 间不大于应用在安全装置中占用的存储空间。
发送单元640,还用于向内容管理装置发送第二应答,第二应答用于通知内容管理装置安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
可选地,接收单元610,还用于接收内容管理装置发送的第三指令,第三指令包括应用对应的可执行加载文件ELF的属性信息,第三指令用于指示安全装置返回ELF。
处理单元620,还用于根据ELF的属性信息,获取加密过的ELF和应用的属性信息。
发送单元640,还用于向内容管理装置发送第三应答,第三应答包括ELF和应用的属性信息。
由此,在没有增加安全装置可用存储空间占用的基础上,使内容管理装置对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据。
可选地,ELF可以是加密过的ELF,处理单元620,还用于获取加密过的ELF的第一哈希值。
存储单元630,还用于对该第一哈希值进行存储。
处理单元620,还用于建立第一哈希值与应用的属性信息的映射关系,并存储到存储单元630中。
由此,通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE(包括内容管理装置)中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装方法。
可选地,接收单元610,还用于接收内容管理装置发送的第四指令,第四指令包括应用的属性信息和加密过的ELF,第四指令用于指示处理单元620安装该应用。
处理单元620,还用于获取加密过的ELF的第二哈希值。
处理单元620,还用于根据应用的属性信息,获取存储的第一哈希值,并当存储的第一哈希值与第二哈希值匹配时,处理单元620对加密过的ELF进行解密,获取ELF,并根据ELF,安装该应用。
发送单元640,还用于向内容管理装置发送第四应答,第四应答用于通知内容管理装置该应用安装成功。
可选地,接收单元610,还用于接收内容管理装置发送的第五指令。
处理单元620,还用于根据第五指令,获取安全装置的可用存储空间的状态信息。
发送单元640还用于当安全装置的可用存储空间的状态信息为充足时,向内容管理装置发送可用第五应答。
可选地,接收单元610,还用于接收内容管理装置发送的第六指令,第六指令包括应用的属性信息和应用对应的用户数据包的标识信息。
处理单元620,还用于根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。
发送单元640,还用于向内容管理装置发送第六应答,第六应答用于通知处理单元620 完成了对应用的个人化,从而完成对该应用的个人化恢复安装。
该安全装置的各功能单元的功能,可以通过上述图2-图4中实施例的各步骤来实现,其具体实现过程可以参照上述方法实施例的相关描述,在此不复赘述。
从上述安装、卸载、卸载后安装的实施例可知,本申请通过在安全环境(如内容管理装置)中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接TSM),同时通过TEE扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载,以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
图7为本发明实施例提供的另一种内容管理装置的结构示意图。如图7所示,该内容管理装置可以包括:接收器710、处理器720、存储器730、发送器740和管理界面750。
处理器720可以是中央处理器(central process ing unit,CPU),或者CPU和硬件芯片的组合。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
存储器730用于存储各种应用,操作系统和数据。存储器730可以将存储的数据传输给处理器720。存储器730可以包括易失性存储器,例如非挥发性动态随机存取内存(nonvolatile random access memory,NVRAM)、相变化随机存取内存(phase change RAM,PRAM)、磁阻式随机存取内存(magetoresistive RAM,MRAM)等,还可以包括非易失性存储器,例如至少一个磁盘存储器件、电子可擦除可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、闪存器件,例如反或闪存(NOR flash memory)或是反及闪存(NAND flash memory)、半导体器件,例如固态硬盘(solid state disk,SSD)等。存储器730还可以包括上述种类的存储器的组合。
可以理解的是,存储器730可以集成在处理器720中,也可以独立存在。
管理界面750,用于向用户呈现应用的属性信息。
各器件的工作过程如下:
处理器720,用于获取安全装置中已安装的一个应用的属性信息,并根据该应用的属性信息,确定存储有与该应用的属性信息对应的可执行加载文件ELF。
发送器740,用于向安全装置发送第一指令,其中,第一指令包括该应用的属性信息,第一指令用于指示安全装置卸载该应用。
接收器710,用于接收安全装置发送的第一应答,第一应答包括应用的用户数据包的标识信息,第一应答用于指示安全装置已成功卸载该应用。
通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间。
可选地,处理器720,还用于建立用户数据包的标识信息与该应用的属性信息的映射关系,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
可选地,处理器720,还用于将该应用的状态标记为可恢复状态,以便用户在需要时重新安装该应用。
可选地,发送器740,还用于向安全装置发送第二指令,第二指令用于指示安全装置增加可用存储空间,增加的存储空间不大于该应用在安全装置中占用的存储空间。
接收器710,还用于接收安全装置的第二应答,第二应答用于确认安全装置增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
可选地,处理器720,还用于获取该应用对应的ELF的属性信息。
发送器740,还用于向安全装置发送第三指令,第三指令包括ELF的属性信息,第三指令用于指示安全装置返回ELF。
接收器710,还用于接收安全装置发送的第三应答,第三应答包括ELF和应用的属性信息。
存储器730,用于存储ELF和应用的属性信息,并通过管理界面750向用户呈现应用的属性信息。
由此,可以在没有增加安全装置可用存储空间占用的基础上,对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现了备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据。
可选地,接收器710,还用于接收恢复安装请求,恢复安装请求包括该应用的属性信息。
处理器720,还用于根据该应用的属性信息,确定存储有与该应用的属性信息对应的用户数据包的标识信息。
发送器740,还用于向安全装置发送第四指令,第四指令包括应用的属性信息和ELF,第四指令用于指示安全装置安装该应用。
接收器710,还用于接收安全装置发送的第四应答,第四应答用于确认该应用已安装成功。
由此通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装。
可选地,发送器740,还用于向安全装置发送第五指令,第五指令用于指示安全装置获取可用存储空间的状态信息。
接收器710,还用于接收安全装置发送的第五应答,第五应答用于指示可用存储空间的状态信息为充足。
可选地,发送器740,还用于向安全装置发送第六指令,第六指令包括应用的属性信息和用户数据包的标识信息,第六指令用于指示安全装置根据用户数据包的标识信息对应的用户数据包,对该应用的属性信息对应的该应用进行个人化。
接收器710,还用于接收安全装置发送的第六应答,第六应答用于确认安全装置完成了对该应用的个人化,从而完成对该应用的个人化恢复安装。
可选地,处理器720,还用于将该应用的状态标记为可用状态。
该安全装置的各功能单元的功能,可以通过上述图2-图4中实施例的各步骤来实现,其具体实现过程可以参照上述方法实施例的相关描述,故在此不复赘述。
从上述安装、卸载、卸载后安装的实施例可知,本申请通过在安全环境(如内容管理装置)中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接TSM),同时通过TEE扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载,以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
图8为本发明实施例提供的另一种安全装置的结构示意图。如图8所示,该内容管理装置可以包括:处理器810、发送器820、接收器830和储存器840。
处理器810可以于前文所述的处理器720相同,也可以不同,在此不作限定。
存储器840用于存储各种应用,操作系统和数据。
存储器840可以将存储的数据传输给处理器810。存储器840可以与前文所述的存储器730相同,也可以不同,在此不作限定。
各器件的工作过程如下:
接收器830,用于接收内容管理装置发送的第一指令,第一指令包括该安全装置中已安装的一个应用的属性信息,第一指令用于指示处理器810卸载该应用。
处理器810,用于根据该应用的属性信息,获取该应用的用户数据包。
储存器840,用于对该应用的用户数据包进行存储。
处理器810,还用于根据用户数据包,配置用户数据包的标识信息,
并根据应用的属性信息,卸载该应用。
发送器820,用于向内容管理装置发送第一应答,第一应答包括该应用的用户数据包的标识信息,第一应答用于指示处理器810已成功卸载该应用。
由此,通过卸载安全装置中已安装的应用释放了安全装置中可用的用户空间,解决了安全装置的用户可用存储空间不足的问题,同时在安全装置中保存了该应用对应的用户数据包,确保了用户数据的安全。
可选地,处理器810,还用于建立用户数据包的标识信息和应用的属性信息的映射关系,为用户在卸载该应用后,确保了可以从终端本地重新安装被卸载的应用,即为用户提供了便利。
可选地,接收器830,还用于接收内容管理装置发送的第二指令。处理器810,还用于根据第二指令,增加安全装置的可用存储空间,增加的存储空间不大于应用在安全装置中占用的存储空间。发送器820,还用于向内容管理装置发送第二应答,第二应答用于通知内容管理装置,安全单元增加了可用存储空间,更进一步解决了安全装置的用户可用存储空间不足的问题。
可选地,接收器830,还用于接收内容管理装置发送的第三指令,第三指令包括应用对应的可执行加载文件ELF的属性信息,第三指令用于指示安全装置返回ELF。
处理器810,还用于根据ELF的属性信息,获取ELF和应用的属性信息。
发送器820,还用于向内容管理装置发送第三应答,第三应答包括ELF和应用的属性信息。
由此,可以在没有增加安全装置可用存储空间占用的基础上,使内容管理装置对应用安装后的可执行加载文件或加密过的可执行加载文件和该应用的属性信息在TEE环境中实现备份,并且将备份的可执行加载文件或加密过的可执行加载文件通过管理界面呈现,同时在安全装置中记录了相应加密过的可执行加载文件的完整性数据。
可选地,ELF为加密过的ELF,处理器810,还用于获取加密过的ELF的第一哈希值。
储存器840,还用于对该第一哈希值进行存储。处理器810,还用于建立第一哈希值与应用的属性信息的映射关系,并存储到存储单元630中。
由此,通过不依赖于服务器终端间不稳定OTA通道进行应用安装,而是通过从终端的TEE(包括内容管理装置)中获取可执行加载文件,提高了安全性,实现了方便快捷的恢复安装方法。
可选地,接收器830,还用于接收内容管理装置发送的第四指令,第四指令包括应用的属性信息和ELF,第四指令用于指示处理器810安装该应用。
处理器810,还用于获取接收到的加密过的ELF的第二哈希值。处理器810,还用于根据应用的属性信息,获取存储的第一哈希值。当所述存储的第一哈希值与所述第二哈希值匹配时,处理器810对加密过的ELF进行解密,获取ELF,并根据ELF,安装该应用。
发送器820,还用于向内容管理装置发送第四应答,第四应答用于通知内容管理装置该应用安装成功。
可选地,接收器830,还用于接收内容管理装置发送的第五指令。
处理器810,还用于根据第五指令,获取安全装置的可用存储空间的状态信息。
发送器820还用于当安全装置的可用存储空间的状态信息为充足时,向内容管理装置发送第五应答。
可选地,接收器830,还用于接收内容管理装置发送的第六指令,第六指令包括应用的属性信息和应用对应的用户数据包的标识信息。
处理器810,还用于根据用户数据包的标识信息对应的用户数据包,对应用的属性信息对应的应用进行个人化。
发送器820,还用于向内容管理装置发送第六应答,第六应答用于确认处理器810完成了对该应用的个人化,从而完成对该应用的个人化恢复安装。
该安全装置的各功能单元的功能,可以通过上述图2-图4中实施例的各步骤来实现,其具体实现过程可以参照上述方法实施例的相关描述,故在此不复赘述。
从上述安装、卸载、卸载后安装的实施例可知,本申请通过在安全环境(如内容管理装置)中备份程序代码,在安全装置中备份用户数据,减少了管理安全装置中应用对服务器的依赖,提高了利用终端管理安全装置中应用的灵活性,并降低服务器压力(重装应用时无需连接TSM),同时通过TEE扩展了安全装置可用存储空间。较便捷的实现了安全装置中应用的安装与卸载,以及对安全装置中可用存储空间的管理,使得可用存储空间有限的安全装置可容纳更多的应用。
在上述各个本发明实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机 程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读介质向另一个计算机可读介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(Digital Subscriber Line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(Solid State Disk,SSD))等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (53)

  1. 一种管理安全装置中应用的方法,其特征在于,所述方法包括:
    内容管理装置获取安全装置中已安装的一个应用的属性信息;
    所述内容管理装置根据所述应用的属性信息,确定存储有与所述应用的属性信息对应的可执行加载文件ELF;
    所述内容管理装置向所述安全装置发送第一指令,其中,所述第一指令包括所述应用的属性信息,所述第一指令用于指示所述安全装置卸载所述应用;
    所述内容管理装置接收所述安全装置发送的第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  2. 根据权利要求1所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第一应答之后,所述方法还包括:
    所述内容管理装置建立所述用户数据包的标识信息与所述应用的属性信息的映射关系。
  3. 根据权利要求1或2所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第一应答之后,所述方法还包括:
    所述内容管理装置将所述应用的状态标记为可恢复状态。
  4. 根据权利要求1或2所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第一应答之后,所述方法还包括:
    所述内容管理装置向所述安全装置发送第二指令,所述第二指令用于指示所述安全装置增加可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述内容管理装置接收所述安全装置的第二应答,所述第二应答用于确认所述安全装置增加了可用存储空间。
  5. 根据权利要求1所述的方法,其特征在于,所述内容管理装置获取安全装置中已安装的一个应用的属性信息之前,所述方法还包括:
    所述内容管理装置获取所述应用对应的ELF的属性信息;
    所述内容管理装置向所述安全装置发送第三指令,所述第三指令包括所述ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述内容管理装置接收所述安全装置发送的第三应答,所述第三应答包括所述ELF和所述应用的属性信息;
    所述内容管理装置存储所述ELF和所述应用的属性信息。
  6. 根据权利要求1所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第一应答之后,所述方法还包括:
    所述内容管理装置接收恢复安装请求,所述恢复安装请求包括所述应用的属性信息;
    所述内容管理装置根据所述应用的属性信息,确定存储有与所述应用的属性信息对应的用户数据包的标识信息;
    所述内容管理装置向所述安全装置发送第四指令,所述第四指令包括所述应用的属性信息和所述ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述内容管理装置接收所述安全装置发送的第四应答,所述第四应答用于确认所述应 用已安装成功。
  7. 根据权利要求6所述的方法,其特征在于,所述内容管理装置向所述安全装置发送第四指令之前,所述方法还包括:
    所述内容管理装置向所述安全装置发送第五指令,所述第五指令用于指示所述安全装置获取可用存储空间的状态信息;
    所述内容管理装置接收所述安全装置发送的第五应答,所述第五应答用于指示所述可用存储空间的状态信息为充足。
  8. 根据权利要求6或7所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第四应答之后,所述方法还包括:
    所述内容管理装置向所述安全装置发送第六指令,所述第六指令包括所述应用的属性信息和所述用户数据包的标识信息,所述第六指令用于指示所述安全装置根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述内容管理装置接收所述安全装置发送的第六应答,所述第六应答用于确认所述安全装置完成了对所述应用的个人化。
  9. 根据权利要求8所述的方法,其特征在于,所述内容管理装置接收所述安全装置发送的第六应答之后,所述方法还包括:
    所述内容管理装置将所述应用的状态标记为可用状态。
  10. 一种对安全装置中应用的管理方法,其特征在于,所述方法包括:
    安全装置接收内容管理装置发送的第一指令,所述第一指令包括所述安全装置中已安装的一个应用的属性信息,所述第一指令用于指示所述安全装置卸载所述应用;
    所述安全装置根据所述应用的属性信息,获取所述应用的用户数据包,并对所述应用的用户数据包进行存储;
    所述安全装置根据所述用户数据包,配置所述用户数据包的标识信息;
    所述安全装置根据所述应用的属性信息,卸载所述应用;
    所述安全装置向所述内容管理装置发送第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  11. 根据权利要求10所述的方法,其特征在于,所述安全装置根据所述用户数据包,配置所述用户数据包的标识信息之后,所述方法还包括:
    所述安全装置建立所述用户数据包的标识信息和所述应用的属性信息的映射关系。
  12. 根据权利要求11所述的方法,其特征在于,所述安全装置向所述内容管理装置发送第一应答之后,所述方法还包括:
    所述安全装置接收所述内容管理装置发送的第二指令;
    所述安全装置根据所述第二指令,增加所述安全装置的可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述安全装置向所述内容管理装置发送第二应答,所述第二应答用于通知所述内容管理装置所述安全装置增加了可用存储空间。
  13. 根据权利要求10所述的方法,其特征在于,所述安全装置接收内容管理装置发送的第一指令之前,所述方法还包括:
    所述安全装置接收所述内容管理装置发送的第三指令,所述第三指令包括所述应用对应的可执行加载文件ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述安全装置根据所述ELF的属性信息,获取所述ELF和所述应用的属性信息;
    所述安全装置向所述内容管理装置发送第三应答,所述第三应答包括所述ELF和所述应用的属性信息。
  14. 根据权利要求13所述的方法,其特征在于,所述安全装置向所述内容管理装置发送第三应答之前,所述方法还包括:
    所述ELF为加密过的ELF,所述安全装置获取所述加密过的ELF的第一哈希值;
    所述安全装置对所述第一哈希值进行存储;
    所述安全装置建立所述第一哈希值与所述应用的属性信息的映射关系。
  15. 根据权利要求14所述的方法,其特征在于,所述安全装置向所述内容管理装置发送第一应答之后,所述方法还包括:
    所述安全装置接收所述内容管理装置发送的第四指令,所述第四指令包括所述应用的属性信息和所述加密过的ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述安全装置获取所述加密过的ELF的第二哈希值;
    所述安全装置根据所述应用的属性信息,获取所述存储的第一哈希值;
    当所述存储的第一哈希值与所述第二哈希值匹配时,所述安全装置对所述加密过的ELF进行解密,获取所述ELF;
    所述安全装置根据所述ELF,安装所述应用;
    所述安全装置向所述内容管理装置发送第四应答,所述第四应答用于通知所述内容管理装置所述应用安装成功。
  16. 根据权利要求15所述的方法,其特征在于,所述安全装置接收所述内容管理装置发送的第四指令之前,所述方法还包括:
    所述安全装置接收所述内容管理装置发送的第五指令;
    所述安全装置根据所述第五指令,获取所述安全装置的可用存储空间的状态信息;
    当所述安全装置的可用存储空间的状态信息为充足时,所述安全装置向所述内容管理装置发送第五应答。
  17. 根据权利要求15或16所述的方法,其特征在于,所述安全装置向所述内容管理装置发送第四应答之后,所述方法还包括:
    所述安全装置接收所述内容管理装置发送的第六指令,所述第六指令包括所述应用的属性信息和所述应用对应的用户数据包的标识信息;
    所述安全装置根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述安全装置向所述内容管理装置发送第六应答,所述第六应答用于确认所述安全装置完成了对所述应用的个人化。
  18. 一种内容管理装置,其特征在于,所述装置包括:
    处理单元,用于获取安全装置中已安装的一个应用的属性信息;
    所述处理单元,还用于根据所述应用的属性信息,确定存储有与所述应用的属性信息 对应的可执行加载文件ELF;
    发送单元,用于向所述安全装置发送第一指令,其中,所述第一指令包括所述应用的属性信息,所述第一指令用于指示所述安全装置卸载所述应用;
    接收单元,用于接收所述安全装置发送的第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  19. 根据权利要求18所述的装置,其特征在于,
    所述处理单元,还用于建立所述用户数据包的标识信息与所述应用的属性信息的映射关系。
  20. 根据权利要求18或19所述的装置,其特征在于,
    所述处理单元,还用于将所述应用的状态标记为可恢复状态。
  21. 根据权利要求18或19所述的装置,其特征在于,
    所述发送单元,还用于向所述安全装置发送第二指令,所述第二指令用于指示所述安全装置增加可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述接收单元,还用于接收所述安全装置的第二应答,所述第二应答用于确认所述安全装置增加了可用存储空间。
  22. 根据权利要求18所述的装置,其特征在于,所述装置还包括存储单元;
    所述处理单元,还用于获取所述应用对应的ELF的属性信息;
    所述发送单元,还用于向所述安全装置发送第三指令,所述第三指令包括所述ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述接收单元,还用于接收所述安全装置发送的第三应答,所述第三应答包括所述ELF和所述应用的属性信息;
    所述存储单元,用于存储所述ELF和所述应用的属性信息。
  23. 根据权利要求18所述的装置,其特征在于,
    所述接收单元,还用于接收恢复安装请求,所述恢复安装请求包括所述应用的属性信息;
    所述处理单元,还用于根据所述应用的属性信息,确定存储有与所述应用的属性信息对应的用户数据包的标识信息;
    所述发送单元,还用于向所述安全装置发送第四指令,所述第四指令包括所述应用的属性信息和所述ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述接收单元,还用于接收所述安全装置发送的第四应答,所述第四应答用于确认所述应用已安装成功。
  24. 根据权利要求23所述的装置,其特征在于,
    所述发送单元,还用于向所述安全装置发送第五指令,所述第五指令用于指示所述安全装置获取可用存储空间的状态信息;
    所述接收单元,还用于接收所述安全装置发送的第五应答,所述第五应答用于指示所述可用存储空间的状态信息为充足。
  25. 根据权利要求23或24所述的装置,其特征在于,
    所述发送单元,还用于向所述安全装置发送第六指令,所述第六指令包括所述应用的 属性信息和所述用户数据包的标识信息,所述第六指令用于指示所述安全装置根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述接收单元,还用于接收所述安全装置发送的第六应答,所述第六应答用于确认所述安全装置完成了对所述应用的个人化。
  26. 根据权利要求25所述的装置,其特征在于,
    所述处理单元,还用于将所述应用的状态标记为可用状态。
  27. 一种安全装置,其特征在于,所述装置包括:
    接收单元,用于接收内容管理装置发送的第一指令,所述第一指令包括所述安全装置中已安装的一个应用的属性信息,所述第一指令用于指示所述安全装置卸载所述应用;
    处理单元,用于根据所述应用的属性信息,获取所述应用的用户数据包,
    存储单元,用于对所述应用的用户数据包进行存储;
    所述处理单元,还用于根据所述用户数据包,配置所述用户数据包的标识信息;
    所述处理单元,还用于根据所述应用的属性信息,卸载所述应用;
    发送单元,用于向所述内容管理装置发送第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  28. 根据权利要求27所述的装置,其特征在于,
    所述处理单元,还用于建立所述用户数据包的标识信息和所述应用的属性信息的映射关系。
  29. 根据权利要求28所述的装置,其特征在于,
    所述接收单元,还用于接收所述内容管理装置发送的第二指令;
    所述处理单元,还用于根据所述第二指令,增加所述安全装置的可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述发送单元,还用于向所述内容管理装置发送第二应答,所述第二应答用于通知所述内容管理装置所述安全装置增加了可用存储空间。
  30. 根据权利要求27所述的装置,其特征在于,
    所述接收单元,还用于接收所述内容管理装置发送的第三指令,所述第三指令包括所述应用对应的可执行加载文件ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述处理单元,还用于根据所述ELF的属性信息,获取所述ELF和所述应用的属性信息;
    所述发送单元,还用于向所述内容管理装置发送第三应答,所述第三应答包括所述ELF和所述应用的属性信息。
  31. 根据权利要求30所述的装置,其特征在于,所述ELF为加密过的ELF,
    所述处理单元,还用于获取所述加密过的ELF的第一哈希值;
    所述存储单元,还用于对所述第一哈希值进行存储;
    所述处理单元,还用于建立所述第一哈希值与所述应用的属性信息的映射关系。
  32. 根据权利要求31所述的装置,其特征在于,
    所述接收单元,还用于接收所述内容管理装置发送的第四指令,所述第四指令包括所述应用的属性信息和所述加密过的ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述处理单元,还用于对所述加密过的ELF进行预设的哈希运算,获取第二哈希值;
    所述处理单元,还用于获取所述存储的第一哈希值;
    所述处理单元,还用于当所述存储的第一哈希值与所述第二哈希值匹配时,对所述加密过的ELF进行解密,获取所述ELF;
    所述处理单元,还用于根据所述ELF,安装所述应用;
    所述发送单元,还用于向所述内容管理装置发送第四应答,所述第四应答用于通知所述内容管理装置所述应用安装成功。
  33. 根据权利要求32所述的装置,其特征在于,
    所述接收单元,还用于接收所述内容管理装置发送的第五指令;
    所述处理单元,还用于根据所述第五指令,获取所述安全装置的可用存储空间的状态信息;
    所述发送单元,还用于当所述安全装置的可用存储空间的状态信息为充足时,向所述内容管理装置发送第五应答。
  34. 根据权利要求32或33所述的装置,其特征在于,
    所述接收单元,还用于接收所述内容管理装置发送的第六指令,所述第六指令包括所述应用的属性信息和所述应用对应的用户数据包的标识信息;
    所述处理单元,还用于根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述发送单元,还用于向所述内容管理装置发送第六应答,所述第六应答用于确认所述处理单元完成了对所述应用的个人化。
  35. 一种内容管理装置,其特征在于,所述装置包括处理器、存储器、发送器和接收器;其中,
    所述处理器,用于获取安全装置中已安装的一个应用的属性信息;根据所述应用的属性信息,确定存储有与所述应用的属性信息对应的可执行加载文件ELF;
    所述发送器,用于向所述安全装置发送第一指令,其中,所述第一指令包括所述应用的属性信息,所述第一指令用于指示所述安全装置卸载所述应用;
    所述接收器,用于接收所述安全装置发送的第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  36. 根据权利要求35所述的装置,其特征在于,
    所述处理器,还用于建立所述用户数据包的标识信息与所述应用的属性信息的映射关系。
  37. 根据权利要求35或36所述的装置,其特征在于,
    所述处理器,还用于将所述应用的状态标记为可恢复状态。
  38. 根据权利要求35或36所述的装置,其特征在于,
    所述发送器,还用于向所述安全装置发送第二指令,所述第二指令用于指示所述安全 装置增加可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述接收器,还用于接收所述安全装置的第二应答,所述第二应答用于确认所述安全装置增加了可用存储空间。
  39. 根据权利要求35所述的装置,其特征在于,
    所述处理器,还用于获取所述应用对应的ELF的属性信息;
    所述发送器,还用于向所述安全装置发送第三指令,所述第三指令包括所述ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述接收器,还用于接收所述安全装置发送的第三应答,所述第三应答包括ELF和所述应用的属性信息;
    所述存储器,用于存储所述ELF和所述应用的属性信息。
  40. 根据权利要求35所述的装置,其特征在于,
    所述接收器,还用于接收恢复安装请求,所述恢复安装请求包括所述应用的属性信息;
    所述处理器,还用于根据所述应用的属性信息,确定存储有与所述应用的属性信息对应的用户数据包的标识信息;
    所述发送器,还用于向所述安全装置发送第四指令,所述第四指令包括所述应用的属性信息和所述ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述接收器,还用于接收所述安全装置发送的第四应答,所述第四应答用于确认所述应用已安装成功。
  41. 根据权利要求40所述的装置,其特征在于,
    所述发送器,还用于向所述安全装置发送第五指令,所述第五指令用于指示所述安全装置获取可用存储空间的状态信息;
    所述接收器,还用于接收所述安全装置发送的第五应答,所述第五应答用于指示所述可用存储空间的状态信息为充足。
  42. 根据权利要求40或41所述的装置,其特征在于,
    所述发送器,还用于向所述安全装置发送第六指令,所述第六指令包括所述应用的属性信息和所述用户数据包的标识信息,所述第六指令用于指示所述安全装置根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述接收器,还用于接收所述安全装置发送的第六应答,所述第六应答用于确认所述安全装置完成了对所述应用的个人化。
  43. 根据权利要求42所述的装置,其特征在于,
    所述处理器,还用于将所述应用的状态标记为可用状态。
  44. 一种安全装置,其特征在于,所述装置包括处理器、存储器、接收器和发送器;其中,
    所述接收器,用于接收内容管理装置发送的第一指令,所述第一指令包括安全装置中已安装的一个应用的属性信息,所述第一指令用于指示所述处理器卸载所述应用;
    所述处理器,用于根据所述应用的属性信息,获取所述应用的用户数据包,
    所述存储器,用于对所述应用的用户数据包进行存储;
    所述处理器,还用于根据所述用户数据包,配置所述用户数据包的标识信息;根据所述应用的属性信息,卸载所述应用;
    发送器,用于向所述内容管理装置发送第一应答,所述第一应答包括所述应用的用户数据包的标识信息,所述第一应答用于指示所述安全装置已成功卸载所述应用。
  45. 根据权利要求44所述的装置,其特征在于,
    所述处理器,还用于建立所述用户数据包的标识信息和所述应用的属性信息的映射关系。
  46. 根据权利要求45所述的装置,其特征在于,
    所述接收器,还用于接收所述内容管理装置发送的第二指令;
    所述处理器,还用于根据所述第二指令,增加所述安全装置的可用存储空间,所述增加的存储空间不大于所述应用在所述安全装置中占用的存储空间;
    所述发送器,还用于向所述内容管理装置发送第二应答,所述第二应答用于通知所述内容管理装置所述安全装置增加了可用存储空间。
  47. 根据权利要求44所述的装置,其特征在于,
    所述接收器,还用于接收所述内容管理装置发送的第三指令,所述第三指令包括所述应用对应的可执行加载文件ELF的属性信息,所述第三指令用于指示所述安全装置返回ELF;
    所述处理器,还用于根据所述ELF的属性信息,获取所述ELF和所述应用的属性信息;
    所述发送器,还用于向所述内容管理装置发送第三应答,所述第三应答包括所述ELF和所述应用的属性信息。
  48. 根据权利要求47所述的装置,其特征在于,所述ELF为加密过的ELF,
    所述处理器,还用于获取所述加密过的ELF的第一哈希值;
    所述存储器,还用于对所述第一哈希值进行存储;
    所述处理器,还用于建立所述第一哈希值与所述应用的属性信息的映射关系。
  49. 根据权利要求48所述的装置,其特征在于,
    所述接收器,还用于接收所述内容管理装置发送的第四指令,所述第四指令包括所述应用的属性信息和所述加密过的ELF,所述第四指令用于指示所述安全装置安装所述应用;
    所述处理器,还用于获取所述加密过的ELF的第二哈希值;
    根据所述应用的属性信息,获取所述存储的第一哈希值;
    所述处理器,还用于当所述存储的第一哈希值与所述第二哈希值匹配时,对所述加密过的ELF进行解密,获取所述ELF;
    所述处理器,还用于根据所述ELF,安装所述应用;
    所述发送器,还用于向所述内容管理装置发送第四应答,所述第四应答用于通知所述内容管理装置所述应用安装成功。
  50. 根据权利要求49所述的装置,其特征在于,
    所述接收器,还用于接收所述内容管理装置发送的第五指令;
    所述处理器,还用于根据所述第五指令,获取所述安全装置的可用存储空间的状态信息;
    所述发送器,还用于当所述安全装置的可用存储空间的状态信息为充足时,向所述内容管理装置发送第五应答。
  51. 根据权利要求49或50所述的装置,其特征在于,
    所述接收器,还用于接收所述内容管理装置发送的第六指令,所述第六指令包括所述应用的属性信息和所述应用对应的用户数据包的标识信息;
    所述处理器,还用于根据所述用户数据包的标识信息对应的用户数据包,对所述应用的属性信息对应的所述应用进行个人化;
    所述发送器,还用于向所述内容管理装置发送第六应答,所述第六应答用于确认所述处理器完成了对所述应用的个人化。
  52. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-9任意一项所述的方法或权利要求10-17任意一项所述的方法。
  53. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-9任意一项所述的方法或权利要求10-17任意一项所述的方法。
PCT/CN2017/094811 2017-06-06 2017-07-28 管理安全装置中应用的方法和装置 WO2018223509A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201780009736.7A CN108780482B (zh) 2017-06-06 2017-07-28 管理安全装置中应用的方法和装置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710418848 2017-06-06
CN201710418848.X 2017-06-06

Publications (1)

Publication Number Publication Date
WO2018223509A1 true WO2018223509A1 (zh) 2018-12-13

Family

ID=64566871

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/094811 WO2018223509A1 (zh) 2017-06-06 2017-07-28 管理安全装置中应用的方法和装置

Country Status (1)

Country Link
WO (1) WO2018223509A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309729A (zh) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 终端和应用程序的管理方法
CN104156236A (zh) * 2014-07-23 2014-11-19 小米科技有限责任公司 节省存储空间的方法和装置
CN105159710A (zh) * 2012-03-31 2015-12-16 北京奇虎科技有限公司 一种软件卸载方法及装置
CN105653319A (zh) * 2015-12-25 2016-06-08 飞天诚信科技股份有限公司 一种自动向应用程序加载pkcs#11模块的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309729A (zh) * 2012-03-15 2013-09-18 宇龙计算机通信科技(深圳)有限公司 终端和应用程序的管理方法
CN105159710A (zh) * 2012-03-31 2015-12-16 北京奇虎科技有限公司 一种软件卸载方法及装置
CN104156236A (zh) * 2014-07-23 2014-11-19 小米科技有限责任公司 节省存储空间的方法和装置
CN105653319A (zh) * 2015-12-25 2016-06-08 飞天诚信科技股份有限公司 一种自动向应用程序加载pkcs#11模块的方法及装置

Similar Documents

Publication Publication Date Title
CN108780482B (zh) 管理安全装置中应用的方法和装置
US10936719B2 (en) Preserving trust data during operating system updates of a secure element of an electronic device
US11601273B2 (en) Systems, methods, and computer program products for interfacing multiple service provider trusted service managers and secure elements
US9483249B2 (en) On-board applet migration
US9934014B2 (en) Automatic purposed-application creation
US10911939B2 (en) Embedded universal integrated circuit card profile management method and apparatus
JP5576983B2 (ja) 非ローカル記憶装置からのサブシステムのセキュアなブート及び構成
US9916574B2 (en) Secure computing device and method
US11552807B2 (en) Data processing method and apparatus
US11340885B2 (en) Method and apparatus for updating operating system
WO2019071650A1 (zh) 一种安全元件中的应用的升级方法及相关设备
US9390259B2 (en) Method for activating an operating system in a security module
JP6257426B2 (ja) 通信端末装置、通信端末装置の起動方法およびコンピュータプログラム
WO2015047807A1 (en) Systems, methods, and computer program products for securely managing data on a secure element
CN105393571A (zh) 用于操作安全元件的方法
US11556673B2 (en) Method for managing an instance of a class
WO2018223509A1 (zh) 管理安全装置中应用的方法和装置
US20080114814A1 (en) Managing user customizations of pre-provisioned contexts
CN108990046B (zh) 移动网络的连接方法
CN114174990A (zh) 一种数据管理方法、装置、电子元件以及终端设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17912997

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17912997

Country of ref document: EP

Kind code of ref document: A1