WO2021087956A1 - 数据处理的方法、装置和系统芯片 - Google Patents

数据处理的方法、装置和系统芯片 Download PDF

Info

Publication number
WO2021087956A1
WO2021087956A1 PCT/CN2019/116616 CN2019116616W WO2021087956A1 WO 2021087956 A1 WO2021087956 A1 WO 2021087956A1 CN 2019116616 W CN2019116616 W CN 2019116616W WO 2021087956 A1 WO2021087956 A1 WO 2021087956A1
Authority
WO
WIPO (PCT)
Prior art keywords
security
service
data
memory
security data
Prior art date
Application number
PCT/CN2019/116616
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 CN201980007190.0A priority Critical patent/CN113168477A/zh
Priority to PCT/CN2019/116616 priority patent/WO2021087956A1/zh
Priority to EP19951495.1A priority patent/EP4036775A4/en
Publication of WO2021087956A1 publication Critical patent/WO2021087956A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0861Network architectures or network communication protocols for network security for authentication of entities using biometrical features, e.g. fingerprint, retina-scan
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/03Protecting confidentiality, e.g. by encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication

Definitions

  • This application relates to the field of data processing, and more specifically, to a data processing method, device, and system chip.
  • mobile phones are playing an increasingly important role in mobile e-commerce with the widespread use of the Internet and the continuous improvement of mobile phone performance.
  • mobile phones will implement various functions such as bank cards, bus cards, keys, and ID cards.
  • functions such as bank cards, bus cards, keys, and ID cards.
  • mobile phone chips are required to provide hardware-level security solutions.
  • SE built-in secure elements
  • the SE chip is integrated on the mobile phone product board.
  • the SE chip with the highest security level realizes financial, Protection of application data such as bus cards and keys.
  • application data such as bus cards and keys.
  • user personal identification number (pin) such as user personal identification number (pin), biometric template protection, file system keys, and device certificates (public-private key pairs)
  • pin user personal identification number
  • biometric template protection such as user personal identification number (pin)
  • file system keys such as public-private key pairs
  • device certificates public-private key pairs
  • the present application provides a data processing method, device, and system chip, which can implement security services in a secure element, store data of different security services, and improve the security level and user experience.
  • a data processing device including: at least one processor, configured to provide a trusted execution environment TEE, and obtain a first security service request through an application programming interface API of the TEE, the first security service request Used to request a first security service; a secure element, used to: obtain the first security service request from the at least one processor; in response to the first security service request, execute the first security service to obtain security data;
  • the security data includes the first security data
  • the first security data is stored in the first memory outside the data processing device
  • the security data includes the second security data
  • the second security data is stored in the data processing device.
  • a second memory outside the device wherein the first secure data includes recoverable data, the second secure data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the first security service includes biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, or high-level security services. At least one of the secure storage services.
  • the secure element SE integrates functions such as supporting biometric authentication password services, password matching and verification services, key management and calculation services, file encryption services, root of trust services, high-security storage services, anti-fallback services, etc.
  • Security services can be implemented in SE, certificates are saved, and data of different security services are stored, which improves the security level and user experience.
  • the above technical solutions can integrate the biometric authentication function in the SE, support the security verification of mobile phones and other devices, and improve the security of the use of the device.
  • the second memory includes a plurality of regions, and when the second security data is stored in the second memory outside the data processing device The secure element is used to store the second secure data in an area corresponding to the first secure service among the multiple areas.
  • a variety of possible security flash data area management methods are provided, and multiple sub-areas are divided to store data of different security services.
  • store anti-return data For example, for anti-return services, store anti-return data; store key keys and device certificates, store high-security data, store data of third-party applications, and so on.
  • the combination of SE and security-level chips improves the security level and user experience.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identification and count value of the fallback service is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • the security element is specifically used In: determine the identifier and count value of the anti-fallback service; store the identifier of the anti-fallback service in the first sub-area, and store the count value in the second sub-area.
  • the anti-fallback value is stored in the secure flash.
  • each application has a different application identifier (4 bytes or 8 bytes), and each application has a 4-byte counter value (monotonic counter), that is, a 4-byte Counter space.
  • an application calls the anti-fallback service API of TEE 20, enter the application identifier (for example, application ID), and search for the application identifier in the anti-fallback data area of the secure flash. If the application identifier already exists, find the application identifier, add 1 to the corresponding counter value, and return the value to the application; if there is no such application identifier, add a new application identifier and set the application identifier field to The ID of the application, the counter is 1. Therefore, the application has a safe counter against hardware attacks to prevent being attacked.
  • application identifier for example, application ID
  • search for the application identifier in the anti-fallback data area of the secure flash If the application identifier already exists, find the application identifier, add 1 to the corresponding counter value, and return the value to the application; if there is no such application identifier, add a new application identifier and set the application identifier field to The ID of the application, the counter is 1. Therefore, the application has a safe counter against hardware attacks to prevent being
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security service includes the first security data and the second security data.
  • the security data includes ciphertext
  • the second security data includes the first key and the MAC value of the message authentication code; the security element is specifically used to: obtain the biometric information of the first user; use the first key to obtain the biometric information Encryption is performed to obtain the ciphertext; the MAC value is determined according to the biometric information; the ciphertext is stored in the first memory, and the first key and the MAC value are stored in the multiple areas corresponding to the biometric authentication password Service area.
  • the first security service includes a high-security storage service
  • the security data includes second security data
  • the second security data includes the high-security storage
  • the identification information of the data segment of the service, the length information of the data segment, and the content of the data segment, the area corresponding to the high-security storage service in the plurality of areas further includes a first sub-area, a second sub-area, and a third sub-area
  • the secure element is specifically used to: determine the identification information, the length information, and the content of the data segment; store the identification information in the first sub-area, store the length information in the second sub-area, and The content is stored in the third sub-area.
  • the data of high-security storage services is stored in a secure flash, which can prevent early rewriting or leakage after being attacked, and prevent data from being erased.
  • the high-security storage data area in the security flash may include N sub-areas, and each sub-area includes identification information (4 bytes) of each data segment, data length information (2 bytes), and a valid data storage area.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element
  • the architecture and process design of supporting mobile phone system security services with SE integrated into SOC is proposed for the first time, so that high-security chip security systems can be applied to mobile phones and other devices.
  • Data protection Specifically, the secure element SE integrates functions such as supporting biometric authentication password services, password matching and verification services, key management and calculation services, file encryption services, root of trust services, high-security storage services, anti-fallback services, etc.
  • the security service can be implemented in the SE, save the certificate, and provide it to the TEE TA to call.
  • a variety of possible security flash data area management methods are provided, and multiple sub-areas are divided to store data of different security services.
  • store anti-fallback data (4 bytes per application); save key keys and device certificates, save high-security data, save data for third-party applications, and so on.
  • the combination of SE and security-level chips improves the security level and user experience.
  • a data processing device including: at least one processor, configured to provide a trusted execution environment TEE, and obtain a first security service request through an application programming interface API of the TEE, the first security service request Used to request a first security service; a secure element, used to: obtain the first security service request from the at least one processor, and when the security data required by the first security service includes the first security data, process from the data
  • the first memory outside the device acquires the first security data; when the security data required by the first security service includes second security data, the second security data is acquired from the second memory outside the data processing device; execute the A first security service, wherein the first security data includes recoverable data, the second security data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the first security service includes biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, or high-level security services. At least one of the secure storage services.
  • the second memory includes a plurality of regions, and when the second security data is acquired from the second memory outside the data processing device, the The secure element is used to obtain the second security data from an area corresponding to the first security service among the multiple areas.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identifier and count value of the fallback service is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • the security element is specific It is used to: obtain the identifier of the anti-fallback service from the first sub-area, and obtain the count value from the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security service includes the first security data and the second security data.
  • the security data includes a ciphertext
  • the second security data includes a first key and a message authentication code MAC value;
  • the secure element is specifically configured to: obtain the ciphertext from the first memory, and obtain the first secret from the second memory.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes the high-security storage service.
  • the area corresponding to the high-security storage service further includes a first subarea, a second subarea, and a third subarea.
  • the area and the secure element are specifically used to obtain the identification information from the first subarea, obtain the length information from the second subarea, and obtain the content of the data segment from the third subarea.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element
  • a data processing method including: obtaining a first security service request, the first security service request being used to request a first security service; in response to the first security service request, executing the first security service request Service to obtain security data; when the security data includes the first security data, the first security data is stored in the first memory, and when the security data includes the second security data, the second security data is stored in the second A memory, wherein the first secure data includes recoverable data, the second secure data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the first security service includes biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, or high-level security services. At least one of the secure storage services.
  • the second memory includes multiple regions, and the storing the second security data in the second memory includes: The security data is stored in an area corresponding to the first security service among the plurality of areas.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identification and count value of the fallback service, the count value is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • Second, storing the security data in the second memory includes: storing the identifier of the anti-fallback service in the first sub-area, and storing the count value in the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security service includes the first security data and the second security data
  • the security data includes a ciphertext
  • the second security data includes a first key and a message authentication code MAC value
  • the executing the first security service to obtain the security data includes: acquiring the biometric information of the first user; using the first encryption Encrypting the biometric information with a key to obtain the ciphertext; determining the MAC value according to the biometric information; and storing the first security data in the first memory and storing the second security data in the second memory
  • the method includes: storing the ciphertext in the first memory, and storing the first key and the MAC value in an area corresponding to the biometric authentication password service among the plurality of areas.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes the high-security storage service.
  • Each area corresponding to the high-security storage service in the plurality of areas further includes a first subarea, a second subarea, and a second subarea.
  • the execution of the first security service to obtain security data includes: determining the identification information, the length information, and the content of the data segment; and, storing the second security data in the second memory, including: The identification information is stored in the first subarea, the length information is stored in the second subarea, and the content is stored in the third subarea.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element
  • a data processing method including: obtaining a first security service request, where the first security service request is used to request a first security service; when the security data required by the first security service includes the first security service When secure data, obtain the first security data from the first storage; when the security data required by the first security service includes the second security data, obtain the second security data from the second storage; execute the first security service, wherein ,
  • the first security data includes recoverable data
  • the second security data includes unrecoverable data
  • the first memory and the second memory are different memories.
  • the first security service includes biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, or high-level security services. At least one of the secure storage services.
  • the second memory includes multiple regions
  • the acquiring the second security data from the second memory includes: from the multiple regions The area corresponding to the first security service acquires the second security data.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identification and count value of the fallback service, the count value is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • the second sub-area The second memory acquiring the second security data includes: acquiring the identifier of the anti-fallback service from the first sub-area, and acquiring the count value from the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security data includes the first security data and the second security data
  • the security data includes a ciphertext
  • the second security data includes a first key and a message authentication code MAC value
  • executing the first security service includes: decrypting the ciphertext according to the first key to obtain the first user
  • the biometric information check the integrity of the biometric information according to the MAC value to obtain the verification result; when the verification result is that the biometric information is complete, based on the biometric information and the biometric input by the user to be verified Information to determine whether the user to be verified is the first user; when the user to be verified is the first user, the biometric authentication verification passes; or, when the user to be verified is not the first user, the biometric authentication verification fails.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes the high-security storage service.
  • the area corresponding to the high-security storage service further includes a first subarea, a second subarea, and a third subarea.
  • the area, acquiring the second security data from the second memory includes: acquiring the identification information from the first sub-area, acquiring the length information from the second sub-area, and acquiring the content of the data segment from the third sub-area.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element .
  • a secure element including: an acquisition module for acquiring a first security service request, the first security service request is used to request a first security service; a processing module, in response to the first security service request , Execute the first security service to obtain security data; when the security data includes the first security data, the first security data is stored in the first memory, and when the security data includes the second security data, the second security data is The security data is stored in the second memory, where the first security data includes recoverable data, the second security data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the first security service includes biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, or high-level security services. At least one of the secure storage services.
  • the second memory includes multiple regions
  • the processing module is specifically configured to: store the second security data in the multiple regions In the area corresponding to the first security service.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identification and count value of the return service, the count value is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area.
  • the processing module is specifically used Yu: Store the identifier of the anti-fallback service in the first sub-area, and store the count value in the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security service includes the first security data and the second security data.
  • the security data includes ciphertext
  • the second security data includes the first key and the MAC value of the message authentication code;
  • the processing module is used to obtain the biometric information of the first user;
  • the first key is used to encrypt the biometric information Obtain the ciphertext; determine the MAC value according to the biometric information; and store the ciphertext in the first memory, and store the first key and the MAC value in the multiple areas corresponding to the biometric authentication password Service area.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes the high-security storage service.
  • Each area corresponding to the high-security storage service in the plurality of areas further includes a first subarea, a second subarea, and a second subarea. Three sub-regions.
  • the processing module is used to: determine the identification information, the length information, and the content of the data segment; store the identification information in the first sub-region, store the length information in the second sub-region, and store the The content is stored in the third sub-area.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element .
  • a secure element including: an acquisition module for acquiring a first security service request, the first security service request is used to request a first security service; when the security data required by the first security service When the first security data is included, the obtaining module obtains the first security data from the first storage; when the security data required by the first security service includes the second security data, the obtaining module obtains the second security data from the second storage A processing module for executing the first security service, wherein the first security data includes recoverable data, the second security data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the first security service includes biometric authentication password service, password verification service, key management and calculation service, root of trust service, anti-fallback service or high At least one of the secure storage services.
  • the second memory includes multiple regions
  • the acquiring module is specifically configured to: compare the multiple regions with the first security service The corresponding area obtains the second security data.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes the anti-fallback service.
  • the identifier and count value of the fallback service, the count value is used to determine the number of hardware attacks
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • the acquisition module specifically uses Yu: Obtain the identifier of the anti-fallback service from the first sub-area, and obtain the count value from the second sub-area.
  • the first security service includes a biometric authentication cryptographic service
  • the security data includes the first security data and the second security data
  • the first security data includes the first security data and the second security data
  • the security data includes a ciphertext
  • the second security data includes a first key and a message authentication code MAC value
  • the processing module is specifically configured to: decrypt the ciphertext according to the first key to obtain the biological information of the first user Characteristic information; verify the integrity of the biometric information according to the MAC value to obtain a verification result; when the verification result is that the biometric information is complete, according to the biometric information and the biometric information input by the user to be verified, Determine whether the user to be verified is the first user; when the user to be verified is the first user, the biometric authentication verification passes; or, when the user to be verified is not the first user, the biometric authentication verification fails.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes the high-security storage service.
  • the area corresponding to the high-security storage service further includes a first subarea, a second subarea, and a third subarea.
  • the obtaining module is specifically configured to obtain the identification information from the first sub-area, obtain the length information from the second sub-area, and obtain the content of the data segment from the third sub-area.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element .
  • a data processing device which includes a trusted execution environment TEE module and a secure operating environment module of a secure element SE.
  • the TEE module communicates with the secure operating environment module through an application programming interface API, and the TEE module can obtain
  • the first security service request is to send the first security service request to the security operating environment module through the API, the first security service request is used to request the first security service; the security operating environment module executes in response to the first security service request
  • a security element including a processor and an interface, the interface is coupled to the processor, and the processor is used to implement the functions involved in the above aspects, for example, performing biometric authentication password services, password verification services, At least one of key management and computing services, trusted root services, anti-fallback services, or high-security storage services, or processes that perform other data processing.
  • the secure element also includes a memory for storing necessary program instructions and data.
  • the secure element can perform data processing in any possible implementation manner of the third aspect and the third aspect and any possible implementation manner of the fourth aspect and the fourth aspect Methods.
  • a system chip in a ninth aspect, includes the data processing device in any possible implementation manner of the first aspect and the first aspect, and any possible implementation manner of the second aspect and the second aspect .
  • a data processing device includes data processing in any possible implementation manner of the first aspect and the first aspect, and any possible implementation manner of the second aspect and the second aspect.
  • a device, the data processing device includes at least one processor and a secure element; a first memory and a second memory, and the first memory and the second memory are different memories.
  • the first memory is a shared memory of the secure element and the at least one processor
  • the second memory is a dedicated secure memory of the secure element.
  • a device including: at least one processor, a plurality of programs, a secure element, a first memory and a second memory, wherein the first memory and the second memory are different from the secure element
  • the multiple programs include instructions, when the instructions are executed by the device, the device executes any possible implementation manners of the first aspect and the first aspect, and any possible implementation of the second aspect and the second aspect Implement the method described in the mode.
  • a device in a twelfth aspect, is provided, and the device may be a terminal device or a chip set in the terminal device.
  • the device includes a processor, coupled with a memory, and can be used to execute instructions in the memory to implement any possible implementation of the third aspect and the third aspect, and any possible implementation of the fourth and fourth aspects.
  • the method of data processing in the method is provided.
  • the device further includes a memory.
  • the device further includes an interface, and the processor is coupled with the interface.
  • a computer program product includes: computer program code, which when the computer program code runs on a computing device or secure element, causes the computing device or secure element to execute the third Aspect, any possible implementation manner of the third aspect, and the data processing method in any possible implementation manner of the fourth aspect and the fourth aspect.
  • a computer-readable storage medium stores program codes or computer instructions.
  • the computer program codes or computer instructions run on a computing device or a secure element, the The device or the secure element executes the data processing method in any one of the foregoing third aspect and the third aspect and any one of the fourth aspect and the fourth aspect.
  • a system chip in a fifteenth aspect, includes a processor for supporting terminal devices to implement the functions involved in the above aspects, such as writing data, encrypting, decrypting, reading data, or other processing The data and/or information involved in the above methods.
  • the system chip further includes a memory, and the memory is used to store necessary program instructions and data of the terminal device.
  • the system chip can be composed of chips, and can also include chips and other discrete devices.
  • Figure 1 is a schematic diagram of a possible chip design architecture.
  • Figure 2 is a schematic diagram of an example of the system architecture of an electronic device.
  • Fig. 3 is a schematic diagram of an example system architecture provided by the present application.
  • Fig. 4 is a schematic diagram of an example of a data processing method provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of an example of a data storage process provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of data processing in a password verification service process provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of data processing in a biometric authentication password service process provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an example of the division of an anti-rollback data area provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of an example of the division of a high-security storage data area provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another example of a data processing method provided by an embodiment of the present application.
  • FIG. 11 is a schematic diagram of the composition of an example of a secure element SE 40 provided by an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the composition of an example of a security element 40 provided by an embodiment of the present application.
  • FIG. 13 is a schematic diagram of the composition of an example of a data processing device provided by an embodiment of the present application.
  • FIG. 14 is a schematic diagram of the composition of another example of a data processing device provided by an embodiment of the present application.
  • FIG. 15 is a schematic diagram of the composition of an example of electronic equipment provided by an embodiment of the present application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with “first” and “second” may explicitly or implicitly include one or more of these features.
  • “plurality” means two or more.
  • the size of the sequence number of each process does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not correspond to the embodiments of the present application.
  • the implementation process constitutes any limitation.
  • Terminal equipment can also be called user equipment (UE), electronic equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile equipment, user terminal, terminal, wireless communication Equipment, user agent, or user device.
  • UE user equipment
  • the terminal device in the embodiments of the present application may be a mobile phone (mobile phone), a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, and an augmented reality (Augmented Reality, AR) terminal Equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, transportation safety ( The wireless terminal in transportation safety, the wireless terminal in the smart city, the wireless terminal in the smart home, and so on.
  • the embodiments of this application do not limit the application scenarios.
  • the aforementioned terminal equipment and the chips that can be installed in the aforementioned terminal equipment are collectively referred to as terminal equipment.
  • the terminal device can also be a terminal device in the Internet of Things (IoT) system.
  • IoT Internet of Things
  • Its main technical feature is to pass items through communication technology. Connect with the network to realize the intelligent network of human-machine interconnection and interconnection of things.
  • the embodiments of this application will take a smart phone that is most widely used in life as an example for detailed description.
  • users also have higher and higher requirements for smart phones involving mobile payment, mobile finance and other mobile phone security.
  • smart phones are gradually in demand as car keys, bank cards and other security applications for carrying assets.
  • mobile phones may incorporate all bank cards, bus cards, keys, and ID cards.
  • the mobile phone chip is also required to provide hardware-level security.
  • FIG. 1 is a schematic diagram of a possible chip design architecture.
  • the chip system 100 has a secure element (SE) 105 built into a main chip 103 including an application processor (AP), so the main chip can be called an AP .
  • the main chip AP 103 may also be called a system on chip (system on chip, SOC).
  • the chip system 100 may include the following components.
  • PMU Power management unit
  • the chip system 100 may include a power management unit, and the power management unit may integrate all power management functions of the chip system 100 to supply power to multiple chips in the chip system 100.
  • the PMU chip 101 is the main component in the power management unit to realize the reset of the chip system 100, control the phase-locked loop and frequency divider in the chip system 100, the pin signal identification and decoding of one or more chips in the chip system 100, Functions such as sleep mode control in the system 100 and power management of modules in the chip system 100.
  • the power management unit may be logically connected to the processor in the chip system 100, such as the CPU 104, so that the processor realizes functions such as charging, discharging, and power consumption management through the power management unit.
  • the general-purpose input/output (GPIO) interface connection of the PMU chip 101 and the SE 105 in Fig. 1 can realize the secure button function.
  • the power button 102 of the electronic device is connected to the PMU chip 101.
  • the PMU chip 101 receives the interrupt information and sends the interrupt to the SE 105 through the GPIO interface, indicating that a hardware button is triggered.
  • the main chip 103 is the aforementioned system chip SOC, which is an integrated circuit chip.
  • the logic core of the main chip 103 includes a central processing unit (CPU) 105, a clock circuit, a timer, an interrupt controller, and a serial-parallel interface. , Other peripherals, input/output subsystem (input/output, I/O) ports, and glue logic between various IP cores, etc.; memory cores include various volatile memories, non-volatile memories ( Non-volatile memory, NVM) and Cache and other memories.
  • the main chip 103 may also include an analog core.
  • the analog core includes an analog-to-digital converter (ADC), a digital-to-analog converter (DAC), and a phase-locked loop (PLL). ) And analog circuits used in some high-speed circuits.
  • ADC analog-to-digital converter
  • DAC digital-to-analog converter
  • PLL phase-locked loop
  • the CPU 104 is the control center of the SOC 103, that is, the control center of the terminal device. It uses various interfaces and lines to connect the various parts of the entire terminal device, by running or executing software programs and/or modules stored in the memory, and calling The data in the memory performs various functions of the terminal device and processes the data, so as to monitor the terminal device as a whole.
  • the processor such as the CPU 104, may include one or more processing units; preferably, the processor may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and applications Programs, etc., the modem processor mainly deals with wireless communication. It can be understood that the above modem processor may not be integrated into the processor.
  • the CPU 104 may optionally include an arithmetic unit and a controller, and is a core component of the system chip 103, and is used to obtain instructions and process data. Specifically, it can be used to control the execution sequence of instructions, operation control, time control, and perform arithmetic and logical operations on data, or perform other information processing.
  • eMMC embedded Multi Media Card
  • UFS universal flash storage
  • DDR Double Data Rate
  • eMMC or UFS includes, for example, a memory array (memory array) and a chip-level independent storage area (replay protected memory block, RPMB), where RPMB is a special partition of eMMC, and its main function is to store some core sensitive data.
  • RPMB play protected memory block
  • the storage device 107 may also include software programs and modules that can be used to store software programs.
  • the processor such as the CPU 104, executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the storage device.
  • the storage device also includes a program storage area and a storage data area, such as read-only memory (ROM) and random access memory (RAM) in the chip system 100.
  • the storage program area can store the operating system, at least one application program (such as sound playback function, image playback function, etc.) required by the function;
  • the storage data area can store data created according to the use of the terminal device (such as audio data, Phone book, etc.) etc.
  • the storage device may also include a high-speed random access memory, and may also include a non-volatile memory (NVM), such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • NVM non-volatile memory
  • the secure flash chip 109 is a secure storage chip that has an initial key binding relationship with the SE 105, which can realize the secure storage of data, but the storage space is generally small, for example, about tens of KB to hundreds of KB.
  • a dedicated secure flash chip can be used, or an independent SE chip can also assume the function of a secure flash chip, or the secure flash can be integrated inside the SE 105.
  • the logic cost of a dedicated security flash chip is lower than that of an independent SE chip.
  • Other input devices can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the terminal device.
  • the chip system 100 also includes other units or modules shown or not shown, encryption/decryption logic circuits, and the like.
  • the system chip may include a radio frequency (RF) circuit for receiving and transmitting signals in the process of sending and receiving information or talking.
  • RF radio frequency
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the RF circuit can also communicate with other devices such as network equipment through wireless communication.
  • the wireless communication can use any communication standard or protocol, including but not limited to wireless local area networks (WLAN), global system of mobile communication (GSM) system, code division multiple access (CDMA) system, wideband code division multiple access (WCDMA) system, general packet radio service (general packet radio service, GPRS) , Long term evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), universal mobile telecommunication system (UMTS) , Worldwide Interoperability for Microwave Access (WiMAX) communication system, the future 5th generation (5G) system or new radio (NR), etc.
  • WLAN wireless local area networks
  • GSM global system of mobile communication
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • GPRS general packet radio service
  • LTE Long term evolution
  • FDD frequency division duplex
  • TDD LTE time division duplex
  • UMTS universal mobile telecommunication system
  • WiMAX Worldwide Interoperability for Microwave Access
  • the chip system 100 may also include a near filed communication (NFC) controller.
  • the NFC controller may be a chip that combines an inductive card reader, an inductive card, and a point-to-point based on a single chip. The function can be identified and data exchanged with compatible devices within a short distance.
  • the NFC chip has the ability to communicate with each other, and has the ability to calculate, and may also include an encryption logic circuit, an encryption/decryption module, and so on.
  • the chip system 100 may also include a multimedia card (MMC) controller, a double data rate controller (DDRC), etc., where the storage unit and the controller are implemented together on the system chip 103, I won't repeat them here.
  • MMC multimedia card
  • DDRC double data rate controller
  • the SE 105 is a secure element built into the electronic device, and the secure element can enhance the security level of the electronic device.
  • the SE 105 may be a security module integrated into the main chip SOC 103 of a mobile phone, and the SE 105 has a CPU 106, a storage device, an interface device, and so on.
  • the SE 105 that embeds the SE 105 in the SOC 103 of the terminal device, we can call it an inSE system, which can strengthen the security level of the mobile phone.
  • the SE 105 can manage or issue key factors to provide security protection for the user's private data or information.
  • the SE 105 can create a security domain.
  • SE 105 can rely on trusted service manager (TSM) to be used on the platform of a mobile network operator or financial institution to provide users with remote issuance and management of various industry smart cards
  • TSM trusted service manager
  • the platform of the partnership, specifically, SE 105 can receive TSM management, discover and download various bank cards, access control cards, bus cards, membership cards, coupons and other card applications through electronic devices, and swipe mobile phones to make payments anytime, anywhere, and enjoy Safe and convenient mobile payment service.
  • the central processing unit CPU 104 of the SOC 103 controls the SE 105, which specifically includes controlling the opening and closing of the SE 105, controlling power consumption or working status, and so on.
  • the CPU 104 can control other parts of the system chip 103, which is not limited in this embodiment.
  • the secure element SE 105 is usually provided in the form of being embedded in the SOC 103, which can run smart card applications, prevent external malicious analysis attacks, and protect data security.
  • SE 105 can have a complete CPU, ROM, RAM, etc. The following briefly introduces the internal structure of SE 105. As shown in Fig. 1, the SE 105, as a component, also includes most of the above-mentioned components or structures similar to the SOC 103. For example, the SOC 103 may include the following components.
  • the CPU 106 may include one or more processing units.
  • the CPU 106 can optionally include an arithmetic unit and a controller, and is the core component of the SE 105, which is used to obtain instructions and process data. Specifically, it can be used to control the execution sequence of instructions, operation control, time control, and perform calculation and logical operations on data, or perform other information processing.
  • the CPU 106 of the secure element SE can communicate with the CPU 104 of the system chip SOC 103.
  • the central processing unit CPU 104 of the system chip SOC 103 controls the secure element SE 105, including the control SE 105. Turn on, turn off, control power consumption or working status, etc.
  • the storage device can be used to store data, software programs, and modules.
  • the CPU 106 runs the software programs and modules stored in the storage device to perform various functional applications and perform data processing.
  • the storage device also includes a storage program area and a storage data area, such as the ROM and RAM shown in SE 105.
  • SE 105 also includes one-time programmable (OTP) memory.
  • OTP one-time programmable
  • the GPIO interface can be used for input, output or other special functions.
  • the GPIO interface can be connected to one or more registers, and output high or low potentials by writing to a certain register.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface can be used to connect other components of the device, such as a processor, a wireless communication module, an audio module, a sensor module, and so on.
  • GPIO interface can also be configured as other types of integrated circuit (inter-integrated circuit, I2C) interface, integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, universal asynchronous receiver/transmitter, UART ) Interface, or mobile industry processor interface (MIPI), etc., and will not be repeated here.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • CIPE uses encrypted IP packets. CIPE packets are given target header information and encrypted using the default CIPE encryption mechanism.
  • Random number generator true random number generator
  • a random number generator is a device that generates random numbers through a physical process rather than a computer program.
  • SE 105 can be composed of CPU, RAM, ROM, OTP, and cryptographic algorithm engine (Crypto IP).
  • SE 105 uses GPIO interface and peripheral device interface (inter-integrated circuit, I2C), or serial external interface. Set up an interface (serial peripheral interface, SPI) to connect to external devices.
  • SE 105 and main CPU 104 communicate through shared RAM, and OTP is to store SE keys, such as HUK and other keys.
  • the inSE chip system security solution can integrate the SE 105 into the main chip 103, which is more resistant to attacks from the physical level and has more High security.
  • FIG. 2 is a schematic diagram of an example of the system architecture of an electronic device.
  • the system architecture 200 of the mobile phone can be divided into several layers, each layer has a clear role and division of labor, and communication between the layers is through a software interface.
  • the system architecture 200 of the mobile phone may include an Android system layer 10, a trusted execution environment (TEE) 20, a chip SOC 30, a SE 40, and a secure operating environment 70 of the SE, a sensor 50, and a storage device. 80 and so on.
  • TEE trusted execution environment
  • the Android system layer 10 provides a rich execution environment (REE) for electronic devices, that is, a running environment and various services provided for various applications of electronic devices. As shown in Figure 2, the Android system layer 10 can be Electronic devices provide lock screen services, file encryption services, and third-party application operation.
  • REE rich execution environment
  • HAL hardware abstract layer
  • Android defines the HAL layer structure framework, and accesses the hardware through several interfaces, thereby unifying the calling method.
  • Figure 2 for password verification services, key management and computing services (keymaster HAL), screen lock services, third-party applications, and other security services
  • the Android system layer 10 accesses the hardware through several interfaces, thus unifying Calling method.
  • the Android system layer 10 can provide encryption protection at the application layer for the electronic device, and the security level is relatively low.
  • the Android system layer 10 can be divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
  • the application layer can include a series of application packages, such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, and SMS, etc.
  • the application framework layer provides applications for applications in the application layer Programming interface (application programming interface, API) and programming framework.
  • the application framework layer can include some predefined functions;
  • the system library can include multiple functional modules.
  • Android runtime is responsible for the scheduling and management of the Android system;
  • the kernel layer is the hardware The layer between the software and the software, the kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver, so I won’t repeat them here.
  • TEE is a concept proposed by the global platform (GP).
  • GP global platform
  • TEE is an operating environment that coexists with the Android system layer or rich operating system (rich OS) on the device, and provides security services for the Android system layer or rich OS.
  • TEE has its own execution space, which has a higher security level than the Android system layer or rich OS.
  • TEE runs in electronic devices and provides a security framework between the Android system layer and SOC. For example, for certain small payments, corporate virtual private network (virtual private network, VPN), etc., the required security protection strength is not high, and it cannot be directly placed in the Android system layer, in case the Android system layer is open sexually attacked. Therefore, for such applications, TEE can provide security protection.
  • VPN virtual private network
  • TEE provides a secure execution environment for trusted applications (TA), and at the same time protects the confidentiality, integrity, and access rights of TA's resources and data.
  • TA trusted applications
  • each TA is independent of each other and cannot access each other without authorization.
  • TEE 20 can provide application programming interface (API) for various services of electronic devices, and various applications of Android system layer 10 make the operating system execute by calling the API of TEE 20 The command of the application.
  • TEE 20 can provide key management and computing service APIs, gatekeeper APIs, biometric authentication service APIs, anti-fallback service APIs, root of trust APIs, etc. It can also include providing electronic devices Services such as high-bandwidth digital content protection (HDCP), digital rights management (DRM), and microkernel systems are not limited in this application.
  • HDCP high-bandwidth digital content protection
  • DRM digital rights management
  • microkernel systems are not limited in this application.
  • the gatekeeper service mainly aims at the user's personal identification number (personal identification number, pin) verification function, provides a verification function for the input pin code, and verifies whether the password at the time of registration is correct. If it is correct, the electronic device is allowed to boot, and the keymaster service and other services are enabled.
  • the gatekeeper service can implement the keymaster in the TEE as a key storage service for each Android application, providing key generation, storage, and encryption and decryption functions to ensure that the key does not appear in the Android memory, but in the TEE. If the gatekeeper fails to verify the pin code, other security services will not be opened, and if the keymaster service is not enabled, the key will not be generated, and the entire phone will not have any user data that can be unlocked.
  • the biometric authentication service uses the inherent physiological characteristics and behavioral characteristics of the human body to identify personal identity, such as fingerprint information or facial feature information, or user behavior characteristics such as sliding, voice, or gait. .
  • the biometric authentication module of TEE can also encrypt and store fingerprint information, facial feature information, and user behavior feature information for personal identification.
  • both the sender and receiver store a set of available keys.
  • the keys are stored secretly.
  • Both the sender and receiver perform encryption and decryption operations based on the keys.
  • DRM is used for multimedia protection, such as encrypted movies, music, audio and video, and streaming media files.
  • TEE can provide encryption protection for HDCP/DRM.
  • the system chip SOC 30 includes SE 40, UFS storage controller, and ARM trust zone (ARM trustzone).
  • the UFS storage controller is a form of the storage device 80 of the electronic device.
  • the storage device 80 reference may be made to the related introduction in FIG. 1, which will not be repeated here.
  • the SOC 30 may include an advanced reduced instruction set machine (Advanced RISC Machine, ARM) processor and an ARM trusted zone (ARM trustzone).
  • ARM advanced reduced instruction set machine
  • ARM trustzone ARM trusted zone
  • the SOC 30 may also include other modules or components that are not shown, such as the component modules or components of the system chip 103 introduced in FIG. 1, which will not be repeated here.
  • SE 40 can provide a secure operating environment 70, also referred to as "SE software operating environment.” This safe operating environment is used to run multiple programs to implement various functions of the SE.
  • the safe operating environment may provide a safe operating system (OS), which is used to provide an application access interface and schedule and load various types of applications or functions, which will not be repeated here.
  • OS safe operating system
  • BSP motherboard hardware support
  • Peripheral components such as sensor 50 and storage device 80
  • the system architecture 200 also includes peripheral components such as various sensors 50 and storage devices 80, such as fingerprint sensors and cameras.
  • the fingerprint sensor is used to collect fingerprints. Electronic devices can use the fingerprint characteristics collected by the fingerprint sensor to unlock fingerprints, access application locks, take photos with fingerprints, and answer calls with fingerprints.
  • the camera is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to an image signal processor (ISP) to convert it into a digital image signal, and the ISP outputs the digital image signal
  • ISP image signal processor
  • DSP converts digital image signals into standard image signals. ISP and DSP can be built in SOC.
  • the sensor 50 may also include a pressure sensor, a gyroscope sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a temperature sensor, an ambient light sensor, a bone conduction sensor, etc., which are not limited in this application.
  • the storage device 80 may correspond to the storage device 107 introduced in FIG. 1, for example, includes eMMC or UFS memory, etc., which will not be repeated here.
  • the above introduces the related components of the chip architecture 200 and the implementation environment for improving the security level in the electronic device.
  • the current electronic device pin code verification function, biometric authentication password service, and data protection services are all It is based on the ARM trusted area provided by the processor, and the corresponding software can be implemented in TEE 20.
  • TEE 20 the hardware security is still insufficient and cannot reach the security protection height of the security chip.
  • Fig. 3 is a schematic diagram of an example system architecture provided by the present application.
  • the system architecture 300 may include the Android system layer 10, the trusted execution environment (TEE) 20, the SOC 30, the SE 40, and the secure operation of the SE Environment 70, storage device 80, sensor 50, security flash chip 60, etc.
  • the safe operating environment 70 of the Android system layer 10, the TEE 20, the SE, the storage device 80, the sensor 50, etc. can be referred to the corresponding introduction in FIG. 2 and will not be repeated here.
  • the SOC 30 of the system architecture 300 provided by the present application includes a built-in secure element SE 40.
  • the SE 40 is coupled with the central processing unit of the SOC 30, and the central processing unit controls the SE 40.
  • the secure operating environment 70 of the SE 40 can be Through running the program, provide multiple security services of this application.
  • the "high security storage service”, “biological authentication password service”, “trusted root service”, “anti-fallback service”, “key management and key management” provided in the secure operating environment 70 of the SE listed in FIG. 3 Computing services” and “password verification services” can correspond to different program codes or functional modules.
  • the corresponding security services can be realized by running the program codes or functional modules in the secure operating environment 70 of the SE. This application does not Make a limit.
  • system architecture 300 also includes a dedicated secure flash 60.
  • a dedicated secure flash chip can be used, or an independent SE chip can also assume the function of a secure flash chip, or the secure flash can be integrated into the SE 105, which is not limited in this application.
  • the UFS memory is called the first memory
  • the secure flash 60 is called the second memory
  • first memory and the second memory are different memories other than the system chip SOC 30.
  • first memory may be understood as a shared memory of the SE 40 and the central processing unit
  • second memory is a dedicated memory of the secure element SE 40.
  • the first memory may be a general-purpose memory of a mobile phone.
  • the size of the memory of our current mobile phone is generally 64GB, 132GB, etc., which has a relatively large storage space.
  • the first memory involved in the embodiment of this application is 4MB or 16MB of 64GB or 132GB.
  • the capacity of such a first memory basically does not have any cost impact on the inherent storage of relatively large mobile phones at present, even if in the future with the growth of user demand, the capacity of the first memory will not affect the cost of the mobile phone.
  • the second memory is a dedicated secure memory, which can realize the secure storage of data, but the storage space is generally small, ranging from tens of KB to hundreds of KB.
  • it may be a dedicated secure storage secure flash that has been externally authenticated. A possible situation is that the secure flash is placed inside the SE 40 and belongs to the scope of security authentication, or the secure flash belongs to a device external to the SE 40.
  • the system architecture may include some or all of the above components and modules, which is not limited in this application.
  • the SE 40 included in the system chip SOC 30 will be implemented including biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, and high-security storage services.
  • biometric authentication cryptographic services e.g., biometric authentication cryptographic services
  • cryptographic verification services e.g., cryptographic verification services
  • key management and calculation services e.g., key management and calculation services
  • root-of-trust services e.g., a data processing method
  • UFS memory e.g., a data processing method for improving the security level of system security services.
  • Fig. 4 is a schematic diagram of an example of a data processing method provided by an embodiment of the present application.
  • the method 400 shows the specific process of data storage, and is applied to the aforementioned system architecture 300, including peripheral components such as Android system layer 10, TEE 20, SOC 30, SE 40, storage device 80, security flash 60, and sensor 50.
  • the method 400 includes the following contents.
  • the secure element obtains the first secure service request from the application programming interface API of the TEE.
  • the SOC 30 can provide a trusted execution environment TEE 20, and obtain the first security service request through the API interface of the TEE 20.
  • the first security service includes at least one service of a biometric authentication password service, a password verification service, a key management and calculation service, a trusted root service, an anti-fallback service, or a high-security storage service.
  • the security services listed above may be referred to as "multiple security services”.
  • the first security service may refer to any one or more of multiple security services.
  • the first security service request is used to request any one or more of biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, and high-security storage services.
  • kind of service is used to request any one or more of biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, and high-security storage services.
  • obtaining the first security service request by the SOC 30 may be receiving a user's operation, and in response to the user's operation, executing the first security service.
  • the first security service request may be generated by the system according to a user's operation. For example, taking smart terminals as an example, for biometric authentication password services, when the user needs to unlock the mobile phone, when the smart terminal screen is turned on or not, when the user enters fingerprint verification information, facial feature information or other biological information
  • the Android system layer 10 calls the interface corresponding to the biometric authentication password service (for example, the password verification service HAL) according to the biometric authentication operation initiated by the user, so that the Android system layer 10 transfers the user's operation to the SOC 30.
  • the biometric authentication password service for example, the password verification service HAL
  • SOC 30 determines that the biometric authentication password service of the smart terminal is currently activated, thereby generating the instruction to start the biometric authentication password service, and transmits the instruction of the biometric authentication password service to the biometric authentication API of TEE 20.
  • SE 40 further calls the biometric authentication API of TEE 20 to generate a biometric authentication password service request and start the biometric authentication password service.
  • the secure element obtains the first security service request, and in response to the first security service request, executes the first security service to obtain security data.
  • the secure element determines that when the secure data includes the first secure data, the first secure data is stored in the first memory outside the data processing device, and when the secure data includes the second secure data, the second secure The data is stored in a second memory outside the data processing device, where the first secure data includes recoverable data, and the second secure data includes unrecoverable data.
  • the SE 40 determines the current first security service to be executed, and further determines the data that needs to be stored in the process of executing the service according to the first security service.
  • the data may include only one type of data.
  • the data for example, the first security data or the second security data; or, the data may include both the first security data and the second security data at the same time.
  • the data that needs to be stored is determined by the type of service, so SE40 determines which type of data the service corresponds to according to the service request.
  • the SE 40 determines that the first security data is biometric template information input by the user (for example, fingerprint verification information, facial feature information, or other biometric verification information) ,
  • the second security data is the key for encrypting the biological template and the information for verifying the integrity of the biological template.
  • the SE 40 determines that currently only the first security data is included, and the first security data may be high-security data that the user needs to save in the SE 40.
  • the first memory may be a general-purpose memory of a mobile phone, and the second memory is a dedicated secure memory.
  • the UFS memory is used as the first memory and the secure flash 60 is used as the second memory as an example to introduce the implementation process of the security service, which is not limited in this application.
  • Fig. 5 is a schematic diagram of an example of a data storage process provided by an embodiment of the present application.
  • the SE 40 can control the data storage process of different security services.
  • the SE 40 can control the UFS storage controller and the security flash 60.
  • the chip-level independent storage area RPMB is a special partition of eMMC for storing some core sensitive data.
  • the storage area RPMB of the UFS storage device can be used to store recoverable data
  • the secure flash 60 can be used to store unrecoverable data related to multiple security services of this application.
  • the "recoverable data” here may be data that is not afraid of being attacked or erased, or renewable data.
  • the storage area RPMB of the UFS storage device may include an SE system data area, a registered biometric template data area, and so on.
  • the SE system data area can be used to store chip system data, such as SE code, etc. The code may be the same for every mobile phone and can be restored even if it is erased;
  • the registered biometric template data area can be used for Store the biometric template registered by the user, such as fingerprint information, face information, etc., which is not limited in this application.
  • the storage area RPMB of the UFS storage device stores the preset fingerprint information registered by the user, even if the preset fingerprint information is attacked or erased, the user can re-register and save the new fingerprint information, or the user can also re-register and save the new fingerprint information. It can be matched through other methods such as digital passwords, facial feature information verification, etc., which will not affect the safety of the device. Therefore, this type of data is renewable data.
  • unrecoverable data here may be data that cannot be attacked or erased, or data that cannot be regenerated. In this application, it may be data related to multiple security services.
  • the secure flash 60 may include an anti-fallback data area (64KB), a key storage area (32KB), an application data area (64KB), a high-security data storage area (64KB), etc., specifically, an anti-fallback data area ( 64KB) is used to store anti-return data, the key storage area (32KB) is used to store private keys, certificates, etc., the application data area (64KB) is used to store the unique root key of each device, etc., high-security data storage area (64KB) is used to store the user's anti-theft identification information, account balance information, etc. If such unrecoverable data is attacked or erased, the device may become a development board, or user data may be leaked, affecting the safety of the device.
  • FIG 6 is a schematic diagram of data processing in the cryptographic verification service process provided by an embodiment of this application.
  • the SE 40 can provide cryptographic verification services.
  • the main logic of the cryptographic verification service is the management of application keys (keys). And calculation, as well as the password authentication process.
  • the file encryption service is started by the user's setting operation, and the gatekeeper of the Android system layer 10 transmits the file encryption password (such as a digital password) set by the user to the SE 40, SE 40
  • the file encryption password set by the user is encrypted by the first key, and the cipher text of the file encryption password set by the user is configured in the UFS storage controller, and then stored in the external UFS storage through the UFS controller.
  • the first key that encrypts the file encryption password set by the user is stored in the secure flash 60.
  • the SE 40 may calculate the value of a hash-based message authentication code (HMAC) according to the encryption password set by the user, which is called the first HMAC value. During the storage of the first key, the calculated first HMAC value is also stored in the secure flash 60 at the same time.
  • HMAC hash-based message authentication code
  • the digital password input by the user starts the file decryption service.
  • the SE 40 calculates the second HMAC value according to the digital password currently entered by the user.
  • the SE 40 obtains the previously registered and stored first HMAC value from the secure flash 60, and compares whether the first HMAC value and the second HMAC value are the same.
  • the HMAC value can be used for integrity verification. For example, when the password verification service module of SE 40 determines that the first HMAC value is the same as the second HMAC value, it determines the value of the password set by the user stored in the external UFS memory. The ciphertext is complete.
  • SE 40 obtains the previously stored first key from the secure flash 60 and configures the first key to the UFS storage controller In this way, the ciphertext of the encrypted user-set password stored in the external UFS memory can be obtained through the UFS controller. Because the UFS controller has the correct first key, it can decrypt the data read from the UFS memory, thereby knowing the file encryption password (such as a digital password) set by the user.
  • the file encryption password such as a digital password
  • the SE 40 can output the file encryption password (such as a digital password) set by the relevant user to the password verification API of the TEE, and then call the Android system layer application through the password verification API to further check the file Perform decryption, etc.
  • the above technical solutions can be integrated in the SE to support file encryption, password matching and verification and other functions, support system security services for mobile phones and other devices, and improve the security level.
  • FIG. 7 is a schematic diagram of data processing of the biometric authentication password service process provided by an embodiment of the present application. As shown in FIG. 7, the SE 40 can provide the biometric authentication password service.
  • the lock screen service is started by the user’s setting operation, and the gatekeeper of the Android system layer 10 will lock the screen password (for example, fingerprint information entered when the user is registered, face Information, etc. as the lock screen password) is passed to SE 40, SE 40 encrypts the lock screen password entered during user registration with the second key, and configures the encrypted text of the lock screen password entered during user registration to UFS
  • the UFS controller is then stored in the external UFS memory, and the second key of the encrypted lock screen password is stored in the secure flash60.
  • the SE 40 can calculate the first HMAC value according to the lock screen password entered during the user registration. During the storage of the first key, the calculated first HMAC value is also stored in the secure flash 60.
  • the user currently enters the unlocking password (for example, fingerprint information, face information, etc. as the unlocking password) to start the unlocking service.
  • the unlocking password for example, fingerprint information, face information, etc. as the unlocking password
  • the biometric authentication TA of TEE 20 performs feature extraction on the currently collected fingerprint, and the extracted fingerprint information is sent to SE 40.
  • the SE 40 calculates the second HMAC value according to the fingerprint information currently input by the user.
  • the SE 40 obtains the previously registered and stored first HMAC value from the secure flash 60, and compares whether the first HMAC value and the second HMAC value are the same.
  • the HMAC value can be used for integrity verification or the lock screen password has not been tampered with.
  • the password verification service module of SE 40 determines that the first HMAC value is the same as the second HMAC value, it is determined to be stored in The cipher text of the lock screen password entered by the user of the external UFS storage during registration is complete.
  • SE 40 When the biological template matching module of SE 40 determines that the first HMAC value is the same as the second HMAC value, SE 40 obtains the previously stored second key from the secure flash 60, and obtains the previously stored user from the external UFS memory through the UFS controller The cipher text of the lock screen password entered during registration. The SE 40 decrypts the cipher text of the lock screen password entered during the user registration into the internal RAM according to the second key. The SE 40 then compares the currently entered fingerprint information with the fingerprint information obtained by decrypting the fingerprint information entered in the lock screen password during user registration. If the matching is successful, the device is unlocked.
  • the user unlocking process may specifically include the following steps: S701, after the user starts the unlocking service, the sensor 50 (for example, a fingerprint collection sensor) obtains the user's fingerprint information S702, the biometric authentication TA of TEE 20 performs feature extraction on the currently collected fingerprints, and transmits the obtained fingerprint information currently input by the user to SE 40 via API; S703, the biometric template matching module of SE 40 obtains the fingerprint information input by the user; S704, SE 40 obtains the encrypted second key of the lock screen password registered at the time and the corresponding first HMAC value from the security flash 60; S705, SE 40 obtains the stored registered lock screen from the external UFS memory through the UFS controller The cipher text data of the password; S706, SE 40 calculates the second HMAC value according to the fingerprint information currently entered by the user, and at the same time, SE 40 obtains the first HMAC value registered and stored from the secure flash 60, and compares the first HMAC value with the second H
  • HMAC values are the same.
  • SE 40 obtains the previously stored second key from the secure flash 60, and obtains the previously stored user from the external UFS memory through the UFS controller The cipher text of the lock screen password entered during registration.
  • the SE 40 decrypts the cipher text of the lock screen password entered during the user registration into the internal RAM according to the second key.
  • SE 40 compares the fingerprint information currently entered with the fingerprint information in the lock screen password entered during user registration obtained by decryption to match. When the SE 40 determines that the matching is successful, the device is unlocked.
  • the ciphertext of the biological template can be stored in the RPMB of the UFS memory, but the second key for encrypting the biological template will be stored in the secure flash 60.
  • the SE 40 will decrypt the ciphertext of the biological template at the time of registration into the internal RAM of the SE 40.
  • the UFS storage controller will be powered off. If the second key is stored in the UFS memory, the second key will be lost. This embodiment can avoid the occurrence of loss.
  • the biometric authentication TA in the TEE 20 performs feature extraction on the collected image, and the extracted features are sent to the SE 40.
  • SE 40 the currently extracted features are matched and verified with the template when the user is registered. If the verification is passed, the successful result of the verification is returned to the Android system layer 10, which is called by the lock screen application of the Android system layer. Make the system unlock successfully.
  • the use of the first key and the second key in this application is only a descriptive distinction. In the aforementioned password verification service or key management and calculation service, the first key is used to encrypt user settings.
  • the second key is used to encrypt the lock screen password entered during user registration.
  • the first key and the second key can be the same or different.
  • the keys for different services can be calculated according to the key management and calculation services provided by SE 40, and the calculation methods can be the same or different, which is not limited in this application.
  • the above technical solutions can integrate the biometric authentication function in the SE, support the security verification and unlocking services of mobile phones and other devices, and improve the security of the use of the devices.
  • the root of trust service can be provided by the SE, such as pre-installed device certificates and keys, etc., in the future, a secure channel can be established with the corresponding cloud service to ensure reliable communication between the trusted root server and the cloud server. Ensure the privacy, integrity and non-repudiation of the message.
  • the original equipment manufacturer (OEM) or cloud operator's certificate and private key are preset in production.
  • OEM original equipment manufacturer
  • relying on the secure boot function in the root of trust service can provide integrity protection, thereby ensuring that the device is booted in a safe state. It can also protect confidentiality and prevent cloning through strong encryption technology.
  • the preset certificate and private key can be stored in the SE to ensure the security of the certificate and private key.
  • the SE can also provide anti-fallback services for applications.
  • the anti-fallback value is stored in the security flash 60.
  • the security flash 60 as the second memory is divided into multiple regions, and each region of the multiple regions corresponds to a different security service type.
  • the second security data is stored in the second memory outside the data processing device, the second security data corresponding to each security service type is stored in the area corresponding to the security service.
  • FIG. 8 is a schematic diagram of an example of the division of the anti-fallback data area provided by an embodiment of the present application. As shown in FIG. 8, in the anti-fallback data area of the secure flash, different areas are divided for each application.
  • the area of the anti-fallback service further includes a first sub-area and a second sub-area; and when performing the anti-fallback service, the SE 40 determines that the second security data includes the identifier of the anti-fallback service And a count value, the count value is used to determine the number of hardware attacks, the identifier of the anti-fallback service is stored in the first sub-area, and the count value is stored in the second sub-area.
  • each application has a different application identifier (4 bytes or 8 bytes), and each application has a 4-byte counter value (monotonic counter).
  • the application identifier of each application is stored in the first sub-area, and the count value for each application is stored in the second sub-area.
  • an application calls the anti-fallback service API of TEE 20, enter the application identifier (for example, application ID), and search for the application identifier in the anti-fallback data area of the secure flash.
  • the application identifier already exists, find the application identifier, add 1 to the corresponding counter value, and return the value to the application; if there is no such application identifier, add a new application identifier and set the application identifier field to The ID of the application, the counter is 1.
  • the process of user registration of fingerprints is taken as an example to introduce the application method of the anti-fallback service.
  • the security counter of the first ID is called to record the number of fingerprint registrations by the user.
  • the first time the user registers with the first fingerprint as the unlocking fingerprint, and the second re-entering the second fingerprint as the unlocking fingerprint, the security counter count value of the first ID is increased by 1, and so on. Every time the user re-registers and enters the fingerprint, The count value of the security counter of the first ID is increased by 1 on the basis of the previous count value.
  • the anti-return service can ensure that the count value records the number of times the user re-registers and enters the fingerprint.
  • the count value is 3
  • neither the first fingerprint nor the second fingerprint can be unlocked.
  • the currently unlocked fingerprint is the third fingerprint corresponding to the count value 3.
  • the counter can be understood as a safe counter for multiple applications to prevent attacks and prevent applications from being rolled back or data during use. Roll back etc.
  • the anti-fallback service can correspond to multiple different applications, and the SE 40 anti-fallback service can be invoked in combination with different scenarios in the use of the device to ensure the normal and safe use of the application.
  • the data of high-security storage services is stored in a secure flash, which can prevent attacks or data being erased.
  • the security flash 60 as the second memory is divided into multiple areas, and the multiple areas include areas corresponding to high-security storage services.
  • FIG. 9 is a schematic diagram of an example of the division of a high-security storage data area provided by an embodiment of the present application. A management method of the high-security storage data area is shown in Figure 9.
  • the high-security storage service area further includes a first sub-area, a second sub-area, and a third sub-area, and when the high-security storage service is executed, The SE 40 can determine that the second security data includes the identification information of the data segment of the high-security storage service, the length information of the data segment of the high-security storage service, and the content of the data segment of the high-security storage service; store the high-security storage service
  • the identification information of the data segment of the service is stored in the first sub-area
  • the length information of the data segment of the high-security storage service is stored in the second sub-area
  • the content of the data segment of the high-security storage service is stored in the second sub-area.
  • the first sub-area may include 4-byte identification information for storing each data segment
  • the second sub-area may include data length information for storing 2-bytes
  • the third sub-area may be used for storing Effective data storage area.
  • an application obtains its own data, enter the identification information and length information of the data segment, and the high-security data service will pass the valid data to the TEE TA for use, and then pass it to the application to prevent hardware attacks.
  • the process of storing the anti-theft identification of a mobile phone is taken as an example to introduce the process of high-security storage service.
  • the ID of the corresponding anti-theft mark, the length of the anti-theft mark, and the anti-theft identification data are respectively stored in which sub-area described above, such as "0X55a", where "0X” is the ID of the anti-theft mark, and the length is 55. Identified as "a”.
  • the anti-theft identification is transmitted to the server of the mobile phone equipment manufacturer, so that the mobile phone is in an unusable state.
  • modify the data in the high-security data storage area for example, from "0X55a" to "0X550", which means that the mobile phone ends up being stolen or lost and can be used normally.
  • the user's XX bank balance, bus card balance and other information are also stored in the high-security data storage area to ensure that the data will not be obtained or tampered with, and the security level is improved.
  • FIG. 10 is a schematic diagram of another example of a data processing method provided by an embodiment of the present application.
  • the method 1000 shows the specific process of data acquisition, which is applied to the above-mentioned system architecture 300, including the Android system layer 10, TEE 20, SOC 30, SE 40, and the secure operating environment 70 of the SE, the storage device 80, and the secure flash 60, Peripheral components such as the sensor 50.
  • the method 1000 includes the following contents.
  • the secure element obtains a first security service request, where the first security service request is used to request the first security service.
  • the first security service may include at least one of biometric authentication cryptographic services, cryptographic verification services, key management and calculation services, root-of-trust services, anti-fallback services, and high-security storage services.
  • the first security service can refer to at least one of multiple security services.
  • the first security service request is used to request at least one service among biometric authentication cryptographic services, key management and computing services, trusted root services, anti-fallback services, and high-security storage services.
  • S1020 When the security data required by the first security service includes the first security data, the secure element obtains the first security data from the first memory; when the security data required by the first security service includes the second security data, The secure element obtains the second secure data from the second memory.
  • the first security data includes recoverable data of the chip system
  • the second security data includes unrecoverable data related to the first security service.
  • the secure element executes the first security service according to the security data.
  • the first memory and the second memory are different memories other than the secure element.
  • the first memory may be a general-purpose memory of a mobile phone, and the second memory is a dedicated secure memory.
  • the multiple security services introduced above do not have strict boundaries. They can be combined with each other when using a certain application for the user, and they can be executed during the use of the application, or they can exist separately in a certain function of a certain application. In this application, this application is not limited.
  • the SE 40 can perform biometric authentication password services, key management, and calculation services for the user's fingerprint unlocking process; for the user to store the mobile phone anti-theft identification process, the SE 40 can perform high-security storage services.
  • the method provided by the embodiment of the present application has been specifically described above in connection with FIGS. 2 to 10 from two aspects of data storage and data acquisition and execution of security services.
  • the architecture and process design of supporting mobile phone system security services with SE integrated into SOC is proposed for the first time, so that high-security chip security systems can be applied to mobile phones and other devices.
  • the secure element SE integrates functions such as supporting biometric authentication password services, password verification services, password matching and verification services, file encryption services, root of trust services, high-security storage services, and anti-fallback services.
  • Implement security services in the SE save the certificate, and provide it to the TEE TA to call.
  • a variety of possible security flash data area management methods are provided, and multiple sub-areas are divided to store data of different security services.
  • store anti-fallback data (4 bytes per application); save key keys and device certificates, save high-security data, save data for third-party applications, and so on.
  • the combination of SE and security-level chips improves the security level and user experience.
  • FIG. 11 is a schematic diagram of the composition of an example of a secure element SE 40 provided by an embodiment of the present application, and the secure element SE 40 can run a secure operating environment 70.
  • the secure element may correspond to SE 40 in Fig. 3, Fig. 5, Fig. 6 and Fig. 7.
  • the secure element may include: an obtaining module 1110, configured to obtain a first security service request, the first security service request is used to request a first security service; a processing module, a processing module 1120, in response to the first security service request; A security service request to execute the first security service to obtain security data.
  • the processing module 1120 stores the first security data in the first memory.
  • the processing module 1120 stores the second security data. Stored in a second memory, where the first security data includes recoverable data, the second security data includes unrecoverable data, and the first memory and the second memory are different memories.
  • the acquisition module 1110 and the processing module 1120 may be implemented in a manner of software, hardware, or a combination of software and hardware. When the two modules are implemented in software, these two modules can run on the CPU 106 in FIG. 1.
  • the first security service includes at least one of a biometric authentication password service, a password verification service, a key management and calculation service, a root of trust service, an anti-fallback service, or a high-security storage service service.
  • the second memory includes multiple areas, and the processing module 1120 is specifically configured to store the second security data in an area corresponding to the first security service among the multiple areas.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes an identifier and a count value of the anti-fallback service
  • the count value is To determine the number of hardware attacks
  • the area corresponding to the anti-fallback service among the multiple areas further includes a first sub-area and a second sub-area.
  • the processing module 1120 is specifically configured to: store the identifier of the anti-fallback service Go to the first sub-area, and store the count value in the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security data includes ciphertext
  • the second security data includes The first key and the MAC value of the message authentication code
  • the processing module 1120 is used to obtain the biometric information of the first user; use the first key to encrypt the biometric information to obtain the cipher text; determine according to the biometric information The MAC value; and, storing the ciphertext in the first memory, and storing the first key and the MAC value in an area corresponding to the biometric authentication cryptographic service among the plurality of areas.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes identification information of a data segment of the high-security storage service
  • the data segment Each of the multiple areas corresponding to the high-security storage service further includes a first sub-area, a second sub-area, and a third sub-area.
  • the processing module 1120 is used to: determine The identification information, the length information, and the content of the data segment; the identification information is stored in the first sub-area, the length information is stored in the second sub-area, and the content is stored in the third sub-area.
  • the secure element 40 can perform the methods and steps introduced in FIG. 4.
  • the secure element 40 may also perform the methods and steps introduced in FIG. 10.
  • the obtaining module 1110 is used to obtain a first security service request, and the first security service request is used to request a first security service.
  • the obtaining module 1110 obtains the first security data from the first memory; when the security data required by the first security service includes the second security data, The obtaining module 1110 obtains the second security data from the second memory.
  • the processing module 1120 is configured to execute the first security service.
  • the first secure data includes recoverable data
  • the second secure data includes unrecoverable data
  • the first memory and the second memory are different memories.
  • the first security service includes an anti-fallback service
  • the security data includes the second security data
  • the second security data includes an identifier and a count value of the anti-fallback service, and the count value
  • the area corresponding to the anti-fallback service in the multiple areas further includes a first sub-area and a second sub-area
  • the obtaining module 1110 is specifically configured to: obtain the anti-fallback service from the first sub-area.
  • the identifier of the fallback service, and the count value is obtained from the second sub-area.
  • the first security service includes a biometric authentication password service
  • the security data includes the first security data and the second security data
  • the first security data includes ciphertext
  • the second security data includes The first key and the MAC value of the message authentication code
  • the processing module 1120 is specifically configured to: decrypt the ciphertext according to the first key to obtain the biometric information of the first user; verify the biometric information according to the MAC value The integrity of the characteristic information to obtain the verification result; when the verification result is that the biometric information is complete, determine whether the user to be verified is the first user based on the biometric information and the biometric information input by the user to be verified ; When the user to be verified is the first user, the biometric authentication verification passes; or, when the user to be verified is not the first user, the biometric authentication verification fails.
  • the first security service includes a high-security storage service
  • the security data includes the second security data
  • the second security data includes identification information of a data segment of the high-security storage service
  • the length information of the data segment and the content of the data segment, the area corresponding to the high-security storage service in the multiple areas further includes a first sub-area, a second sub-area, and a third sub-area.
  • the obtaining module 1110 is specifically used to: The first subarea obtains the identification information, the length information is obtained from the second subarea, and the content of the data segment is obtained from the third subarea.
  • Fig. 12 is a schematic diagram of the composition of an example of a secure element 40 provided by an embodiment of the present application.
  • the secure element may correspond to SE 40 in Fig. 3, Fig. 5, Fig. 6 and Fig. 7, or correspond to Fig. 11
  • the security element 40 in.
  • the secure element 40 may include a processor 1210 and an interface 1220.
  • the interface 1220 is coupled with the processor 1210, and the processor 1210 is used to implement the functions of the SE 40 in Figure 3, Figure 5, Figure 6, Figure 7 or Figure 11, for example, perform biometric authentication password services, password verification services, and password verification services.
  • the processor 1210 may correspond to the CPU 106 in FIG. 1.
  • the interface 1220 is used for the secure element 40 to communicate with the outside, and may include, for example, the communication interface with the PMU chip 101, the secure flash chip 109 or the CPU 104 in FIG. 1.
  • the processor 1210 communicates with the CPU 104 through the interface 1220.
  • the secure element 40 may further include a memory 1230.
  • the memory 1230 is used to store necessary program instructions and data.
  • the processor 1210, the interface 1220, and the memory 1230 cooperate with each other to execute computer instructions to make the secure element 40 execute the data processing method provided in the embodiment of this application.
  • the memory 1230 may include the RAM or ROM in FIG. 1, which is not specifically expanded here.
  • FIG. 13 is a schematic diagram of the composition of an example of a data processing device provided by an embodiment of the present application.
  • the data processing device 1300 includes a trusted execution environment TEE module 1310 and a secure operating environment module 1320 of a secure element SE.
  • the TEE module 1310 communicates with the secure operating environment module 1320 through the application programming interface API.
  • the TEE module 1310 can obtain the first secure service request, and send the first secure service request to the secure operating environment module 1320 through the API.
  • the first secure service request is used Upon requesting the first security service; the security operating environment module 1320 executes the first security service in response to the first security service request.
  • TEE module 1310 may correspond to the TEE 20 in FIG. 3
  • safe operating environment module 1320 may correspond to the safe environment 70 in FIG. 3, which will not be specifically expanded here.
  • FIG. 14 is a schematic diagram of the composition of another example of a data processing device provided by an embodiment of the present application.
  • the data processing device 1400 includes at least one processor 1410, a secure element 40, a first memory 1430 and a second memory 1440, Among them, the first memory 1430 and the second memory 1440 are different memories other than the secure element 40.
  • the first memory is a shared memory of the secure element and the at least one processor, and the second memory is a dedicated secure flash of the secure element.
  • the processor 1410 is used to provide a trusted execution environment TEE, and the at least one processor 1410, the secure element 40, the first memory 1430 and the second memory 1440 cooperate with each other to realize the aforementioned FIGS. 3, 5, and 5
  • the specific function of each component in FIG. 14 can be referred to the description of the corresponding embodiment in FIG. 1 or other drawings. For example, it corresponds to the CPU 104, SE 105, processor 107, and security flash chip 109 in FIG. 1 respectively, which will not be repeated here.
  • FIG. 15 is a schematic diagram of the composition of an example of an electronic device provided by an embodiment of the present application.
  • the electronic device 1500 may be an electronic device that includes the secure element 40 introduced in FIG. 11 or FIG.
  • the electronic device 1500 may include the Android system layer 10, the TEE 20, and the SE 40, and the Android system layer 10, the TEE 20, and the SE 40 cooperate with each other to execute computer instructions so that the electronic device executes the methods provided in the embodiments of this application.
  • the specific introduction of the data processing method please refer to the previous description, for example, refer to the corresponding description in FIG. 3.
  • an electronic device in order to implement the above-mentioned functions, includes hardware and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
  • the functions described in the above embodiments are implemented in the form of software modules or functional units and sold or used as independent products, they can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device or computing processor, such as the aforementioned secure element, execute all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Biomedical Technology (AREA)
  • Storage Device Security (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

一种数据处理的方法、装置(1400)和芯片系统(100),该芯片系统(100)包括系统总线、耦合于该系统总线的至少一个处理器(1410)、和耦合于该芯片系统(100)的安全元件(40)、第一存储器(1430)和第二存储器(1440),其中,第一存储器(1430)和第二存储器(1440)是该安全元件(40)之外的不同存储器,该方法首次提出了用集成到SOC的SE支持手机系统安全服务的架构和流程设计,使得高安全级别的芯片安全系统应用到手机等设备的数据保护中,SE集成了支持生物认证密码服务、密码校验服务、密码匹配与校验服务、文件加密服务、root of trust服务、高安全存储服务、防回退服务等功能,可以在SE中实现安全服务,存储不同安全服务的数据,提高了安全等级和用户体验。

Description

数据处理的方法、装置和系统芯片 技术领域
本申请涉及数据处理领域,并且更具体地,涉及一种数据处理的方法、装置和系统芯片。
背景技术
手机作为一种应用最广泛的电子设备,随着互联网的广泛应用和手机性能的不断提升,在移动电子商务中发挥着越来越重要的作用。手机未来要实现银行卡,公交卡,钥匙,身份证等各种功能,实现这些功能,需要手机芯片提供硬件级安全的解决方案。
在现有的手机安全存储中,已经通过外置或者内置安全元件(secure element,SE),通常以芯片形式提供,将SE芯片集成到手机产品板上,最高安全等级的SE芯片实现了金融、公交卡、钥匙等应用数据的保护。但是,对于用户使用手机等电子设备过程中,各类应用数据的安全,如用户个人识别码(personal identification number,pin),生物特征模板保护、文件系统的密钥、设备证书(公私钥对)等数据,并未有更高安全等级的保护方案。随着用户和厂商对手机等电子设备里面个人数据的系统安全需求的提升,亟需一种安全存储的实现流程,实现将手机存储的个人数据也要用最高安全等级的芯片进行保护。
发明内容
本申请提供一种数据处理的方法、装置和系统芯片,能够在安全元件中实现安全服务,存储不同安全服务的数据,提高了安全等级和用户体验。
第一方面,提供了一种数据处理装置,包括:至少一个处理器,用于提供可信执行环境TEE,并通过该TEE的应用编程接口API获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;安全元件,用于:从该至少一个处理器获取该第一安全服务请求;响应于该第一安全服务请求,执行该第一安全服务以得到安全数据;当该安全数据包括第一安全数据时,将该第一安全数据存储到该数据处理装置外的第一存储器,且当该安全数据包括第二安全数据时,将该第二安全数据存储到该数据处理装置外的第二存储器,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第一方面,在第一方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
通过上述数据处理装置,首次提出了用集成到系统芯片(system on chip,SOC)的SE(称为inSE)支持手机系统安全服务的架构和流程设计,使得高安全级别的芯片安全系统应用到手机等设备的数据保护中。具体地,使得安全元件SE集成了支持生物认证密码服务、密码匹配与校验服务、密钥管理和计算服务、文件加密服务、root of trust服务、 高安全存储服务、防回退服务等功能,可以在SE中实现安全服务,保存证书,存储不同安全服务的数据,提高了安全等级和用户体验。
以上技术方案可以在SE集成生物认证功能,支持手机等设备的安全校验,提高了设备使用的安全。
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第二存储器包括多个区域,以及在将该第二安全数据存储到该数据处理装置外的该第二存储器时,该安全元件用于将该第二安全数据存储到该多个区域中与该第一安全服务对应的区域。
在不同的安全服务中,提供了多种可能的安全flash的数据区管理方式,划分多个子区域,用于存储不同安全服务的数据。例如对于防回退服务,存储防回退数据;保存关键的密钥和设备证书,保存高安数据,保存第三方应用的数据等。通过SE结合安全级别的芯片,提高了安全等级和用户体验。
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第一安全服务包括防回退服务,该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域;以及该安全元件具体用于:确定该防回退服务的标识和计数值;将该防回退服务的标识存储到该第一子区域,将该计数值存储到该第二子区域。
对于防回退服务,防回退的值保存在安全flash中。在安全flash的防回退数据区中,每个应用具有不同的应用标识(4字节或者8字节),以及每个应用会有4字节计数器值(monotonic counter),即4字节的计数器空间。
当某个应用调用TEE 20的防回退服务API时,输入应用标识(例如应用ID),在安全flash的防回退数据区查找应用标识。如果已有该应用标识,则找到该应用标识,将对应的计数器值加1,并返回值给应用即可;如果没有该应用标识,则新增一个新的应用标识,将应用标识字段置成该应用的ID,计数器为1。从而该应用就有一个防硬件攻击的安全的计数器,防止被攻击。
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该安全元件具体用于:获取第一用户的生物特征信息;利用该第一密钥对该生物特征信息进行加密得到该密文;根据该生物特征信息确定该MAC值;将该密文存储到该第一存储器,将该第一密钥和该MAC值存储到该多个区域中对应该生物认证密码服务的区域。
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,以及该安全元件具体用于:确定该标识信息、该长度信息和该数据段的内容;将该标识信息存储到该第一子区域,将该长度信息存储到该第二子区域,将该内容存储到该第三子区域。
对于高安全存储服务,高安全存储服务的数据存储在安全flash中,可以防止被攻击后早到改写或者泄露,以及防止数据被擦除。安全flash中的高安全存储数据区可以包括N个子区域,每个子区域包括每个数据段的标识信息(4字节),数据长度信息(2字节) 以及有效数据存储区。当某个应用来获取自己的数据时,输入数据段的标识信息和长度信息,高安全数据服务会将有效数据传递给TEE的TA使用,再传递给该应用,从而防止被硬件攻击。
结合第一方面和上述实现方式,在第一方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
通过上述本申请提供的数据写入和读取数据的方法,首次提出了用集成到SOC的SE支持手机系统安全服务的架构和流程设计,使得高安全级别的芯片安全系统应用到手机等设备的数据保护中。具体地,使得安全元件SE集成了支持生物认证密码服务、密码匹配与校验服务、密钥管理和计算服务、文件加密服务、root of trust服务、高安全存储服务、防回退服务等功能,可以在SE中实现安全服务,保存证书,提供给TEE TA调用。
此外,在不同的安全服务中,提供了多种可能的安全flash的数据区管理方式,划分多个子区域,用于存储不同安全服务的数据。例如对于防回退服务,存储防回退数据(每个应用4字节);保存关键的密钥和设备证书,保存高安数据,保存第三方应用的数据等。通过SE结合安全级别的芯片,提高了安全等级和用户体验。
第二方面,提供了一种数据处理装置,包括:至少一个处理器,用于提供可信执行环境TEE,并通过该TEE的应用编程接口API获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;安全元件,用于:从该至少一个处理器获取该第一安全服务请求,当该第一安全服务所需的安全数据包括第一安全数据时,从该数据处理装置外的第一存储器获取该第一安全数据;当该第一安全服务所需的安全数据包括第二安全数据时,从该数据处理装置外的第二存储器获取该第二安全数据;执行该第一安全服务,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第二方面,在第二方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第二存储器包括多个区域,以及在从该数据处理装置外的第二存储器获取该第二安全数据时,该安全元件用于从该多个区域中与该第一安全服务对应的区域获取该第二安全数据。
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第一安全服务包括防回退服务,则该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域;以及该安全元件具体用于:从该第一子区域获取该防回退服务的标识,从该第二子区域获取该计数值。
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该安全元件具体用于:从该第一存储器获取该密文,从该第二存储器获取该第一密钥和该MAC值;根据该第一密钥,对该密文进行解密,获取第一用户的生物特征信息;根据该MAC值校验该生物特 征信息的完整性以得到校验结果;当该校验结果是该生物特征信息完整时,根据该生物特征信息和待验证用户输入的生物特征信息,判断该待验证用户是否是该第一用户;当该待验证用户是该第一用户时,生物认证验证通过;或者,当该待验证用户不是该第一用户时,生物认证验证失败。
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,以及该安全元件具体用于:从该第一子区域获取该标识信息,从该第二子区域获取该长度信息,从该第三子区域获取该数据段的内容。
结合第二方面和上述实现方式,在第二方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第三方面,提供了一种数据处理的方法,包括:获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;响应于该第一安全服务请求,执行该第一安全服务以得到安全数据;当该安全数据包括第一安全数据时,将该第一安全数据存储到第一存储器,当该安全数据包括第二安全数据时,将该第二安全数据存储到第二存储器,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第三方面,在第三方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第二存储器包括多个区域,以及,该将该第二安全数据存储到第二存储器,包括:将该第二安全数据存储到该多个区域中与该第一安全服务对应的区域。
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第一安全服务包括防回退服务,该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,以及,该将该第二安全数据存储到第二存储器,包括:将该防回退服务的标识存储到该第一子区域,将该计数值存储到该第二子区域。
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该执行该第一安全服务以得到安全数据包括:获取第一用户的生物特征信息;利用该第一密钥对该生物特征信息进行加密得到该密文;根据该生物特征信息确定该MAC值;以及,该将该第一安全数据存储到第一存储器,将该第二安全数据存储到第二存储器,包括:将该密文存储到该第一存储器,将该第一密钥和该MAC值存储到该多个区域中对应该生物认证密码服务的区域。
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服 务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中每个对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,该执行该第一安全服务以得到安全数据,包括:确定该标识信息、该长度信息和该数据段的内容;以及,该将该第二安全数据存储到第二存储器,包括:将该标识信息存储到该第一子区域,将该长度信息存储到该第二子区域,将该内容存储到该第三子区域。
结合第三方面和上述实现方式,在第三方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第四方面,提供了一种数据处理的方法,包括:获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;当该第一安全服务所需的安全数据包括第一安全数据时,从第一存储器获取第一安全数据;当该第一安全服务所需的安全数据包括第二安全数据时,从第二存储器获取第二安全数据;执行该第一安全服务,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第四方面,在第四方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第二存储器包括多个区域,以及,该从第二存储器获取第二安全数据,包括:从该多个区域中与该第一安全服务对应的区域获取该第二安全数据。
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第一安全服务包括防回退服务,则该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,以及,该从第二存储器获取第二安全数据,包括:从该第一子区域获取该防回退服务的标识,从该第二子区域获取该计数值。
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;执行该第一安全服务,包括:根据该第一密钥,对该密文进行解密,获取第一用户的生物特征信息;根据该MAC值校验该生物特征信息的完整性以得到校验结果;当该校验结果是该生物特征信息完整时,根据该生物特征信息和待验证用户输入的生物特征信息,判断该待验证用户是否是该第一用户;当该待验证用户是该第一用户时,生物认证验证通过;或者,当该待验证用户不是该第一用户时,生物认证验证失败。
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,从第二存储器获取第二安全数据,包括:从该第一子区域获取该标识信息,从该第二子区域获取该长度信息,从该第三子区域获取该数据段的内容。
结合第四方面和上述实现方式,在第四方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第五方面,提供了一种安全元件,包括:获取模块,用于获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;处理模块,响应于该第一安全服务请求,执行该第一安全服务以得到安全数据;当该安全数据包括第一安全数据时,将该第一安全数据存储到第一存储器,当该安全数据包括第二安全数据时,将该第二安全数据存储到第二存储器,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第五方面,在第五方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
结合第五方面和上述实现方式,在第五方面的某些实现方式中,该第二存储器包括多个区域,以及,该处理模块具体用于:将该第二安全数据存储到该多个区域中与该第一安全服务对应的区域。
结合第五方面和上述实现方式,在第五方面的某些实现方式中,该第一安全服务包括防回退服务,该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,该处理模块,具体用于:将该防回退服务的标识存储到该第一子区域,将该计数值存储到该第二子区域。
结合第五方面和上述实现方式,在第五方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该处理模块用于获取第一用户的生物特征信息;利用该第一密钥对该生物特征信息进行加密得到该密文;根据该生物特征信息确定该MAC值;以及,将该密文存储到该第一存储器,将该第一密钥和该MAC值存储到该多个区域中对应该生物认证密码服务的区域。
结合第五方面和上述实现方式,在第五方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中每个对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,该处理模块用于:确定该标识信息、该长度信息和该数据段的内容;将该标识信息存储到该第一子区域,将该长度信息存储到该第二子区域,将该内容存储到该第三子区域。
结合第五方面和上述实现方式,在第五方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第六方面,提供了一种安全元件,包括:获取模块,用于获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;当该第一安全服务所需的安全数据包括第一安全数据时,该获取模块从第一存储器获取第一安全数据;当该第一安全服务所需的安全数据包括第二安全数据时,该获取模块从第二存储器获取第二安全数据;处理模块,用于执 行该第一安全服务,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
结合第六方面,在第六方面的某些实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
结合第六方面和上述实现方式,在第六方面的某些实现方式中,该第二存储器包括多个区域,以及,该获取模块具体用于:从该多个区域中与该第一安全服务对应的区域获取该第二安全数据。
结合第六方面和上述实现方式,在第六方面的某些实现方式中,该第一安全服务包括防回退服务,则该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,该获取模块具体用于:从该第一子区域获取该防回退服务的标识,从该第二子区域获取该计数值。
结合第六方面和上述实现方式,在第六方面的某些实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该处理模块具体用于:根据该第一密钥,对该密文进行解密,获取第一用户的生物特征信息;根据该MAC值校验该生物特征信息的完整性以得到校验结果;当该校验结果是该生物特征信息完整时,根据该生物特征信息和待验证用户输入的生物特征信息,判断该待验证用户是否是该第一用户;当该待验证用户是该第一用户时,生物认证验证通过;或者,当该待验证用户不是该第一用户时,生物认证验证失败。
结合第六方面和上述实现方式,在第六方面的某些实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,该获取模块具体用于:从该第一子区域获取该标识信息,从该第二子区域获取该长度信息,从该第三子区域获取该数据段的内容。
结合第六方面和上述实现方式,在第六方面的某些实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第七方面,提供了一种数据处理装置,包括可信执行环境TEE模块和安全元件SE的安全运行环境模块,该TEE模块通过应用编程接口API与该安全运行环境模块通信,该TEE模块能够获取第一安全服务请求,通过API向安全运行环境模块发送该第一安全服务请求,该第一安全服务请求用于请求第一安全服务;该安全运行环境模块响应于该第一安全服务请求,执行如第三方面、第三方面任一种可能的实现方式以及第四方面、第四方面任一种可能的实现方式中的数据处理的方法。
第八方面,提供了一种安全元件,包括处理器和接口,接口和该处理器耦合,该处理器用于实现上述方面中所涉及的功能,例如,执行生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务,或执 行其他数据处理的过程。
在一种可能的设计中,该安全元件还包括存储器,该存储器,用于保存必要的程序指令和数据。当该程序指令和数据被执行时,使得该安全元件可以执行如第三方面、第三方面任一种可能的实现方式以及第四方面、第四方面任一种可能的实现方式中的数据处理的方法。
第九方面,提供了一种系统芯片,该芯片系统包括如第一方面、第一方面任一种可能的实现方式以及第二方面、第二方面任一种可能的实现方式中的数据处理装置。
第十方面,提供了一种数据处理设备,该数据处理设备包括如第一方面、第一方面任一种可能的实现方式以及第二方面、第二方面任一种可能的实现方式中数据处理装置,该数据处理装置包括至少一个处理器和安全元件;第一存储器和第二存储器,该第一存储器和该第二存储器是不同存储器。
在一种可能的设计中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全存储器。
第十一方面,提供了一种装置,包括:至少一个处理器,多个程序,安全元件,第一存储器和第二存储器,其中,第一存储器和第二存储器是该安全元件之外的不同存储器,该多个程序包括指令,当该指令被该装置执行时,使得该装置执行如第一方面、第一方面任一种可能的实现方式以及第二方面、第二方面任一种可能的实现方式中所述的方法。
第十二方面,提供了一种装置,该装置可以为终端设备,或者为设置在终端设备中的芯片。该装置包括:处理器,与存储器耦合,可用于执行存储器中的指令,以实现上述第三方面、第三方面任一种可能的实现方式以及第四方面、第四方面任一种可能的实现方式中的数据处理的方法。可选地,该装置还包括存储器。可选地,该装置还包括接口,处理器与接口耦合。
第十三方面,提供了一种计算机程序产品,所述计算机程序产品包括:计算机程序代码,当所述计算机程序代码在计算设备或安全元件上运行时,使得计算设备或安全元件执行上述第三方面、第三方面任一种可能的实现方式以及第四方面、第四方面任一种可能的实现方式中的数据处理的方法。
第十四方面,提供了一种计算机可读存储介质,所述计算机可读介质存储有程序代码或计算机指令,当所述计算机程序代码或计算机指令在计算设备或安全元件上运行时,使得计算设备或安全元件执行上述第三方面、第三方面任一种可能的实现方式以及第四方面、第四方面任一种可能的实现方式中的数据处理的方法。
第十五方面,提供了一种系统芯片,该系统芯片包括处理器,用于支持终端设备实现上述方面中所涉及的功能,例如,写入数据,加密,解密,读取数据,或其他处理上述方法中所涉及的数据和/或信息。在一种可能的设计中,所述系统芯片还包括存储器,所述存储器,用于保存终端设备必要的程序指令和数据。该系统芯片可以由芯片构成,也可以包括芯片和其他分立器件。
附图说明
图1是一种可能的芯片设计架构示意图。
图2是一例电子设备的系统架构示意图。
图3是本申请提供的一例系统架构示意图。
图4是本申请实施例提供的一例处理数据的方法示意图。
图5是本申请实施例提供的一例数据存储过程示意图。
图6是本申请实施例提供的密码校验服务过程的数据处理示意图。
图7是本申请实施例提供的生物认证密码服务过程的数据处理示意图。
图8是本申请实施例提供的一例防回退数据区的划分示意图。
图9是本申请实施例提供的一例高安全存储数据区的划分示意图。
图10是本申请实施例提供的另一例处理数据的方法示意图。
图11是本申请实施例提供的一例安全元件SE 40的组成示意图。
图12是本申请实施例提供的一例安全元件40的组成示意图。
图13是本申请实施例提供的一例数据处理装置的组成示意图。
图14是本申请实施例提供的又一例数据处理装置的组成示意图。
图15是本申请实施例提供的一例电子设备的组成示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
其中,在本申请实施例的描述中,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
此外,在本申请实施例的描述中,使用的术语“部件”、“模块”、“系统”等用于表示终端设备相关的实体、硬件、固件、硬件和软件的组合、软件、或执行中的软件。应理解,本申请实施例中的方式、情况、类别以及实施例的划分仅是为了描述的方便,不应构成特别的限定,各种方式、类别、情况以及实施例中的特征在不矛盾的情况下可以相结合。
还应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
还需要说明的是,“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“至少一个”是指一个或一个以上;“A和B中的至少一个”,类似于“A和/或B”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和B中的至少一个,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
本申请实施例提供的数据处理的方法,可以应用于终端设备上。终端设备也可以称为用户设备(user equipment,UE)、电子设备、接入终端、用户单元、用户站、移动站、移动台、远方站、远程终端、移动设备、用户终端、终端、无线通信设备、用户代理或用户装置。本申请的实施例中的终端设备可以是手机(mobile phone)、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(Virtual Reality,VR)终端设备、增强现实(Augmented Reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving) 中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对应用场景不做限定。本申请中将前述终端设备及可设置于前述终端设备的芯片统称为终端设备。
此外,在本申请实施例中,终端设备还可以是物联网(Internet of Things,IoT)系统中的终端设备,IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。
本申请实施例将以生活中最广泛使用的智能手机为例进行详细的说明。用户使用智能手机除了对相机、音频、视频以及智能手机性能的不断提升的需求外,对智能手机涉及移动支付,移动金融等手机安全的需求也越来越高。除此之外,智能手机作为汽车钥匙、银行卡等承载财产的安全应用也逐步有了需求。手机未来可能会收编所有的银行卡、公交卡、钥匙和身份证等,要实现这些功能,除了需要各类相应的软件开发的支持,更需要手机芯片提供硬件级安全。
图1是一种可能的芯片设计架构示意图。如图1所示的芯片系统100,该芯片系统100将安全元件(secure element,SE)105内置于包括应用处理器(application processor,AP)的主芯片103中,因此可以将主芯片称为AP。在图1中,主芯片AP 103也可以称为系统芯片(system on chip,SOC)。芯片系统100可以包括以下的部件。
(1)电源管理单元(power management unit,PMU)芯片101
应理解,芯片系统100中可以包括电源管理单元,该电源管理单元可以集成芯片系统100所有的电源管理功能,为芯片系统100内多个芯片供电。PMU芯片101为电源管理单元中的主要元件,以实现芯片系统100复位、控制芯片系统100内锁相环和分频器、芯片系统100内一个或多个芯片的引脚信号识别和解码、芯片系统100内睡眠模式控制和芯片系统100内模块电源管理等功能。电源管理单元可以与芯片系统100内处理器,如CPU 104逻辑相连,从而处理器通过电源管理单元实现管理充电、放电、以及功耗管理等功能。
图1中PMU芯片101和SE 105的通用型输入输出(general-purpose input/output,GPIO)接口连接,可以实现安全按键功能。一般来说,电子设备的电源键102是连接到PMU芯片101,当按下电源键时,PMU芯片101收到中断信息,会将中断通过GPIO接口送给SE 105,表示有硬件按键被触发。
(2)主芯片103
主芯片103即上述的系统芯片SOC,是一种集成电路的芯片,主芯片103中逻辑核包括中央处理器(central processing unit,CPU)105、时钟电路、定时器、中断控制器、串并行接口、其它外围设备、输入/输出子系统(input/output,I/O)端口以及用于各种IP核之间的粘合逻辑等等;存储器核包括各种易失存储器、非易失存储器(non-volatile memory,NVM)以及Cache等存储器。主芯片103中还可包括模拟核,该模拟核包括模拟数字转换器(analog to digital converter,ADC)、数字模拟转换器(digital to analog converter,DAC)、锁相环电路(phase locked loop,PLL)以及一些高速电路中所用的模拟电路。
(3)中央处理器104
CPU 104是SOC 103的控制中心,即终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器内的软件程序和/或模块,以及 调用存储在存储器内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。
可选的,处理器,如CPU 104可包括一个或多个处理单元;优选的,处理器可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器中。
CPU 104可以选择性包括运算器和控制器,是系统芯片103的核心部件,用于获取指令并处理数据。具体地可以用于进行指令执行顺序的控制、操作控制、时间控制以及对数据进行算术运算和逻辑运算,或进行其他信息的处理等。
(4)存储器件107
存储器件可以包括嵌入式多媒体存储(embedded Multi Media Card,eMMC)、通用闪存存储(universal flash storage,UFS)、双倍速率(Double Data Rate,DDR)同步动态随机存储器等。具体地,eMMC或UFS包括如存储器阵列(memory array)、芯片级独立存储区域(replay protected memory block,RPMB),其中RPMB是eMMC一个比较特别的分区,主要的作用是存放一些核心敏感数据。
存储器件107还可以包括可用于存储软件程序以及模块,处理器,如CPU 104通过运行存储在存储器件的软件程序以及模块,从而执行终端设备的各种功能应用以及数据处理。存储器件还包括存储程序区和存储数据区,例如芯片系统100中的只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)等。其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器件还可以包括高速随机存取存储器,还可以包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
(5)安全flash芯片109
安全flash芯片109是一个与SE 105有初始密钥绑定关系的安全存储芯片,可以实现数据的安全存储,但存储空间一般很小,例如几十KB到几百KB左右。可选地,在芯片系统100中,可以用专用安全flash芯片,或者独立SE芯片也可以承担安全flash芯片的功能,或者将安全flash集成在SE 105内部。其中,专用安全flash芯片的逻辑成本低于独立SE芯片。
(6)其他输入设备
其他输入设备可用于接收输入的数字或字符信息,以及产生与终端设备的用户设置以及功能控制有关的键信号输入。
除上述列举的各个模块之外,芯片系统100还包括其他示出的或者未示出的单元或模块,加密/解密逻辑电路等。例如,系统芯片可以包括在收发信息或通话过程中信号的接收和发送的射频(radio frequency,RF)电路。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(low noise amplifier,LNA)、双工器等。此外,RF电路还可以通过无线通信与网络设备等其他设备通信,该无线通信可以使用任一通信标准或协议,包括但不限于无线局域网(wireless local area networks,WLAN)、 全球移动通讯(global system of mobile communication,GSM)系统、码分多址(code division multiple access,CDMA)系统、宽带码分多址(wideband code division multiple access,WCDMA)系统、通用分组无线业务(general packet radio service,GPRS)、长期演进(long term evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、未来的第五代(5th generation,5G)系统或新无线(new radio,NR)等。
又例如,芯片系统100还可以包括近距离无线通信(near filed communication,NFC)控制器,该NFC控制器可以是一种芯片,在单一芯片基础上结合感应式读卡器、感应式卡片和点对点的功能,能在短距离内与兼容设备进行识别和数据交换。NFC芯片具有相互通信能力,并具有计算能力,可以还包括加密逻辑电路、加密/解密模块等。
又例如,芯片系统100还可以包括将存储单元和控制器一同做到系统芯片103上的多媒体存储(multi media card,MMC)控制器、双倍速率控制器(double data rate controler,DDRC)等,此处不再赘述。
在芯片系统100中,SE 105是内置于电子设备的安全元件,该安全元件能够加强电子设备的安全等级。例如,SE 105可以是集成到手机主芯片SOC 103的安全模块,SE 105内部有CPU 106、存储器件、接口设备等。在上述这种将SE 105内置于终端设备的SOC 103的系统芯片103,我们可以称为inSE系统,该系统能够加强手机的安全等级。具体地,例如,在密码存储过程中,SE 105可以管理或者下发密钥因子,为用户的私密数据或信息提供安全保护。在数据备份过程中,SE 105可以创建安全域(security domain),在安全域中的数据可以经过加密处理,再进行上传到应用层进行备份,可以增加备份过程中数据的安全性。在移动支付过程中,SE 105可以依托可信任服务管理(trusted service manager,TSM),用于某个移动网络运营商或是金融机构的平台,即可以为用户提供远程发行各类行业智能卡、管理合作关系的平台,具体地,SE 105可以接收TSM的管理,通过电子设备发现并下载各种银行卡、门禁卡、公交卡、会员卡、优惠券等卡应用,随时随地刷手机进行支付,享受安全、便捷的移动支付服务。
应理解,在inSE系统架构中,由SOC 103的中央处理器CPU 104来控制SE 105,具体包括控制SE 105的打开、关闭、控制功耗或工作状态等。此外,CPU 104作为系统芯片103的核心可以控制系统芯片103的其他部分器件,本实施例不做限定。安全元件SE 105通常以嵌入SOC 103内部形式提供,可以运行智能卡应用程序,能够防止外部恶意解析攻击,保护数据安全。
如图1所示,SE 105可以具有完备的CPU,ROM,RAM等。下面简要介绍SE 105的内部结构。如图1所示,SE 105作为一种元件,也包括上述类似于SOC 103中的大部分元件或结构,示例性的,SOC 103可以包括以下的部件。
(1)中央处理器CPU 106
利用各种接口和线路连接系统芯片内或芯片外各个部分,通过运行或执行存储在存储器内的软件程序和/或模块,以及调用存储在存储器内的数据,执行各种功能和处理数据的操作。可选的,CPU 106可包括一个或多个处理单元。
CPU 106可选择性包括运算器和控制器,是SE 105的核心部件,用于获取指令并处理数据。具体地可以用于进行指令执行顺序的控制、操作控制、时间控制以及对数据进行算熟运算和逻辑运算,或进行其他信息的处理等。
在芯片系统100中,安全元件SE的CPU 106可以和系统芯片SOC 103的CPU 104之间进行通信连接,由系统芯片SOC 103的中央处理器CPU 104来控制安全元件SE 105,包括控制SE 105的打开、关闭、控制功耗或工作状态等。
(2)存储器件
存储器件可用于存储数据、软件程序以及模块,CPU 106通过运行存储在存储器件的软件程序以及模块,从而各种功能应用以及进行数据处理。存储器件还包括存储程序区和存储数据区,例如SE 105中示出的ROM、RAM等。此外,SE 105中还包括一次性编程(one time programmable,OTP)存储器。
(3)通用输入输出(general purpose input/output,GPIO)接口
GPIO接口可以用于输入、输出或其他特殊功能,GPIO接口可以连接一个或多个寄存器,通过写入某个寄存器来输出高电位或者低电位。GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接设备的其他部件,例如处理器、无线通信模块、音频模块、传感器模块等。GPIO接口还可以被配置为其他类型的集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,或移动产业处理器接口(mobile industry processor interface,MIPI)等,此处不再赘述。
(4)加密IP封装(crypto IP encapsulation,CIPE)
CIPE使用加密的IP分组,CIPE分组被给以目标头信息,并使用默认的CIPE加密机制来加密。
(5)随机数生成器(true random number generator,TRNG)
随机数生成器是一种通过物理过程而非计算机程序来生成随机数字的设备。
根据以上的介绍,SE 105可以有CPU,RAM,ROM,OTP,密码算法引擎(Crypto IP)组成,另外,SE 105通过GPIO接口和外围设备接口(inter-integrated circuit,I2C)、或串行外设接口(serial peripheral interface,SPI)对接外部设备。SE 105和主CPU 104通过共享RAM通信,OTP是存储SE的密钥,例如HUK和其他Key等。
以上简单介绍了该inSE的芯片系统100的组成以及各部分之间的通信,该inSE芯片系统安全解决方案,能够将SE 105集成到主芯片103当中,更能防备来自物理层面的攻击,具有更高的安全性。
图2是一例电子设备的系统架构示意图。以手机为例,手机的系统架构200可以分成若干个层,每一层都有清晰的角色和分工,层与层之间通过软件接口通信。如图2所示,手机的系统架构200可以包括安卓系统层10、可信执行环境(trusted execution environment,TEE)20、芯片SOC 30、SE 40以及SE的安全运行环境70、传感器50、存储器件80等。下面,对该系统架构中涉及的部件、模块和概念进行简单的介绍。
1、安卓系统层10
安卓系统层10为电子设备提供富执行环境(rich execution environment,REE),即 为电子设备的各类应用程序提供的运行环境和各类服务,如图2中所示,安卓系统层10可以为电子设备提供锁屏服务、文件加密服务、第三方应用程序运行等。
对于目前的硬件抽象层(hardware abstract layer,HAL),可以认为Android定义了HAL层结构框架,通过几个接口访问硬件,从而统一了调用方式。如图2中列举的密码校验服务、密钥管理和计算服务(keymaster HAL)、锁屏服务、第三方应用程序和其他安全服务等,安卓系统层10通过几个接口访问硬件,从而统一了调用方式。应理解,安卓系统层10可以为电子设备提供应用层的加密保护,安全等级比较低。
在一些实施例中,将安卓系统层10可以分为四层,从上至下分别为应用程序层,应用程序框架层(framework),安卓运行时(Android runtime)和系统库,以及内核层。其中,应用程序层可以包括一系列应用程序包,例如相机、图库、日历、通话、地图、导航、WLAN、蓝牙、音乐、和短信息等;应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架,此外,应用程序框架层可以包括一些预先定义的函数;系统库可以包括多个功能模块,Android runtime负责安卓系统的调度和管理;内核层是硬件和软件之间的层,内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,这里不再赘述。
2、可信执行环境TEE 20
TEE是全球平台(global platform,GP)提出的概念。TEE是与设备上的Android系统层或者富操作系统(rich operating system,rich OS)等并存的运行环境,并且给Android系统层或者rich OS提供安全服务。TEE具有其自身的执行空间,比Android系统层或者rich OS的安全级别更高。
TEE是运行在电子设备中的,提供介于Android系统层和SOC之间的安全性的框架。例如对于某些小额的支付,企业虚拟私人网络(virtual private network,VPN)等,所需要的安全保护强度并不高,也不能直接放在Android系统层中,以防由于Android系统层的开放性被攻击。所以对于这类应用,可以通过TEE提供安全保护。
此外,TEE提供了可信应用(trusted application,TA)的安全执行环境,同时也保护TA的资源和数据的保密性,完整性和访问权限。在TEE中,每个TA是相互独立的,而且不能在未授权的情况下不能互相访问。
如图2中所示,TEE 20可以为电子设备的各类服务提供应用程序接口(application programming interface,API),安卓系统层10的各类应用程序通过调用TEE 20的API而使操作系统去执行应用程序的命令。例如,TEE 20可以提供密钥管理和计算服务API、入口服务(gatekeeper)API、生物认证服务API、防回退服务API和可信根(root of trust)API等,还可以包括为电子设备提供高带宽数字内容保护技术(high-bandwidth digital content protection,HDCP)、数字版权管理(digital rights management,DRM)和微内核系统等服务,本申请对此不做限定。
其中,入口服务(gatekeeper)主要是针对用户个人识别码(personal identification number,pin)校验功能,提供对输入的pin码的校验功能,校验注册时的密码是否正确。如果正确则允许电子设备开机,并使能keymaster服务以及其他服务。此外,gatekeeper服务可以实现在TEE中的keymaster作为Android各个应用的密钥存储服务,提供密钥的生成,保存以及加解密功能,确保密钥不在Android内存中出现,而是在TEE中。gatekeeper 如果校验pin码失败,则不会打开其他安全服务,而如果keymaster服务不使能,则不会生成密钥,整个手机没有任何用户自身数据能被解开。
生物认证服务是利用人体固有的生理特性和行为特征进行个人身份的鉴定,例如通过指纹信息或人脸特征信息等生理特性,或者诸如滑动、声音或步态等用户行为特征来进行个人身份的鉴定。其中,TEE的生物认证模块还可以加密存储进行个人身份鉴定的指纹信息、人脸特征信息以及用户行为特征信息等。
在HDCP运作的具体过程中,发送端和接收端都存储一个可用密钥集,密钥都是秘密存储,发送端和接收端都根据密钥进行加密解密运算。DRM用于进行多媒体保护,例如加密电影、音乐、音视频、流媒体文件。TEE可以为HDCP/DRM提供加密保护。
3、SOC 30
系统芯片SOC 30包括SE 40、UFS存储控制器和ARM可信区域(ARM trustzone)等。其中,UFS存储控制器是电子设备的存储器件80的一种形式,存储器件80可以参照图1中的相关介绍,此处不再赘述。
如图2中所示,SOC 30可以包括先进精简指令集机器(Advanced RISC Machine,ARM)处理器和ARM可信区域(ARM trustzone)。应理解,该ARM处理器可以对应于图1中介绍的SOC 30的CPU 104,该ARM提供的运行环境可以称为ARM可信区域(ARM trustzone),对应于TEE,用于运行多个程序。还应理解,该SOC 30还可以包括其他未示出的模块或者部件,例如图1中给介绍的系统芯片103的组成模块或者部件,此处不再赘述。
还应理解,在该SOC 30中包括内置的安全元件(参照图1中介绍的SE 105)称为SE 40,SE 40的可以提供安全运行环境70,也称为“SE的软件运行环境”,该安全运行环境用于运行多个程序实现SE的各种功能。该安全运行环境可以提供安全操作系统(operating system,OS),用于提供应用访问接口,调度加载个类应用或者功能,此处不再赘述。此外,安全运行环境还可以提供支持OS运行的主板硬件支持(board support package,BSP),用于装入操作系统并调度操作系统向硬件发出的指令,此处不再赘述。
4、传感器50、存储器件80等外围部件
此外,例如图2中所示,该系统架构200还包括各类传感器50、存储器件80等外围部件,例如指纹传感器和摄像头等。其中,指纹传感器用于采集指纹。电子设备可以利用指纹传感器采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。摄像头用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件,感光元件把光信号转换成电信号,之后将电信号传递给图像信号处理器(image signal processor,ISP)转换成数字图像信号,ISP将数字图像信号输出到DSP加工处理,DSP将数字图像信号转换成标准的图像信号。ISP和DSP可以内置于SOC。其中传感器50还可以包括压力传感器、陀螺仪传感器、加速度传感器、距离传感器、接近光传感器、温度传感器、环境光传感器、骨传导传感器等,本申请对此不做限定。存储器件80可以对应于图1中介绍的存储器件107,例如包括eMMC或UFS存储器等,此处不再赘述。
以上介绍了芯片架构200的相关的元件以及电子设备中提高安全等级的实现环境,在现有芯片架构200中,当前电子设备的pin码的校验功能、生物认证密码服务以及数据保护等服务都是基于处理器提供的ARM可信区域,对应的软件可以在TEE 20中实现。应 理解,ARM可信区域以及TEE历经多年,目前在硬件的安全性上仍不足,不能达到安全芯片的安全防护高度,软件上也存在漏洞和难以证明达到高安等级,属于国际通用准则(common criteria,CC)EAL2+的认证水平,而可支持金融级别安全芯片能达到EAL5+,EAL6+安全认证等级。在电子设备的使用过程中,如何提高系统安全服务的安全级别,例如达到高安级别,是目前亟需解决的问题。
图3是本申请提供的一例系统架构示意图,如图3所示,系统架构300可以包括安卓系统层10、可信执行环境(trusted execution environment,TEE)20、SOC30、SE 40以及SE的安全运行环境70、存储器件80传感器50和安全flash芯片60等。其中,安卓系统层10、TEE 20、SE的安全运行环境70、存储器件80、传感器50等可以参照图2中对应的相关介绍,此处不再赘述。此外,本申请提供的系统架构300的SOC 30包括内置的安全元件SE 40,该SE 40和SOC 30的中央处理器相耦合,由中央处理器控制该SE 40,SE 40的安全运行环境70可以通过运行程序,提供本申请的多项安全服务。
应理解,图3中列举的SE的安全运行环境70中提供的“高安全存储服务”、“生物认证密码服务”、“可信根服务”、“防回退服务”、“密钥管理和计算服务”和“密码校验服务”等可以对应于不同的程序代码或者功能模块,通过在SE的安全运行环境70中运行该程序代码或者功能模块,实现对应的安全服务,本申请对此不做限定。
此外,系统架构300还包括专用安全存储器(secure flash)60。可选地,在本申请中,可以用专用安全flash芯片,或者独立SE芯片也可以承担安全flash芯片的功能,或者将安全flash集成成SE 105内部,本申请对此不做限定。
在本申请中,将UFS存储器称为第一存储器,将安全flash 60称为第二存储器。
应理解,该第一存储器和该第二存储器是该系统芯片SOC 30之外的不同的存储器。可选地,该第一存储器可以理解为是SE 40和中央处理器的共享存储器,该第二存储器是该安全元件SE 40的专用存储器。
具体地,第一存储器可以是手机通用的存储器。例如,我们当前手机存储器的大小一般为64GB、132GB等,有比较大的存储空间,本申请实施例涉及的第一存储器是64GB或132GB中的4MB或者16MB空间。这样的第一存储器的容量对于目前比较大的手机固有存储来说基本没有任何成本影响,即使未来随着用户需求的增长,要增大该第一存储器的容量,也不会对手机成本造成影响。第二存储器是专用安全存储器,可以实现数据的安全存储,但存储空间一般很小,几十KB到几百KB左右。具体地,可以是外部认证过的专用安全存储secure flash。一种可能的情况,该secure flash是放在SE 40的内部,属于安全认证范围,或者该secure flash属于SE 40外部的设备。
在本申请提供的数据处理的过程中,系统架构可以包括以上的部分或者全部的部件和模块,本申请对此不做限定。在本申请中,将在系统芯片SOC 30包括的SE 40中实现包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务和高安全存储服务中的至少一种,并结合安全flash、UFS存储器等存储器件,提供一种数据处理的方法,提高系统安全服务的安全级别。下面结合系统架构300和相关附图进行详细介绍。
图4是本申请实施例提供的一例处理数据的方法示意图。该方法400示出了数据存储的具体过程,应用于上述的系统架构300,包括安卓系统层10、TEE 20、SOC 30、SE 40、 存储器件80和安全flash 60、传感器50等外围部件。该方法400包括以下内容。S410,安全元件从所述TEE的应用编程接口API获取第一安全服务请求。具体地,根据图3中介绍的系统架构300可知,SOC 30可以提供可信执行环境TEE 20,并通过TEE 20的API接口获取第一安全服务请求。
可选地,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。在本申请中,以上列举的安全服务可以称为“多项安全服务”,换言之,第一安全服务可以指多项安全服务中的任意一种或者多种安全服务。相应地,第一安全服务请求用于请求生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务和高安全存储服务中的至任意一种或者多种服务。
应理解,SOC 30获取第一安全服务请求,可以是接收用户的操作,响应于用户的操作,执行第一安全服务。示例性的,该第一安全服务请求可以是系统根据用户的操作生成。例如,对以智能终端为例,对于生物认证密码服务,当用户需要解锁手机时,在点亮或者不点亮智能终端屏幕的情况下,当用户输入指纹验证信息、人脸特征信息或者其他生物验证信息时,由安卓系统层10根据用户发起的生物认证操作,调用生物认证密码服务对应的接口(例如密码校验服务HAL),从而安卓系统层10将用户的操作传递给SOC 30。SOC 30根据指纹传感器获取的用户的指纹信息,确定当前启动智能终端的生物认证密码服务,从而生成启动生物认证密码服务的指令,通过TEE 20的生物认证API,传递该生物认证密码服务的指令到SE 40。SE 40进一步通过调用TEE 20的生物认证API,从而产生生物认证密码服务请求,启动生物认证密码服务。
S420,安全元件获取该第一安全服务请求,响应于该第一安全服务请求,执行该第一安全服务以得到安全数据。S430,安全元件确定当该安全数据包括第一安全数据时,将该第一安全数据存储到该数据处理装置外的第一存储器,当该安全数据包括第二安全数据时,将该第二安全数据存储到该数据处理装置外的第二存储器,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据。
应理解,当SE 40获取了第一安全服务请求,即确定了当前要执行的第一安全服务,进一步根据第一安全服务确定执行该服务的过程需要存储的数据,该数据可以仅包括一种数据,例如第一安全数据或者第二安全数据;或者,该数据可以同时包括第一安全数据和第二安全数据两种类型的数据。需要存储的数据是由服务的类型决定的,因此SE40根据服务请求确定该服务对应的数据是哪一类。
示例性的,当第一安全服务请求用于请求执行生物认证密码服务时,SE 40确定第一安全数据是用户输入的生物模板信息(例如指纹验证信息、人脸特征信息或者其他生物验证信息),第二安全数据是对生物模板进行加密的密钥和对该生物模板进行完整性校验的信息。当第一安全服务请求用于请求执行高安全存储服务时,SE 40确定当前仅包括第一安全数据,该第一安全数据可以是用户需要保存到SE 40中的高安全级别的数据。
应理解,在图3的相关介绍中,第一存储器可以是手机通用的存储器,第二存储器是专用安全存储器。在本申请实施例中,将以UFS存储器作为第一存储器,安全flash 60作为第二存储器为例,介绍安全服务的实现过程,本申请对此不做限定。
图5是本申请实施例提供的一例数据存储过程示意图,如图5所示,SE 40可以控制 不同的安全服务的数据存储过程。具体地,SE 40可以控制UFS存储控制器和安全flash 60,其中,芯片级独立存储区域RPMB是eMMC一个比较特别的分区,用于存放一些核心敏感数据。示例性的,UFS存储器件的存储区域RPMB可以用于存储可恢复数据,安全flash60可以用于存储与本申请多项安全服务相关的不可恢复数据。
应理解,这里“可恢复数据”可以是不怕被攻击或者被擦掉的数据,或者是可再生数据。例如,UFS存储器件的存储区域RPMB可以包括SE系统数据区、注册的生物特征模板数据区等。其中,SE系统数据区可以用于存储芯片系统数据,如SE代码等,该代码可能对于每个手机都是相同的,即使被擦除也可以被恢复;注册的生物特征模板数据区可以用于存储用户注册的生物特征模板,如指纹信息、人脸信息等,本申请对此不做限定。
示例性的,当UFS存储器件的存储区域RPMB存储了用户注册的预设指纹信息,即使该预设指纹信息被攻击或者被擦掉,用户还可以重新注册并保存新的指纹信息,或者用户还可以通过数字密码、人脸特征信息验证等其他方式进行匹配,不会影响设备的使用安全,因此,该类数据为可再生数据。
还应理解,这里“不可恢复数据”可以是不能被攻击或者被擦掉的数据,或者是无法再生数据,在本申请中,可以是与多项安全服务相关的数据。例如,安全flash 60可以包括防回退数据区(64KB)、密钥存储区(32KB)、应用数据区(64KB)、高安全数据存储区(64KB)等,具体地,防回退数据区(64KB)用于存储防回退数据,密钥存储区(32KB)用于存储私钥、证书等,应用数据区(64KB)用于存储每个设备唯一的根密钥等,高安全数据存储区(64KB)用于存储用户的防盗标识信息、账户余额信息等。此类不可恢复数据如果被攻击或者擦除,可能导致设备变为开发板,或者用户数据泄露,影响设备的使用安全。
以上结合图5介绍了第一存储器和第二存储器存储的数据的类型,下面针对本申请涉及的多项安全服务分别介绍数据存储和使用过程。
1.密码校验服务或者密钥管理和计算服务
图6是本申请实施例提供的密码校验服务过程的数据处理示意图,如图6所示,SE 40可以提供密码校验服务,密码校验服务的主要逻辑是应用密钥(key)的管理和计算,以及密码鉴权过程。
以设备的文件加密存储过程为例,由用户的设置操作启动文件加密服务,由安卓系统层10的入口服务模块(gatekeeper)将用户设置的文件加密密码(例如数字密码)传递给SE 40,SE 40对该用户设置的文件加密密码通过第一密钥进行加密,将该用户设置的文件加密的密码的密文配置到UFS存储控制器中,从而再通过UFS控制器存储在外部UFS存储器,将加密该用户设置的文件加密密码的第一密钥存储到安全flash 60中。此外,SE 40可以根据用户设置的加密密码计算哈希消息认证码(hash-based message authentication code,HMAC)的数值,称为第一HMAC值。在第一密钥的存储过程中,同时将计算的第一HMAC值也存储到安全flash 60中。
相应地,在文件解密过程的密码校验过程中,由用户输入的数字密码,启动文件解密服务。SE 40根据用户当前输入的数字密码计算第二HMAC值,同时SE 40从安全flash 60中获取之前注册存储的第一HMAC值,并比较第一HMAC值和第二HMAC值是否相同。应理解,该HMAC值可以用于进行完整性校验,例如当SE 40的密码校验服务模块确定 第一HMAC值和第二HMAC值相同时,确定存储在外部UFS存储器的用户设置的密码的密文是完整的。
当SE 40的密码校验服务模块确定第一HMAC值和第二HMAC值相同时,SE 40从安全flash 60获取之前存储的第一密钥,并将该第一密钥配置到UFS存储控制器中,从而可以通过UFS控制器获取到存储在外部UFS存储器的经过加密的用户设置的密码的密文。UFS控制器因为有了正确的第一密钥,所以能够解密从UFS存储器读取的数据,从而知道用户设置的文件加密密码(例如数字密码)。
当密码鉴权通过后,可以由SE 40输出相关用户设置的文件加密密码(例如数字密码)到TEE的密码校验API,在通过密码校验API给安卓系统层的应用进行调用,进一步对文件进行解密等。以上技术方案可以在SE集成支持文件加密、密码的匹配与校验等功能,支持手机等设备的系统安全服务,提高了安全等级。
2.生物认证密码服务
图7是本申请实施例提供的生物认证密码服务过程的数据处理示意图,如图7所示,SE 40可以提供生物认证密码服务。
以设备的锁屏和解锁过程为例,由用户的设置操作启动锁屏服务,由安卓系统层10的入口服务模块(gatekeeper)将锁屏密码(例如将用户注册时录入的指纹信息、人脸信息等作为锁屏密码)传递给SE 40,SE 40对该用户注册时录入的锁屏密码通过第二密钥进行加密,将加密后的用户注册时录入的锁屏密码的密文配置到UFS存储控制器中,从而再通过UFS控制器存储在外部UFS存储器,将加密锁屏密码的第二密钥存储到安全flash60中。此外,SE 40可以根据用户注册时录入的锁屏密码计算第一HMAC值,在第一密钥的存储过程中,同时将计算的第一HMAC值也存储到安全flash 60中。
相应地,在解锁校验过程中,由用户当前输入解锁密码(例如指纹信息、人脸信息等作为解锁密码),启动解锁服务。示例性的,以指纹解锁为例,当用户接触指纹传感器输入指纹信息,TEE 20的生物认证TA对当前采集的指纹进行特征提取,提取的指纹信息送到SE 40中。SE 40根据用户当前输入的指纹信息计算第二HMAC值,同时SE 40从安全flash 60中获取之前注册存储的第一HMAC值,并比较第一HMAC值和第二HMAC值是否相同。应理解,该HMAC值可以用于进行完整性校验或者该锁屏密码没有被篡改等,例如当SE 40的密码校验服务模块确定第一HMAC值和第二HMAC值相同时,确定存储在外部UFS存储器的用户注册时录入的锁屏密码的密文是完整的。
当SE 40的生物模板匹配模块确定第一HMAC值和第二HMAC值相同时,SE 40从安全flash 60获取之前存储的第二密钥,并通过UFS控制器从外部UFS存储器获取之前存储的用户注册时录入的锁屏密码的密文。SE 40根据第二密钥解密该用户注册时录入的锁屏密码的密文到内部RAM中。SE 40再比较当前输入的指纹信息和解密得到的用户注册时录入的锁屏密码中的指纹信息进行匹配,如果匹配成功,设备解锁。
示例性的,当用户输入指纹信息,经过注册作为锁屏密码时,用户进行解锁的过程可以具体包括以下步骤:S701,用户启动解锁服务之后,传感器50(例如指纹采集传感器)获取用户的指纹信息;S702,TEE 20的生物认证TA对当前采集的指纹进行特征提取,经由API将获取的用户当前输入的指纹信息传输到SE 40;S703,SE 40的生物模板匹配模块获取用户输入的指纹信息;S704,SE 40从安全flash 60中获取当时注册的锁屏密码的 加密的第二密钥和对应的第一HMAC值;S705,SE 40通过UFS控制器从外部UFS存储器获取存储的注册的锁屏密码的密文数据;S706,SE 40根据用户当前输入的指纹信息计算第二HMAC值,同时SE 40从安全flash 60中获取之前注册存储的第一HMAC值,并比较第一HMAC值和第二HMAC值是否相同。当SE 40的生物模板匹配模块确定第一HMAC值和第二HMAC值相同时,SE 40从安全flash 60获取之前存储的第二密钥,并通过UFS控制器从外部UFS存储器获取之前存储的用户注册时录入的锁屏密码的密文。SE 40根据第二密钥解密该用户注册时录入的锁屏密码的密文到内部RAM中。SE 40再比较当前输入的指纹信息和解密得到的用户注册时录入的锁屏密码中的指纹信息进行匹配。当SE 40确定匹配成功时,对设备进行解锁。
应理解,生物模板密文可以保存在UFS存储器的RPMB中,但加密该生物模板的第二密钥会存储在安全flash 60中。在解密过程中,SE 40会将注册时的生物模板密文解密到SE 40的内部RAM中。当系统锁屏休眠时,UFS存储控制器会下电,如果将第二密钥存储到UFS存储器中,会导致第二密钥的丢失。本实施例可以避免丢失发生。
还应理解,当用户用指纹或人脸解锁时,TEE 20中的生物认证TA对采集的图像进行特征提取,提取的特征送到SE 40中。SE 40中将当前提取的特征与用户注册时的模板进行匹配和校验,如果校验通过,并返回校验成功的结果给安卓系统层10,由安卓系统层的锁屏应用进行调用,从而使系统成功解锁。还应理解,在本申请中用第一密钥、第二密钥仅仅是描述上的区分,在前述介绍密码校验服务或者密钥管理和计算服务中,第一密钥用于加密用户设置的文件加密密码,在介绍生物认证密码服务时,第二密钥用于加密用户注册时录入的锁屏密码,该第一密钥和第二密钥可以相同,可以不同。例如,对于每一种安全服务,可以根据SE 40提供的密钥管理和计算服务计算针对不同服务的密钥,计算方法可以相同可以不同,本申请对此不做限定。
以上技术方案可以在SE集成生物认证功能,支持手机等设备的安全校验、解锁服务等,提高了设备使用的安全。
3.Root of Trust服务
在本申请中,root of trust服务可以由SE提供,例如预置设备证书和密钥等,未来可以和对应的云服务建立安全通道,从而保证可信根服务器和云服务器之间的可靠通信,保证消息的私密性、完整性和不可抵赖性。具体地,生产上预置原始设备制造商(original equipment manufacturer,OEM)或云运营商的证书和私钥。示例性的,依靠root of trust服务中的安全启动功能可以提供完整性保护,从而确保设备以安全状态启动。它还可以通过强大的加密技术来保护机密性和防止克隆。在和云服务器建立安全通道进行通信过程中,以预置的证书和私钥为基础,帮助系统实现各种安全功能,例如保护和控制存储的加密密钥的使用,或者进行加密加速以提高安全操作的性能,或者限制授权实体的访问等功能。其中,可以将预置的证书和私钥存储在SE里面,以确保证书和私钥的安全性。
4.防回退服务
SE还可以为应用提供防回退服务。例如,对于防回退服务,防回退的值保存在安全flash 60中。应理解,在本申请中,根据图5的介绍,作为第二存储器的安全flash 60划分为多个区域,该多个区域中的每个区域对应不同的安全服务类型,在SE 40将所述第二安全数据存储到所述数据处理装置外的所述第二存储器时,将每个安全服务类型对应的第二 安全数据存储到该安全服务对应的区域。
对于防回退服务,可以将图5中的安全flash 60中的防回退数据区(64KB)进一步划分如图8所示。图8是本申请实施例提供的一例防回退数据区的划分示意图,如图8所示,在安全flash的防回退数据区中,针对每个应用划分不同的区域。
可选地,将防回退服务的区域进一步包括第一子区域和第二子区域;以及在执行防回退服务时,SE 40确定所述第二安全数据包括所述防回退服务的标识和计数值,所述计数值用于确定硬件攻击的次数,将所述防回退服务的标识存储到所述第一子区域,将所述计数值存储到所述第二子区域。
示例性的,每个应用具有不同的应用标识(4字节或者8字节),以及每个应用会有4字节计数器值(monotonic counter)。如图8所示,将每个应用的应用标识存储到所述第一子区域,将针对每个应用的计数值存储到所述第二子区域。当某个应用调用TEE 20的防回退服务API时,输入应用标识(例如应用ID),在安全flash的防回退数据区查找应用标识。如果已有该应用标识,则找到该应用标识,将对应的计数器值加1,并返回值给应用即可;如果没有该应用标识,则新增一个新的应用标识,将应用标识字段置成该应用的ID,计数器为1。
示例性的,以用户注册指纹过程为例,介绍防回退服务的应用方式。对于指纹注册对应第一ID,调用该第一ID的安全计数器记录用户注册指纹的次数。用户第一次以第一指纹注册为解锁指纹,第二次重新录入第二指纹为解锁指纹,该第一ID的安全计数器计数值加1,以此类推,每当用户重新注册录入一次指纹,该第一ID的安全计数器计数值在前次计数值基础上加1。防回退服务在该过程中,可以保证计数值记录用户重新注册录入指纹的次数,保证当计数值为3时,第1次第一指纹和第2次的第二指纹都无法进行解锁,保证当前解锁指纹为计数值3对应的第三指纹。
应理解,该计数器的计数值为单调递增,无法被篡改或者重置,因此,该计数器可以理解为多个应用的安全的计数器,防止被攻击,可以防止应用在使用过程中被回退或者数据回滚等。还应理解,防回退服务可以对应多个不同的应用,结合设备在使用过程中的不同场景,都可以调用SE 40的防回退服务,保证应用的正常和安全使用。
5.高安全存储服务
对于高安全存储服务,高安全存储服务的数据存储在安全flash中,可以防止被攻击或者数据被擦除。在本申请中,根据图5的介绍,作为第二存储器的安全flash 60划分为多个区域,该多个区域中的包括对应高安全存储服务的区域。
对于高安全存储服务,可以将图5中的安全flash 60中的高安全数据区(64KB)进一步划分如图9所示。图9是本申请实施例提供的一例高安全存储数据区的划分示意图。高安全存储数据区的一种管理方式如图9所示,该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,以及在执行该高安全存储服务时,SE 40可以确定该第二安全数据包括该高安全存储服务的数据段的标识信息、该高安全存储服务的数据段的长度信息和该高安全存储服务的数据段的内容;将该高安全存储服务的数据段的标识信息存储到该第一子区域,将该高安全存储服务的数据段的长度信息存储到该第二子区域,将该高安全存储服务的数据段的内容存储到该第三子区域。可选地,第一子区域可以包括用于存储每个数据段的4字节标识信息,第二子区域可以包括用于存储2字节的数据长度信 息,以及第三子区域可以用于存储有效数据存储区。当某个应用来获取自己的数据时,输入数据段的标识信息和长度信息,高安全数据服务会将有效数据传递给TEE的TA使用,再传递给该应用,从而防止被硬件攻击。示例性的,以存储手机的防盗标识过程为例,介绍高安全存储服务的过程。对于防盗应用,对应的防盗标识的ID、防盗标识的长度、防盗标识数据分别存储到前述介绍的是哪个子区域,例如“0X55a”,其中“0X”为防盗标识的ID,长度为55,防盗标识为“a”。当用户的手机丢失之后,将该防盗标识传到手机设备厂商的服务器,使得该手机处于无法使用状态。当手机找到之后,修改该高安全数据存储区的数据,例如由“0X55a”变为“0X550”,即代表手机结束被盗或者丢失状态,可以正常使用。或者,例如,对于用户的XX银行余额、公交卡余额等信息,也存储在高安全数据存储区,保证该数据不会被获取或者篡改,提高了安全等级。
应理解,以上介绍了高安全存储服务和防回退服务的数据区管理方式,作为一种示例而非限定,还有其他可能的数据区管理方式,本申请对不同服务的数据区的管理方式不做限定。
综上所述,以上介绍了不同安全服务的数据处理过程,对应于数据的存储过程,在不同的安全服务过程中还包括数据的读取以执行安全服务的过程。图10是本申请实施例提供的另一例处理数据的方法示意图。该方法1000示出了数据获取的具体过程,应用于上述的系统架构300,包括安卓系统层10、TEE 20、SOC 30、SE 40以及SE的安全运行环境70、存储器件80和安全flash 60、传感器50等外围部件。该方法1000包括以下内容。
S1010,安全元件获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务。应理解,第一安全服务可以包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务和高安全存储服务中的至少一种,在本申请中,可以称为“多项安全服务”,换言之,第一安全服务可以指多项安全服务中的至少一种服务。相应地,第一安全服务请求用于请求生物认证密码服务、密钥管理和计算服务、可信根服务、防回退服务和高安全存储服务中的至少一种服务。
S1020,当该第一安全服务所需的安全数据包括第一安全数据时,安全元件从第一存储器获取第一安全数据;当该第一安全服务所需的安全数据包括第二安全数据时,安全元件从第二存储器获取第二安全数据。应理解,所述第一安全数据包括所述芯片系统的可恢复数据,所述第二安全数据包括与所述第一安全服务相关的不可恢复数据。
S1030,安全元件根据安全数据,执行第一安全服务。其中,第一存储器和所述第二存储器是所述安全元件之外的不同存储器。可选地,第一存储器可以是手机通用的存储器,第二存储器是专用安全存储器。
在图4至图9的介绍中,分别针对不同的安全服务,已经分别介绍了数据存储和数据获取并执行不同的安全服务的过程,这里不再赘述图10中数据获取并执行不同的安全服务的过程。
应理解,以上介绍的多项安全服务,没有严格的界限划分,可以时针对用户使用某个应用,相互结合,同时在应用的使用过程中执行,也可以单独存在在某个应用的某项功能中,本申请对此不做限定。示例性的,对于用户使用指纹解锁过程,SE 40可以执行生物认证密码服务、密钥管理和计算服务等;对于用户存储手机防盗标识过程中,SE 40可以执行高安全存储服务。
以上结合图2至图10分别从数据存储和数据获取并执行安全服务两个方面具体描述了本申请实施例提供的方法。通过上述本申请提供的数据写入和读取数据的方法,首次提出了用集成到SOC的SE支持手机系统安全服务的架构和流程设计,使得高安全级别的芯片安全系统应用到手机等设备的数据保护中。具体地,使得安全元件SE集成了支持生物认证密码服务、密码校验服务、密码匹配与校验服务、文件加密服务、root of trust服务、高安全存储服务、和防回退服务等功能,可以在SE中实现安全服务,保存证书,提供给TEE TA调用。此外,在不同的安全服务中,提供了多种可能的安全flash的数据区管理方式,划分多个子区域,用于存储不同安全服务的数据。例如对于防回退服务,存储防回退数据(每个应用4字节);保存关键的密钥和设备证书,保存高安数据,保存第三方应用的数据等。通过SE结合安全级别的芯片,提高了安全等级和用户体验。
图11是本申请实施例提供的一例安全元件SE 40的组成示意图,该安全元件SE 40可以运行安全运行环境70。如图11所示,该安全元件可以对应于图3、图5、图6和图7中的SE 40。如图11所示,该安全元件可以包括:获取模块1110,用于获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务;处理模块,处理模块1120,响应于该第一安全服务请求,执行该第一安全服务以得到安全数据。当该安全数据包括第一安全数据时,该处理模块1120,将该第一安全数据存储到第一存储器,当该安全数据包括第二安全数据时,该处理模块1120,将该第二安全数据存储到第二存储器,其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。
应理解,获取模块1110和处理模块1120可以以软件、硬件或软硬件结合的方式实现。当该两个模块以软件实现,这两个模块可以运行在图1的CPU106上。
一种可能的实现方式中,该第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。一种可能的实现方式中,该第二存储器包括多个区域,以及,该处理模块1120具体用于:将该第二安全数据存储到该多个区域中与该第一安全服务对应的区域。一种可能的实现方式中,该第一安全服务包括防回退服务,该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,该处理模块1120,具体用于:将该防回退服务的标识存储到该第一子区域,将该计数值存储到该第二子区域。
一种可能的实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该处理模块1120用于获取第一用户的生物特征信息;利用该第一密钥对该生物特征信息进行加密得到该密文;根据该生物特征信息确定该MAC值;以及,将该密文存储到该第一存储器,将该第一密钥和该MAC值存储到该多个区域中对应该生物认证密码服务的区域。
一种可能的实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中每个对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,该处理模块1120用于:确定该标识信息、该长度 信息和该数据段的内容;将该标识信息存储到该第一子区域,将该长度信息存储到该第二子区域,将该内容存储到该第三子区域。
以上介绍了在数据存储过程中,安全元件40可以执行的功能或者操作,具体地,安全元件40可以执行图4中的所介绍的方法和步骤。相应地,在数据获取并执行安全服务过程中,安全元件40还可以执行图10中的所介绍的方法和步骤。具体地,获取模块1110用于获取第一安全服务请求,该第一安全服务请求用于请求第一安全服务。当该第一安全服务所需的安全数据包括第一安全数据时,该获取模块1110从第一存储器获取第一安全数据;当该第一安全服务所需的安全数据包括第二安全数据时,该获取模块1110从第二存储器获取第二安全数据。
处理模块1120,用于执行该第一安全服务。其中,该第一安全数据包括可恢复数据,该第二安全数据包括不可恢复数据,该第一存储器和该第二存储器是不同存储器。一种可能的实现方式中,该第一安全服务包括防回退服务,则该安全数据包括该第二安全数据,该第二安全数据包括该防回退服务的标识和计数值,该计数值用于确定硬件攻击的次数,该多个区域中对应该防回退服务的区域进一步包括第一子区域和第二子区域,该获取模块1110具体用于:从该第一子区域获取该防回退服务的标识,从该第二子区域获取该计数值。
一种可能的实现方式中,该第一安全服务包括生物认证密码服务,该安全数据包括该第一安全数据和该第二安全数据,该第一安全数据包括密文,该第二安全数据包括第一密钥和消息认证码MAC值;该处理模块1120具体用于:根据该第一密钥,对该密文进行解密,获取第一用户的生物特征信息;根据该MAC值校验该生物特征信息的完整性以得到校验结果;当该校验结果是该生物特征信息完整时,根据该生物特征信息和待验证用户输入的生物特征信息,判断该待验证用户是否是该第一用户;当该待验证用户是该第一用户时,生物认证验证通过;或者,当该待验证用户不是该第一用户时,生物认证验证失败。
一种可能的实现方式中,该第一安全服务包括高安全存储服务,该安全数据包括该第二安全数据,该第二安全数据包括该高安全存储服务的数据段的标识信息、该数据段的长度信息和该数据段的内容,该多个区域中对应该高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,该获取模块1110具体用于:从该第一子区域获取该标识信息,从该第二子区域获取该长度信息,从该第三子区域获取该数据段的内容。
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
图12是本申请实施例提供的一例安全元件40的组成示意图,如图12所示,该安全元件可以对应于图3、图5、图6和图7中的SE 40,或者对应于图11中的安全元件40。示例性的,该安全元件40可以包括处理器1210和接口1220。接口1220和处理器1210耦合,该处理器1210用于实现上述图3、图5、图6、图7或图11中SE 40的功能,例如,执行生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务,或执行其他数据处理的过程。例如,处理器1210可以对应图1的CPU106。接口1220则用于安全元件40与外部通信,可包括例如图1中的与PMU芯片101、安全flash芯片109或CPU104之间的通信接口。例如,处理器1210通过该接口1220与CPU104通信。
一种可能的实现方式中,该安全元件40还可以包括存储器1230。该存储器1230,用于保存必要的程序指令和数据。在本申请中,处理器1210、接口1220和存储器1230之间相互配合,通过执行计算机指令以使得安全元件40执行本申请实施例提供的数据处理的方法。例如,该存储器1230可包括图1中的RAM或ROM,此处具体不做展开。
图13是本申请实施例提供的一例数据处理装置的组成示意图,如图13所示,该数据处理装置1300包括可信执行环境TEE模块1310和安全元件SE的安全运行环境模块1320,该TEE模块1310通过应用编程接口API与该安全运行环境模块1320通信,该TEE模块1310能够获取第一安全服务请求,通过API向安全运行环境模块1320发送该第一安全服务请求,该第一安全服务请求用于请求第一安全服务;该安全运行环境模块1320响应于该第一安全服务请求,执行第一安全服务。
应理解,TEE模块1310可对应图3中的TEE 20,安全运行环境模块1320可对应图3中的安全环境70,此处具体不做展开。
图14是本申请实施例提供的又一例数据处理装置的组成示意图,如图14所示,该数据处理装置1400包括至少一个处理器1410,安全元件40,第一存储器1430和第二存储器1440,其中,第一存储器1430和第二存储器1440是该安全元件40之外的不同存储器。一种可能的实现方式中,该第一存储器是该安全元件和该至少一个处理器的共享存储器,该第二存储器是该安全元件的专用安全flash。
在本申请中,该处理器1410用于提供可信执行环境TEE,该至少一个处理器1410,安全元件40,第一存储器1430和第二存储器1440相互配合,以实现上述图3、图5、图6、图7或图11中介绍的生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务,或执行其他数据处理的过程。图14中每个部件的具体功能可参照图1或其他附图对应实施例的描述,例如分别对应图1中CPU104、SE105、处理器107和安全flash芯片109,此处不赘述。
图15是本申请实施例提供的一例电子设备的组成示意图,如图15所示,该电子设备1500可以是包含图11或图12中介绍的安全元件40的电子设备、或者包含以上图13或图14中介绍的数据处理装置的电子设备。示例性的,电子设备1500可以包括安卓系统层10、TEE 20和SE 40,且安卓系统层10、TEE 20和SE 40之间相互配合,通过执行计算机指令以使得电子设备执行本申请实施例提供的数据处理的方法,具体介绍可参考之前的描述,如参考图3中的相应描述。
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上实施例中所述功能如果以软件模块或者功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技 术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备或计算处理器,如之前所述安全元件执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (27)

  1. 一种数据处理装置,其特征在于,包括:
    至少一个处理器,用于提供可信执行环境TEE,并通过所述TEE的应用编程接口API获取第一安全服务请求,所述第一安全服务请求用于请求第一安全服务;
    安全元件,用于:
    从所述至少一个处理器获取所述第一安全服务请求;
    响应于所述第一安全服务请求,执行所述第一安全服务以得到安全数据;
    当所述安全数据包括第一安全数据时,将所述第一安全数据存储到所述数据处理装置外的第一存储器,且
    当所述安全数据包括第二安全数据时,将所述第二安全数据存储到所述数据处理装置外的第二存储器,
    其中,所述第一安全数据包括可恢复数据,所述第二安全数据包括不可恢复数据,所述第一存储器和所述第二存储器是不同存储器。
  2. 根据权利要求1所述的数据处理装置,其特征在于,所述第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
  3. 根据权利要求1或2所述的数据处理装置,其特征在于,所述第二存储器包括多个区域,以及
    在将所述第二安全数据存储到所述数据处理装置外的所述第二存储器时,所述安全元件用于将所述第二安全数据存储到所述多个区域中与所述第一安全服务对应的区域。
  4. 根据权利要求3所述的数据处理装置,其特征在于,所述第一安全服务包括防回退服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述防回退服务的标识和计数值,所述计数值用于确定硬件攻击的次数,所述多个区域中对应所述防回退服务的区域进一步包括第一子区域和第二子区域;以及
    所述安全元件具体用于:
    确定所述防回退服务的标识和计数值;
    将所述防回退服务的标识存储到所述第一子区域,将所述计数值存储到所述第二子区域。
  5. 根据权利要求3所述的数据处理装置,其特征在于,所述第一安全服务包括生物认证密码服务,所述安全数据包括所述第一安全数据和所述第二安全数据,所述第一安全数据包括密文,所述第二安全数据包括第一密钥和消息认证码MAC值;
    所述安全元件具体用于:
    获取第一用户的生物特征信息;
    利用所述第一密钥对所述生物特征信息进行加密得到所述密文;
    根据所述生物特征信息确定所述MAC值;
    将所述密文存储到所述第一存储器,将所述第一密钥和所述MAC值存储到所述多个区域中对应所述生物认证密码服务的区域。
  6. 根据权利要求3所述的数据处理装置,其特征在于,所述第一安全服务包括高安全存储服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述高安全存储服务的数据段的标识信息、所述数据段的长度信息和所述数据段的内容,所述多个区域中对应所述高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,以及
    所述安全元件具体用于:
    确定所述标识信息、所述长度信息和所述数据段的内容;
    将所述标识信息存储到所述第一子区域,将所述长度信息存储到所述第二子区域,将所述内容存储到所述第三子区域。
  7. 根据权利要求1至6中任一项所述的数据处理装置,其特征在于,所述第一存储器是所述安全元件和所述至少一个处理器的共享存储器,所述第二存储器是所述安全元件的专用安全存储器。
  8. 一种数据处理装置,其特征在于,包括:
    至少一个处理器,用于提供可信执行环境TEE,并通过所述TEE的应用编程接口API获取第一安全服务请求,所述第一安全服务请求用于请求第一安全服务;
    安全元件,用于:
    从所述至少一个处理器获取所述第一安全服务请求,
    当所述第一安全服务所需的安全数据包括第一安全数据时,从所述数据处理装置外的第一存储器获取所述第一安全数据;
    当所述第一安全服务所需的安全数据包括第二安全数据时,从所述数据处理装置外的第二存储器获取所述第二安全数据;
    执行所述第一安全服务,
    其中,所述第一安全数据包括可恢复数据,所述第二安全数据包括不可恢复数据,所述第一存储器和所述第二存储器是不同存储器。
  9. 根据权利要求8所述的数据处理装置,其特征在于,所述第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
  10. 根据权利要求8或9所述的数据处理装置,其特征在于,所述第二存储器包括多个区域,以及
    在从所述数据处理装置外的第二存储器获取所述第二安全数据时,所述安全元件用于从所述多个区域中与所述第一安全服务对应的区域获取所述第二安全数据。
  11. 根据权利要求10所述的数据处理装置,其特征在于,所述第一安全服务包括防回退服务,则所述安全数据包括所述第二安全数据,所述第二安全数据包括所述防回退服务的标识和计数值,所述计数值用于确定硬件攻击的次数,所述多个区域中对应所述防回退服务的区域进一步包括第一子区域和第二子区域;以及
    所述安全元件具体用于:
    从所述第一子区域获取所述防回退服务的标识,从所述第二子区域获取所述计数值。
  12. 根据权利要求10所述的数据处理装置,其特征在于,所述第一安全服务包括生物认证密码服务,所述安全数据包括所述第一安全数据和所述第二安全数据,所述第一安 全数据包括密文,所述第二安全数据包括第一密钥和消息认证码MAC值;
    所述安全元件具体用于:
    从所述第一存储器获取所述密文,从所述第二存储器获取所述第一密钥和所述MAC值;
    根据所述第一密钥,对所述密文进行解密,获取第一用户的生物特征信息;
    根据所述MAC值校验所述生物特征信息的完整性以得到校验结果;
    当所述校验结果是所述生物特征信息完整时,根据所述生物特征信息和待验证用户输入的生物特征信息,判断所述待验证用户是否是所述第一用户;
    当所述待验证用户是所述第一用户时,生物认证验证通过;或者,
    当所述待验证用户不是所述第一用户时,生物认证验证失败。
  13. 根据权利要求10所述的数据处理装置,其特征在于,所述第一安全服务包括高安全存储服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述高安全存储服务的数据段的标识信息、所述数据段的长度信息和所述数据段的内容,所述多个区域中对应所述高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,以及
    所述安全元件具体用于:
    从所述第一子区域获取所述标识信息,从所述第二子区域获取所述长度信息,从所述第三子区域获取所述数据段的内容。
  14. 根据权利要求8至13中任一项所述的数据处理装置,其特征在于,所述第一存储器是所述安全元件和所述至少一个处理器的共享存储器,所述第二存储器是所述安全元件的专用安全存储器。
  15. 一种数据处理设备,其特征在于,所述数据处理设备包括:如权利要求1至14中任一项所述的数据处理装置、第一存储器和第二存储器。
  16. 一种数据处理的方法,其特征在于,包括:
    获取第一安全服务请求,所述第一安全服务请求用于请求第一安全服务;
    响应于所述第一安全服务请求,执行所述第一安全服务以得到安全数据;
    当所述安全数据包括第一安全数据时,将所述第一安全数据存储到第一存储器,
    当所述安全数据包括第二安全数据时,将所述第二安全数据存储到第二存储器,
    其中,所述第一安全数据包括可恢复数据,所述第二安全数据包括不可恢复数据,所述第一存储器和所述第二存储器是不同存储器。
  17. 根据权利要求16所述的方法,其特征在于,所述第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
  18. 根据权利要求16或17所述的方法,其特征在于,所述第二存储器包括多个区域,以及,所述将所述第二安全数据存储到第二存储器,包括:
    将所述第二安全数据存储到所述多个区域中与所述第一安全服务对应的区域。
  19. 根据权利要求18所述的方法,其特征在于,所述第一安全服务包括防回退服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述防回退服务的标识和计数值,所述计数值用于确定硬件攻击的次数,所述多个区域中对应所述防回退服务的区域 进一步包括第一子区域和第二子区域,
    以及,所述将所述第二安全数据存储到第二存储器,包括:
    将所述防回退服务的标识存储到所述第一子区域,将所述计数值存储到所述第二子区域。
  20. 根据权利要求18所述的方法,其特征在于,所述第一安全服务包括生物认证密码服务,所述安全数据包括所述第一安全数据和所述第二安全数据,所述第一安全数据包括密文,所述第二安全数据包括第一密钥和消息认证码MAC值;
    所述执行所述第一安全服务以得到安全数据包括:
    获取第一用户的生物特征信息;
    利用所述第一密钥对所述生物特征信息进行加密得到所述密文;
    根据所述生物特征信息确定所述MAC值;
    以及,所述将所述第一安全数据存储到第一存储器,将所述第二安全数据存储到第二存储器,包括:
    将所述密文存储到所述第一存储器,将所述第一密钥和所述MAC值存储到所述多个区域中对应所述生物认证密码服务的区域。
  21. 根据权利要求18所述的方法,其特征在于,所述第一安全服务包括高安全存储服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述高安全存储服务的数据段的标识信息、所述数据段的长度信息和所述数据段的内容,所述多个区域中每个对应所述高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,
    所述执行所述第一安全服务以得到安全数据包括:
    确定所述标识信息、所述长度信息和所述数据段的内容;
    以及,所述将所述第二安全数据存储到第二存储器,包括:
    将所述标识信息存储到所述第一子区域,将所述长度信息存储到所述第二子区域,将所述内容存储到所述第三子区域。
  22. 一种数据处理的方法,其特征在于,包括:
    获取第一安全服务请求,所述第一安全服务请求用于请求第一安全服务;
    当所述第一安全服务所需的安全数据包括第一安全数据时,从第一存储器获取第一安全数据;
    当所述第一安全服务所需的安全数据包括第二安全数据时,从第二存储器获取第二安全数据;
    执行所述第一安全服务,
    其中,所述第一安全数据包括可恢复数据,所述第二安全数据包括不可恢复数据,所述第一存储器和所述第二存储器是不同存储器。
  23. 根据权利要求22所述的方法,其特征在于,所述第一安全服务包括生物认证密码服务、密码校验服务、密钥管理和计算服务、可信根服务、防回退服务或高安全存储服务中的至少一种服务。
  24. 根据权利要求22或23所述的方法,其特征在于,所述第二存储器包括多个区域,以及,所述从第二存储器获取第二安全数据,包括:
    从所述多个区域中与所述第一安全服务对应的区域获取所述第二安全数据。
  25. 根据权利要求24所述的方法,其特征在于,所述第一安全服务包括防回退服务,则所述安全数据包括所述第二安全数据,所述第二安全数据包括所述防回退服务的标识和计数值,所述计数值用于确定硬件攻击的次数,所述多个区域中对应所述防回退服务的区域进一步包括第一子区域和第二子区域,
    以及,所述从第二存储器获取第二安全数据,包括:
    从所述第一子区域获取所述防回退服务的标识,从所述第二子区域获取所述计数值。
  26. 根据权利要求24所述的方法,其特征在于,所述第一安全服务包括生物认证密码服务,所述安全数据包括所述第一安全数据和所述第二安全数据,所述第一安全数据包括密文,所述第二安全数据包括第一密钥和消息认证码MAC值;
    所述执行所述第一安全服务,包括:
    根据所述第一密钥,对所述密文进行解密,获取第一用户的生物特征信息;
    根据所述MAC值校验所述生物特征信息的完整性以得到校验结果;
    当所述校验结果是所述生物特征信息完整时,根据所述生物特征信息和待验证用户输入的生物特征信息,判断所述待验证用户是否是所述第一用户;
    当所述待验证用户是所述第一用户时,生物认证验证通过;或者,
    当所述待验证用户不是所述第一用户时,生物认证验证失败。
  27. 根据权利要求24所述的方法,其特征在于,所述第一安全服务包括高安全存储服务,所述安全数据包括所述第二安全数据,所述第二安全数据包括所述高安全存储服务的数据段的标识信息、所述数据段的长度信息和所述数据段的内容,所述多个区域中对应所述高安全存储服务的区域进一步包括第一子区域、第二子区域和第三子区域,
    所述从第二存储器获取第二安全数据,包括:
    从所述第一子区域获取所述标识信息,从所述第二子区域获取所述长度信息,从所述第三子区域获取所述数据段的内容。
PCT/CN2019/116616 2019-11-08 2019-11-08 数据处理的方法、装置和系统芯片 WO2021087956A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201980007190.0A CN113168477A (zh) 2019-11-08 2019-11-08 数据处理的方法、装置和系统芯片
PCT/CN2019/116616 WO2021087956A1 (zh) 2019-11-08 2019-11-08 数据处理的方法、装置和系统芯片
EP19951495.1A EP4036775A4 (en) 2019-11-08 2019-11-08 DATA PROCESSING METHOD AND DEVICE AND SYSTEM CHIP

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/116616 WO2021087956A1 (zh) 2019-11-08 2019-11-08 数据处理的方法、装置和系统芯片

Publications (1)

Publication Number Publication Date
WO2021087956A1 true WO2021087956A1 (zh) 2021-05-14

Family

ID=75849246

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/116616 WO2021087956A1 (zh) 2019-11-08 2019-11-08 数据处理的方法、装置和系统芯片

Country Status (3)

Country Link
EP (1) EP4036775A4 (zh)
CN (1) CN113168477A (zh)
WO (1) WO2021087956A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089967A (zh) * 2022-05-12 2023-05-09 荣耀终端有限公司 数据防回滚方法和电子设备
CN117459763A (zh) * 2023-12-22 2024-01-26 杭州海康威视数字技术股份有限公司 基于动态编排的音视频安全保护方法、设备和系统

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116484431B (zh) * 2023-06-21 2024-05-17 荣耀终端有限公司 一种数据保护方法、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100061133A1 (en) * 2008-09-05 2010-03-11 Genesys Logic, Inc. Memory module and method of performing the same
CN104850796A (zh) * 2015-04-17 2015-08-19 深圳市硅格半导体有限公司 一种存储设备及其访问方法
CN107027115A (zh) * 2017-04-18 2017-08-08 深圳融卡智能科技有限公司 一种安全实现软sim卡的设备及方法
CN108962321A (zh) * 2017-05-17 2018-12-07 置富科技(深圳)股份有限公司 一种擦除存储芯片的方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127483A (zh) * 2016-06-30 2016-11-16 华为技术有限公司 移动支付方法、片上系统及终端
CN110086609B (zh) * 2019-03-27 2020-10-09 华为技术有限公司 数据安全备份和安全恢复的方法及电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100061133A1 (en) * 2008-09-05 2010-03-11 Genesys Logic, Inc. Memory module and method of performing the same
CN104850796A (zh) * 2015-04-17 2015-08-19 深圳市硅格半导体有限公司 一种存储设备及其访问方法
CN107027115A (zh) * 2017-04-18 2017-08-08 深圳融卡智能科技有限公司 一种安全实现软sim卡的设备及方法
CN108962321A (zh) * 2017-05-17 2018-12-07 置富科技(深圳)股份有限公司 一种擦除存储芯片的方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4036775A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116089967A (zh) * 2022-05-12 2023-05-09 荣耀终端有限公司 数据防回滚方法和电子设备
CN116089967B (zh) * 2022-05-12 2024-03-26 荣耀终端有限公司 数据防回滚方法和电子设备
CN117459763A (zh) * 2023-12-22 2024-01-26 杭州海康威视数字技术股份有限公司 基于动态编排的音视频安全保护方法、设备和系统
CN117459763B (zh) * 2023-12-22 2024-03-01 杭州海康威视数字技术股份有限公司 基于动态编排的音视频安全保护方法、设备和系统

Also Published As

Publication number Publication date
CN113168477A (zh) 2021-07-23
EP4036775A4 (en) 2022-09-14
EP4036775A1 (en) 2022-08-03

Similar Documents

Publication Publication Date Title
KR102399582B1 (ko) 모바일 디바이스를 사용한 시스템 액세스
CN110741370B (zh) 利用用户输入的生物识别认证
CN108985024B (zh) 响应于试图访问敏感信息的认证技术
US11531758B2 (en) Provision of domains in secure enclave to support multiple users
US10846696B2 (en) Apparatus and method for trusted execution environment based secure payment transactions
WO2020192406A1 (zh) 数据存储、验证方法及装置
US9891969B2 (en) Method and apparatus for device state based encryption key
WO2021087956A1 (zh) 数据处理的方法、装置和系统芯片
CN108476404A (zh) 安全设备配对
EP2727040B1 (en) A secure hosted execution architecture
WO2013107362A1 (zh) 一种保护数据的方法和系统
US11455432B1 (en) Multi-user storage volume encryption via secure processor
TW201539242A (zh) 板上小型應用程式移轉
JP2007512787A (ja) トラステッド・モバイル・プラットフォーム・アーキテクチャ
TWI424321B (zh) 雲端儲存系統及方法
US11228421B1 (en) Secure secrets to mitigate against attacks on cryptographic systems
JP7406013B2 (ja) 構成設定の安全な署名
TW201530344A (zh) 應用程式存取保護方法及應用程式存取保護裝置
US8738924B2 (en) Electronic system and digital right management methods thereof
US11366933B2 (en) Multi-device unlocking of a data storage device
WO2010130171A1 (zh) 一种移动终端及保护其系统数据的方法
CN115544586B (zh) 用户数据的安全存储方法、电子设备及存储介质
JP5806187B2 (ja) 秘密情報の交換方法およびコンピュータ
US11017062B2 (en) Method for the secure interaction of a user with a mobile terminal and a further entity
WO2019210490A1 (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: 19951495

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019951495

Country of ref document: EP

Effective date: 20220428

NENP Non-entry into the national phase

Ref country code: DE