WO2019007252A1 - 一种控制方法及装置 - Google Patents

一种控制方法及装置 Download PDF

Info

Publication number
WO2019007252A1
WO2019007252A1 PCT/CN2018/093269 CN2018093269W WO2019007252A1 WO 2019007252 A1 WO2019007252 A1 WO 2019007252A1 CN 2018093269 W CN2018093269 W CN 2018093269W WO 2019007252 A1 WO2019007252 A1 WO 2019007252A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
digital certificate
session key
key
application
Prior art date
Application number
PCT/CN2018/093269
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 阿里巴巴集团控股有限公司
Publication of WO2019007252A1 publication Critical patent/WO2019007252A1/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/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
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • 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/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72415User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories for remote control of appliances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a control method and apparatus.
  • smart mobile terminals such as smart phones
  • some devices can be controlled using smart mobile terminals.
  • a specific example is the use of a smartphone to control the switch of a vehicle door.
  • the smart phone establishes a Bluetooth link with the vehicle-mounted terminal provided in the vehicle, and transmits a control command for driving the door to the vehicle-mounted terminal through the Bluetooth link, and the vehicle-mounted terminal opens the door according to the control command.
  • the illegal smartphone can send an instruction to open the door to the vehicle terminal of the vehicle, and trigger the vehicle terminal to open the door.
  • the embodiment of the present application discloses a control method and device for improving the security of the control operation.
  • a control method comprising:
  • the mobile terminal sends a session key acquisition request to the control terminal connected to the mobile terminal according to the door lock control request;
  • the control terminal generates a session key according to the session key acquisition request, encrypts the session key by using a public key of the digital certificate, and sends the encrypted session key to the mobile terminal;
  • the mobile terminal decrypts the private key of the digital certificate to obtain the session key, generates a door lock control instruction according to the door lock control request, encrypts the door lock control command by using the session key, and encrypts the door a lock control command is sent to the control terminal;
  • the control terminal decrypts the door lock control command by using the session key, and performs a door lock control operation according to the decrypted door lock control command.
  • a control method comprising:
  • the mobile terminal sends a session key acquisition request to the control terminal connected to the mobile terminal according to the door lock control request;
  • the mobile terminal decrypts the private key of the digital certificate to obtain the session key, generates a door lock control instruction according to the door lock control request, and encrypts the door lock control instruction by using the session key;
  • the mobile terminal sends an encrypted door lock control command to the control terminal, and the door lock control command is used to instruct the control terminal to perform a corresponding door lock control operation.
  • the digital key certificate is included in the session key acquisition request.
  • the mobile terminal includes a first application and a second application, where the second application is a trusted application; the mobile terminal decrypts the private key of the digital certificate to obtain the session key, and uses the
  • the session key encryption door lock control instruction includes: the first application sends the received encrypted session key to the second application; and the second application obtains from the secure storage area of the mobile terminal a private key of the digital certificate, and decrypted using the obtained private key to obtain a session key; the mobile terminal sends the encrypted door lock control command to the control terminal, including: the second application uses the decrypted session The key encrypts the door lock control command and sends the encrypted door lock control command to the first application; the first application sends the encrypted door lock control command to the control terminal.
  • the acquiring, by the second application, the private key of the digital certificate from the secure storage area includes: the second application acquiring a private key of the digital certificate from a secure storage area, where a private key of the digital certificate is The device key is encrypted; the second application acquires the device secret key from the read-only storage area, and decrypts the private key of the encrypted digital certificate using the device secret key.
  • the mobile terminal includes a first application and a second application, where the second application is a trusted application; the method further includes: the second application generates a private key of the digital certificate, from the mobile The read-only storage area of the terminal reads the device key, encrypts the private key by using the device secret key, and stores the encrypted private key in a secure storage area of the mobile terminal; the second application is first The application sends a digital certificate request, the first application sends the digital certificate request to an authentication server, and the second application receives a digital certificate sent by the authentication server according to the digital certificate request, where the digital certificate includes The public key, the validity period information of the digital certificate.
  • the mobile terminal sends a session key acquisition request to the control terminal connected to the mobile terminal according to the door lock control request, including: the mobile terminal receives the door lock control request submitted by the user through the user interface of the door lock control application, Determining whether a connection is established between the control terminals associated with the door lock control application; if a connection has been established, transmitting a session key acquisition request to the control terminal through the connection.
  • connection is a Bluetooth connection.
  • a control method comprising:
  • the control terminal receives a session key acquisition request sent by the mobile terminal connected to the control terminal;
  • the control terminal generates a session key according to the session key acquisition request, encrypts the session key by using a public key of the digital certificate, and sends the encrypted session key to the mobile terminal;
  • the control terminal receives the encrypted door lock control command sent by the mobile terminal, decrypts the door lock control command by using the session key, and performs a corresponding door lock control operation according to the decrypted door lock control command.
  • the session key acquisition request includes a digital certificate
  • the method further includes: the control terminal sending, to the authentication server, an authentication request for confirming whether the digital certificate is valid, the verification request is used to trigger The authentication server returns a verification result indicating that the digital certificate is valid if the digital certificate is not recovered and is within a valid period; the control terminal receives the verification result returned by the authentication server, and according to the The verification result confirms whether the digital certificate is valid.
  • control terminal and the mobile terminal are connected by using Bluetooth.
  • a control method including:
  • the first terminal sends a session key request to the second terminal connected to the first terminal according to the control request to the controlled device;
  • the first terminal sends the encrypted control command to the second terminal, where the control command is used to instruct the second terminal to perform a corresponding control operation on the controlled device.
  • the first terminal includes a first application and a second application, where the second application is a trusted application; and the first terminal decrypts the session key by using a private key of the digital certificate.
  • encrypting the control instruction by using the session key comprising: the first application sending the received encrypted session key to the second application; and the second application is securely storing from the first mobile terminal
  • the area obtains the private key of the digital certificate, and uses the obtained private key to decrypt the session key;
  • the mobile terminal sends the encrypted control command to the second terminal, including: the second application uses the decryption to obtain
  • the session key encrypts the control command and sends the encrypted control command to the first application; the first application sends the encrypted control command to the second terminal.
  • the acquiring, by the second application, the private key of the digital certificate from the secure storage area includes: the second application acquiring a private key of the digital certificate from a secure storage area, where a private key of the digital certificate is The device key is encrypted; the second application acquires the device secret key from the read-only storage area, and decrypts the private key of the encrypted digital certificate using the device secret key.
  • a control method including:
  • the second terminal receives a session key acquisition request sent by the first terminal connected to the second terminal;
  • the second terminal generates a session key according to the session key acquisition request, encrypts the session key by using a public key of the digital certificate, and sends the encrypted session key to the first terminal;
  • the second terminal receives the encrypted control command sent by the first terminal, decrypts the control command by using the session key, and performs a corresponding control operation on the controlled device according to the decrypted control command.
  • the session key acquisition request includes a digital certificate
  • the method further includes: the second terminal sending, to the authentication server, an authentication request for confirming whether the digital certificate is valid, the verification request is used for Trimming the authentication server to return a verification result indicating that the digital certificate is valid if the digital certificate is not reclaimed and within a validity period; and the terminal receives the verification result returned by the authentication server, and according to the The verification result confirms whether the digital certificate is valid.
  • a sixth aspect provides a mobile terminal, including: a first application module, a second application module, and a transceiver;
  • a first application module configured to send, by the transceiver, a session key acquisition request to a control terminal connected to the mobile terminal according to a door lock control request; and receiving, by the transceiver, the control terminal according to the
  • the secret key session acquires the session secret key sent by the request, and sends the encrypted session secret key to the second application module; the session secret key is encrypted by using the public key of the digital certificate;
  • a second application module configured to decrypt the session key by using a private key of the digital certificate, generate a door lock control instruction according to the door lock control request, and encrypt the door lock control instruction by using the session key And transmitting the encrypted door lock control command to the first application module;
  • the first application module is further configured to send, by the transceiver, an encrypted door lock control command to the control terminal, where the door lock control command is used to instruct the control terminal to perform a corresponding door lock control operation.
  • the digital key certificate is included in the session key acquisition request.
  • the second application module is specifically configured to: obtain a private key of the digital certificate from a secure storage area, where a private key of the digital certificate is encrypted by a device key; and the obtained from the read-only storage area The device key and decrypt the private key of the encrypted digital certificate using the device secret key.
  • the second application module is further configured to: generate a private key of the digital certificate, read a device key from a read-only storage area of the mobile terminal, encrypt the private key by using the device secret key, and And storing the encrypted private key in the secure storage area of the mobile terminal, and sending a digital certificate request to the first application;
  • the first application module is further configured to: send the digital certificate request to the authentication by using the transceiver
  • the server receives, by the transceiver, a digital certificate that is sent by the authentication server according to the digital certificate request, where the digital certificate includes the public key and validity period information of the digital certificate.
  • the first application module is specifically configured to: receive a door lock control request submitted by a user through a user interface of the door lock control application, and determine whether a connection is established between the control terminals associated with the door lock control application;
  • the transceiver is specifically configured to: if a connection is established, send a session key acquisition request to the control terminal through the connection.
  • connection is a Bluetooth connection.
  • a seventh aspect provides a control terminal, including: a session key processing module, a control instruction processing module, and a transceiver;
  • a session key processing module configured to receive, by the transceiver, a session key acquisition request sent by a mobile terminal connected to the control terminal, generate a session key according to the session key acquisition request, and use a public key of a digital certificate Encrypting the session key and transmitting the encrypted session key to the mobile terminal through the transceiver;
  • a control instruction processing module configured to receive, by the transceiver, an encrypted door lock control instruction sent by the mobile terminal, decrypt the obtained door lock control instruction by using the session secret key, and obtain a door lock control instruction according to the decryption Perform the corresponding door lock control operation.
  • the session key acquisition request includes a digital certificate
  • the control terminal further includes: a certificate verification module, configured to send, by using the transceiver, an authentication for confirming whether the digital certificate is valid, to the authentication server a request, the verification request is used to trigger the authentication server to return a verification result indicating that the digital certificate is valid if the digital certificate is not reclaimed and within a validity period; and receiving, by the transceiver Determining the verification result returned by the authentication server, and confirming whether the digital certificate is valid according to the verification result.
  • connection is a Bluetooth connection.
  • the eighth aspect provides a terminal, including: a first application module, a second application module, and a transceiver;
  • a first application module configured to send, by the transceiver, a session key acquisition request to a second terminal connected to the first terminal according to a control request to the controlled device; and receive, by the transceiver, the The second terminal acquires the session key sent by the request according to the secret key session, and sends the encrypted session key to the second application module; the session key is encrypted by using the public key of the digital certificate;
  • a second application module configured to decrypt the session key by using a private key of the digital certificate, generate a control instruction according to the control request, encrypt the control instruction with the session key, and encrypt the control instruction Sending to the first application module;
  • the first application module is further configured to send, by the transceiver, an encrypted control command to the control terminal, where the control command is used to instruct the second terminal to perform a corresponding control operation on the controlled device.
  • the second application module is specifically configured to: obtain a private key of the digital certificate from a secure storage area, where a private key of the digital certificate is encrypted by a device key; and the obtained from the read-only storage area The device key and decrypt the private key of the encrypted digital certificate using the device secret key.
  • a ninth aspect provides a terminal, including: a session key processing module, a control instruction processing module, and a transceiver;
  • a session key processing module configured to receive, by the transceiver, a session key acquisition request sent by a first terminal connected to the second terminal, generate a session key according to the session key acquisition request, and use a digital certificate
  • the public key encrypts the session key, and sends the encrypted session key to the first terminal by using the transceiver;
  • control instruction processing module configured to receive, by using the transceiver, an encrypted control instruction sent by the first terminal, decrypting the control command by using the session key, and performing a controlled instruction on the controlled device according to the decrypted control instruction Control the operation accordingly.
  • the session key acquisition request includes a digital certificate
  • the second terminal further includes: a certificate verification module, configured to send, by using the transceiver, an authentication server to confirm whether the digital certificate is valid.
  • a verification request for triggering the authentication server to return a verification result indicating that the digital certificate is valid if the digital certificate is not reclaimed and within a validity period; and receiving by the transceiver The verification result returned by the authentication server, and confirming whether the digital certificate is valid according to the verification result.
  • one or more computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the communication device to perform any of the second aspects described above The method described.
  • one or more computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the communication device to perform any of the above third aspects Said method.
  • one or more computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the communication device to perform any of the above fourth aspects Said method.
  • one or more computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the communication device to perform any of the above fifth aspects Said method.
  • an apparatus comprising: one or more processors; and one or more computer readable media having instructions stored thereon, the instructions being processed by the one or more The apparatus, when executed, causes the apparatus to perform the method of any of the above second or fourth aspect.
  • an apparatus comprising: one or more processors; and one or more computer readable media having instructions stored thereon, the instructions being processed by the one or more The apparatus, when executed, causes the apparatus to perform the method of any of the above third or fifth aspect.
  • the first terminal (such as a mobile terminal) sends a session secret to a second terminal (such as a control terminal) connected to the first terminal when it is required to control the controlled device (such as a door lock).
  • the second terminal generates a session key and encrypts it by using the private key of the digital certificate, and then sends the key to the first terminal.
  • the first terminal decrypts the private key of the digital certificate to obtain the session key, and encrypts the control command with the session key. And transmitting the encrypted control command to the second terminal, so that the second terminal performs a corresponding control operation on the controlled device according to the control instruction.
  • the second terminal encrypts the session key with the public key of the digital certificate.
  • the first terminal encrypts the control command with the session key, thereby ensuring the security of the control command transmission.
  • FIG. 1 exemplarily shows a schematic diagram of a system architecture used in an embodiment of the present application
  • FIG. 2 is a schematic flowchart showing a control of a controlled device according to an embodiment of the present application
  • FIG. 3 is a schematic diagram showing an application flow of a digital certificate provided by an embodiment of the present application.
  • FIG. 4 exemplarily shows a schematic diagram of a TEE architecture provided by an embodiment of the present application
  • FIG. 5 exemplarily shows a schematic flowchart of controlling a controlled device based on TEE technology
  • FIG. 6 exemplarily shows a schematic flowchart of a digital certificate application implemented based on TEE technology
  • FIG. 7 is a schematic structural diagram of a first terminal provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a second terminal provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an apparatus provided by an embodiment of the present application.
  • FIG. 10 exemplarily shows a schematic structural diagram of a device provided by another embodiment of the present application.
  • references to "an embodiment”, “an embodiment”, “an illustrative embodiment” or the like in the specification are intended to mean that the described embodiments may include specific features, structures, or characteristics, but each embodiment may or may not necessarily include a particular Feature, structure or characteristic. Moreover, such phrases are not necessarily referring to the same embodiments. Further, it is to be understood that the specific features, structures, or characteristics may be combined with other embodiments, whether explicitly described or not, in conjunction with the embodiments. In addition, it should be understood that items included in the list in the form of "at least one of A, B, and C” may represent (A); (B); (C); (A and B); (A and C) ; (B and C); or (A, B and C). Similarly, items listed in the form of "at least one of A, B or C” may represent (A); (B); (C); (A and B); (A and C); (B and C) or (A, B and C).
  • the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments can also be implemented as instructions carried or stored by one or more transitory or non-transitory machine readable (eg, computer readable) storage media, which can be read by one or more processors And execution.
  • a machine-readable storage medium may be embodied in any storage device, mechanism or other physical structure for storing or transmitting information in a machine readable form (eg, a volatile or nonvolatile memory, media disk or other medium). ).
  • FIG. 1 exemplarily shows a system architecture used in an embodiment of the present application.
  • the architecture may include: a first terminal 101, a second terminal 102, a controlled device 103, and an authentication server 104.
  • the first terminal 101 and the second terminal 102 have wireless communication functions.
  • the authentication server 104 is mainly used for the issuance and management of the digital certificate, and the second terminal 102 can encrypt the session key generated by the second terminal 102 using the public key of the digital certificate and send it to the first terminal 101, and the first terminal 101 can use the digital certificate.
  • the secret key is decrypted to obtain the session key, and the session key encryption control command is sent to the second terminal 102.
  • the second terminal 102 can decrypt the control command by using the session key, and perform control operations on the controlled device 104 according to the control instruction.
  • a communication link may be established between the first terminal 101 and the second terminal 102, and the first terminal 101 may send a digital certificate to the second terminal 102 through the communication link, and the second terminal 102 may use the communication link to the first terminal.
  • the session key is transmitted by the first terminal 101 using the session key to encrypt the control command, and the encrypted control command is transmitted to the second terminal 102 via the communication link.
  • the communication link may be a wireless link based on a Bluetooth communication protocol, or may be based on links of other communication protocols, including but not limited to: Wi-Fi, Ethernet (ethernet), Dedicated Short Range Communications (DSRC).
  • the second terminal 102 is electrically connected to the controlled device 103, and the second terminal 102 can perform corresponding control operations on the controlled device 103 according to the control command sent by the first terminal 101.
  • the first terminal 101 and the second terminal 102 respectively exchange information with the authentication server 104 via the network 105.
  • the first terminal 101 can obtain a digital certificate from the authentication server 104, and the second terminal 102 can request the authentication server 104 to perform validity verification on the digital certificate.
  • the network 105 may be a wireless cellular network, such as a Long Term Evolution (LTE) system or an evolved system thereof.
  • LTE Long Term Evolution
  • the first terminal 101 may be a mobile terminal, and specifically may be a smart phone, a tablet computer, a notebook computer, a personal digital assistant (PDA), a smart wearable device, or the like.
  • the second terminal 102 can be a control terminal, such as an in-vehicle terminal. In the home environment, the control terminal can also be a smart device such as a router or a smart audio.
  • the first terminal 101 is a smart terminal, such as a smart phone
  • the second terminal 102 is an in-vehicle terminal, which is a device for communication in a car, generally supports Bluetooth, 3G/4G, Wi-Fi, A communication technology such as DSRC is also used as a standby wake-up device
  • the controlled device 103 is a door lock device, such as a door lock control device for a vehicle, for controlling opening and closing of the door.
  • the first terminal 101 may be implemented by using a Trusted Execution Entity (TEE) hardware technology, and the authentication server 104 may be a trusted server.
  • TEE Trusted Execution Entity
  • the embodiment of the present application uses the secret key pair mechanism of the digital certificate to encrypt and decrypt the session key, and the session key is used to encrypt and decrypt the control command sent by the first terminal to the second terminal, thereby improving the Controls the security of command transmission, which in turn improves the security of control operations on controlled devices.
  • the digital certificate is a digitally signed electronic file, which may include a public key (ie, a public key), owner information, and a public key. Digital certificates can only be valid for a specific period of time.
  • FIG. 2 exemplarily shows a flow chart of controlling a controlled device according to an embodiment of the present application. As shown, the process can include:
  • the first terminal sends a session key request to the second terminal connected to the first terminal according to the control request for the controlled device.
  • the first terminal may generate the session key acquisition request according to a request initiated by the user to perform a control operation on the controlled device, and send the session key acquisition request to the second terminal.
  • the user can initiate a request for a control operation of the controlled device in multiple manners, for example, an application for controlling the door lock exists in the first terminal, and the application provides a user operation interface for the user to submit control through the screen operation. request.
  • the request is initiated by the user gesture on the user interface, and the first terminal determines, according to the identification of the user gesture, that the request initiated by the user for controlling the controlled device is received, and, for example, the user may
  • the first terminal according to the voice recognition, determines that the user initiates a request for performing a control operation on the controlled device.
  • the session key acquisition request may be sent to the second through the communication link.
  • the terminal otherwise, may establish a communication link with the second terminal, and then send the session key acquisition to the second terminal through the communication link.
  • the session key acquisition request sent by the first terminal may include a digital certificate.
  • the first terminal may obtain the digital certificate corresponding to the application according to the application corresponding to the control request.
  • the second terminal may generate a session key according to the session key acquisition request, encrypt the session key by using a public key of the digital certificate, and encrypt the session secret.
  • the key is sent to the first terminal.
  • the session key may use a key of a symmetric encryption algorithm.
  • the session key can be generated at each session and terminated after the session ends.
  • a “session” refers to generating a session key once after receiving the digital certificate sent by the first terminal, and transmitting the session key to the first terminal, and receiving the session key to be encrypted by the first terminal. Control command, decryption with the session key, and execution of the decrypted control command.
  • the second terminal further verifies the digital certificate, and generates a session key after the verification is passed.
  • the second terminal can implement a validity verification process for the digital certificate by interacting with the authentication server. Specifically, the second terminal sends, to the authentication server, an authentication request for confirming whether the digital certificate is valid, and the verification request may include the digital certificate of the requested verification or the index information of the digital certificate that is requested to be verified; the authentication server receives the After verifying the request, it may be determined whether the digital certificate requested for verification has been recycled, and if not, whether the digital certificate is within the validity period, and if it is within the validity period, returning the verification result valid to the second terminal, Otherwise, the verification result that the verification is invalid is returned to the second terminal.
  • the second terminal may save the digital certificate for later use.
  • the first terminal After receiving the encrypted session key, the first terminal decrypts the private key of the digital certificate to obtain a session key, generates a control instruction according to the control request, and encrypts the control command with the decrypted session key, and the control instruction uses The second terminal is instructed to perform corresponding control on the controlled device.
  • S204 The first terminal sends the encrypted control command to the second terminal.
  • the second terminal After receiving the encrypted control instruction, the second terminal decrypts using the session key to obtain a control instruction, and performs corresponding control operations on the controlled device according to the control instruction.
  • FIG. 3 is a schematic diagram showing an application flow of a digital certificate provided by an embodiment of the present application.
  • the process can include:
  • the first terminal generates a public key and a private key of the digital certificate.
  • the digital certificate corresponds to an application for controlling the controlled device.
  • the first terminal sends a digital certificate request to the authentication server, where the digital certificate request includes a public key of the digital certificate.
  • S303 Perform the necessary identity authentication between the first terminal and the authentication server, and after the identity authentication is passed, the authentication server sends a digital certificate to the first terminal, where the digital certificate includes the public key and the validity period of the digital certificate. information.
  • the authentication server may send a verification code to the smart phone by using a short message, and instruct the first terminal to send the received verification code, if the verification code sent by the smart terminal and the authentication server pass If the verification code sent by the short message method is the same, the authentication server passes the verification of the smart phone.
  • S304 The first terminal saves after receiving the digital certificate sent by the authentication server.
  • the authentication server may recover the expired digital certificate after the digital certificate is invalidated, for example, putting the expired digital certificate into the invalidation queue.
  • the authentication server may determine whether the digital certificate requested to be verified is invalid. If the digital certificate is invalid, the invalid digital certificate is put into the invalidation queue; the authentication server may also It is judged whether the distributed digital certificate has expired according to the set time or the set period. If the invalid digital certificate is found, the expired digital certificate is put into the invalidation queue.
  • the first terminal when the first terminal needs to control the controlled device, the first terminal sends the digital certificate to the second terminal connected to the first terminal, and receives the encrypted session key sent by the second terminal, and uses the Decrypting the private key of the digital certificate to obtain a session key, encrypting the control command with the session key, and transmitting the encrypted control command to the second terminal, so that the second terminal correspondingly controls the controlled device according to the door control instruction Control operation.
  • the second terminal encrypts the session key with the public key of the digital certificate.
  • the first terminal encrypts the control command with the session key, thereby ensuring the security of the control command transmission.
  • the above process of controlling the controlled device and the digital certificate application process can be applied to a scenario in which a door lock (such as a door lock) is controlled by a mobile terminal such as a smart phone.
  • the “first terminal” in the above process is a mobile terminal (such as a smart phone)
  • the “second terminal” is a control terminal (such as a vehicle terminal)
  • the “controlled device” is a door lock control device (such as a vehicle).
  • the door lock control device) is a control command for performing a corresponding control operation on the door lock.
  • the digital certificate is sent to the control terminal connected to the mobile terminal, and the encrypted session key sent by the control terminal is received, and the private key of the digital certificate is used to decrypt.
  • the control terminal encrypts the session key with the public key of the digital certificate.
  • the mobile terminal encrypts the control command with the session key, thereby ensuring the security of the door lock control command transmission.
  • the embodiment of the present application further provides a solution for ensuring the security of the secret key based on the TEE hardware technology.
  • TEE technology provides a secure execution environment so that code working in this mode is not attacked by malware.
  • the basic principle is that only trusted code can be verified in the TEE, and the sensitive data operated by these codes is strictly protected in the secure memory area and will not be accessed by non-TEE code.
  • the generation, storage, and use of the private key of the digital certificate, and the use of the session key are all based on the TEE implementation of the first terminal, ensuring that the related operations on the key are safe and reliable.
  • the second terminal needs to authenticate the digital certificate sent by the first terminal, and complete subsequent related instruction operations while ensuring that the digital certificate is valid, thereby ensuring the security of the control operation of the controlled device.
  • the first terminal includes two applications: a first application 401 and a second application 402.
  • a transceiver (not shown) is further included in the first terminal, and the transceiver may be a wireless transceiver for receiving and/or transmitting wireless signals.
  • the two applications cooperate to implement the flow on the first terminal side.
  • the second application is a trusted application, that is, the second application is an application based on a trusted operating system (Trust OS).
  • the second application is mainly used for performing encryption and decryption operations in the control process, and generates a key pair (including a public key and a private key) of the digital certificate in the digital certificate application process.
  • the first application is mainly used to interact with the second application, interact with the second terminal, and interact with the authentication server.
  • a first storage area 410, a second storage area 420, and a third storage area 430 are included in the first terminal.
  • the first storage area 410 is used for storing a digital certificate
  • the second storage area 420 is a secure storage area for storing a private key of a digital certificate, and a session key
  • the third storage area 430 is a storage area of a read-only memory.
  • the device key is unique, that is, the device key of one terminal is different from the device key of other terminals.
  • the device key is usually burned to the third storage area before the terminal leaves the factory.
  • the first application 401 can access the first storage area 410
  • the second application 402 can access the second storage area 420 and the third storage area 430.
  • FIG. 5 exemplarily shows a flow diagram of controlling a controlled device based on TEE technology. As shown, the process can include:
  • S501 The first application in the first terminal sends a session key acquisition request to the second terminal by using the transceiver according to the control request for the controlled device.
  • the session key acquisition request may include a digital certificate.
  • the first application may read the digital certificate corresponding to the control request from the first storage area, and the digital certificate is carried in the session key acquisition request and sent to the second terminal connected to the first terminal.
  • this step refer to step S201 in FIG. 2.
  • the second terminal may send, to the authentication server, an authentication request for confirming whether the digital certificate is valid, where the verification request may include the digital certificate or the included certificate of the requested verification.
  • the authentication server may determine whether the digital certificate requested to be verified has been recovered, and if not, whether the digital certificate is within the validity period, and if it is within the validity period, return to the second terminal. Verification is a valid verification result, otherwise, the verification result that is verified as invalid is returned to the second terminal. In this example, the authentication server returns a verification result that is validated as valid.
  • the above S502 to S503 are optional steps (indicated by broken lines in the figure).
  • the second terminal generates a session key for the current control process, encrypts the session key by using the public key of the digital certificate, and sends the encrypted session key to the first application in the first terminal.
  • the implementation of this step can be as shown in step S202 in FIG.
  • the second application in the first terminal decrypts the private key of the digital certificate to obtain a session key, generates a control instruction according to the control request, and encrypts the control instruction by using the decrypted session key, and sends the encrypted control instruction to The first application in the first terminal.
  • the second application in the first terminal may first read the device key from the third storage area, read the encrypted digital certificate private key from the second storage area, and then use the device key pair.
  • the encrypted digital certificate private key is decrypted, and the received encrypted session key is decrypted by the digital certificate private key.
  • S507 The first application in the first terminal sends the encrypted control command to the second terminal through the transceiver. After receiving the encrypted control instruction, the second terminal decrypts using the session key to obtain a control instruction, and performs corresponding control operations on the controlled device according to the control instruction.
  • the second application in the first terminal may store the session key in the second storage area after decrypting the session key.
  • the second terminal may return a response to the first application in the first terminal after executing the control instruction, and the first application in the first terminal may send the response to the second application in the first terminal, The second application may delete the session key stored in the second storage area according to the response.
  • FIG. 6 exemplarily shows a flow chart of a digital certificate application implemented based on TEE technology. As shown, the process can include:
  • the second application in the first terminal generates a public key and a private key of the digital certificate, and stores the private key of the digital certificate in the second storage area.
  • the digital certificate corresponds to an application for controlling the controlled device.
  • the device key may be read from the third storage area, and the user secrets the private key of the digital certificate, and the encrypted number is encrypted.
  • the certificate private key is stored in the second storage area.
  • the second application in the first terminal sends a digital certificate request to the first application in the second terminal, where the digital certificate request includes the public key of the digital certificate.
  • S603 The first application in the first terminal sends a digital certificate request to the authentication server by using the transceiver.
  • S604 Perform the necessary identity authentication between the first application and the authentication server in the first terminal, and after the identity authentication is passed, the authentication server sends a digital certificate to the first terminal, where the digital certificate includes the public key and the Information such as the validity period of the digital certificate.
  • the above process of controlling the controlled device and the digital certificate application process can be applied to a scenario in which a door lock is controlled by a mobile terminal such as a smart phone.
  • the “first terminal” in the above process is a mobile terminal (such as a smart phone)
  • the “second terminal” is a control terminal
  • the “controlled device” is a door lock control device
  • the control command is corresponding to the door lock. Control instructions for controlling operations.
  • the embodiment of the present application further provides a first terminal, where the terminal can implement the process performed by the first terminal in the foregoing embodiment.
  • FIG. 7 is a schematic structural diagram of a first terminal according to an embodiment of the present application.
  • the terminal may include: a first application module 701, a second application module 702, and may further include a transceiver (not shown in the figure).
  • a first application module 701 configured to send, by using the transceiver, a session key acquisition request to a second terminal connected to the first terminal according to a control request to the controlled device; and receiving, by the transceiver, by the transceiver The second terminal sends the session key according to the secret key session acquisition request, and sends the encrypted session key to the second application module; the session key is encrypted by using the public key of the digital certificate;
  • a second application module 702 configured to decrypt the session key by using a private key of the digital certificate, generate a control instruction according to the control request, encrypt the control instruction with the session key, and control the encryption Sending an instruction to the first application module;
  • the first application module 701 is further configured to send the encrypted control command to the second terminal by using the transceiver, where the control command is used to instruct the second terminal to perform a corresponding control operation on the controlled device.
  • the second application module 702 is specifically configured to: obtain a private key of the digital certificate from a secure storage area, where a private key of the digital certificate is encrypted by a device key; and obtain a location from a read-only storage area. Describe the device secret key and decrypt the private key of the encrypted digital certificate using the device secret key.
  • the digital key certificate is included in the session key acquisition request.
  • the second application module 702 is further configured to: generate a private key of the digital certificate, read a device key from the read-only storage area of the first terminal, and encrypt the private key by using the device secret key, and And storing the encrypted private key in the secure storage area of the mobile terminal, and sending a digital certificate request to the first application;
  • the first application module 701 is further configured to: send, by using the transceiver, the digital certificate request to The authentication server receives, by the transceiver, a digital certificate sent by the authentication server according to the digital certificate request, where the digital certificate includes the public key and the validity period information of the digital certificate.
  • the first application module 701 is specifically configured to: receive a door lock control request submitted by a user through a user interface of the door lock control application, and determine whether a connection is established between the second terminal associated with the door lock control application.
  • the transceiver is specifically configured to: if the connection is established, send a session key acquisition request to the second terminal by using the connection.
  • the connection is a Bluetooth connection.
  • the first terminal may be a mobile terminal
  • the second terminal may be a control terminal (such as an in-vehicle terminal).
  • the control request is a door lock control request (such as a door control request)
  • the control command is a door lock control command (such as a door control command).
  • the embodiment of the present application further provides a second terminal, where the terminal can implement the process performed by the second terminal in the foregoing embodiment.
  • FIG. 8 is a schematic structural diagram of a second terminal according to an embodiment of the present application.
  • the terminal may include a session key processing module 801, a control instruction processing module 802, and a transceiver (not shown).
  • the session key processing module 801 is configured to receive, by using the transceiver, a session key acquisition request sent by the first terminal connected to the second terminal, generate a session key according to the session key acquisition request, and use a digital certificate.
  • the public key encrypts the session key, and sends the encrypted session key to the first terminal through the transceiver;
  • the control instruction processing module 802 is configured to receive, by the transceiver, an encrypted control instruction sent by the first terminal, decrypt the control command by using the session secret key, and control the controlled device according to the decrypted control instruction. Perform the corresponding control operations.
  • the session key acquisition request includes a digital certificate
  • the second terminal further includes a certificate verification module 703.
  • the certificate verification module 703 is configured to send, by the transceiver, an authentication request for confirming whether the digital certificate is valid to the authentication server, where the verification request is used to trigger the authentication server that the digital certificate is not recovered and is valid. Returning a verification result indicating that the digital certificate is valid; and receiving, by the transceiver, a verification result returned by the authentication server, and confirming whether the digital certificate is valid according to the verification result.
  • connection between the first terminal and the second terminal is a Bluetooth connection.
  • the first terminal may be a mobile terminal
  • the second terminal may be a control terminal (such as an in-vehicle terminal).
  • the control request is a door lock control request (such as a door control request)
  • the control command is a door lock control command (such as a door control command).
  • the embodiment of the present application further provides one or more computer readable media having instructions stored thereon, when the instructions are executed by one or more processors, causing the communication device to perform the foregoing The control method performed by the first terminal described in the embodiment.
  • the embodiment of the present application further provides one or more computer readable media having instructions stored thereon, when the instructions are executed by one or more processors, causing the communication device to perform the foregoing The control method performed by the second terminal described in the embodiment.
  • the embodiment of the present application further provides an apparatus 1100, which can implement the flow performed by the first terminal described in the foregoing embodiment.
  • FIG. 9 exemplarily illustrates an example apparatus 1100 that may include one or more processors 1102 coupled to at least one processor 1102, non-volatile memory (non-), in accordance with various embodiments.
  • a volatile memory (NMV)/memory 1104 is coupled to system control logic 1101, and a network interface 1106 is coupled to system control logic 1101.
  • Processor 1102 can include one or more single core processors or multi-core processors.
  • Processor 1102 can comprise any combination of general purpose processors or special purpose processors (eg, image processors, application processor baseband processors, etc.).
  • System control logic 1101 in one embodiment may include any suitable interface controller to provide any suitable interface to at least one of processors 1102, and/or to any suitable communication in communication with system control logic 1101. Any suitable interface to the device or component.
  • System control logic 1101 in one embodiment may include one or more memory controllers to provide an interface to system memory 1103.
  • System memory 1103 is used to load and store data and/or instructions.
  • corresponding device 1100 in one embodiment, system memory 1103 can include any suitable volatile memory.
  • NVM/memory 1104 can include one or more tangible, non-transitory computer readable media for storing data and/or instructions.
  • NVM/memory 1104 can include any suitable non-volatile storage device, such as one or more hard disk devices (HDDs), one or more compact disks (CDs), and/or one or more Digital versatile disk (DVD).
  • HDDs hard disk devices
  • CDs compact disks
  • DVD Digital versatile disk
  • the NVM/memory 1104 can include storage resources that are physically part of the device that the system is installed on or can be accessed, but is not necessarily part of the device.
  • NVM/memory 1104 can be accessed by the network via network interface 1106.
  • System memory 1103 and NVM/memory 1104 can each include a copy of a temporary or persistent instruction 1110.
  • the instructions 1110 can include instructions that, when executed by at least one of the processors 1102, cause the device 1100 to implement one or a combination of the methods described in Figures 2-6.
  • instructions 1110 or hardware, firmware, and/or software components may additionally/alternatively be placed in system control logic 1101, network interface 1106, and/or processor 1102.
  • Network interface 1106 can include a receiver to provide device 1100 with a wireless interface to communicate with one or more networks and/or any suitable device.
  • Network interface 1106 can include any suitable hardware and/or firmware.
  • Network interface 1106 can include multiple antennas to provide a multiple input multiple output wireless interface.
  • network interface 1106 can include a network adapter, a wireless network adapter, a telephone modem, and/or a wireless modem.
  • At least one of the processors 1102 can be packaged with logic for one or more controllers of system control logic. In one embodiment, at least one of the processors may be packaged with logic for one or more controllers of system control logic to form a system level package. In one embodiment, at least one of the processors can be integrated on the same die as the logic of one or more controllers for system control logic. In one embodiment, at least one of the processors can be integrated on the same die as the logic of one or more controllers for system control logic to form a system chip.
  • the device 1100 can further include an input/output device 1105.
  • the input/output device 1105 can include a user interface intended to enable a user to interact with the device 1100, can include a peripheral component interface designed to enable peripheral components to interact with the system, and/or can include sensors for determining environmental conditions And/or location information about the device 1100.
  • the embodiment of the present application further provides a device, which can implement the process performed by the second terminal described in the foregoing embodiment.
  • FIG. 10 exemplarily illustrates an example apparatus 1200 that may include one or more processors 1202 coupled to at least one processor 1202, non-volatile memory (non-), in accordance with various embodiments.
  • a volatile memory (NMV)/memory 1204 is coupled to system control logic 1201, and a network interface 1206 is coupled to system control logic 1201.
  • NMV non-volatile memory
  • Processor 1202 can include one or more single core processors or multi-core processors.
  • Processor 1202 may comprise any combination of general purpose processors or special purpose processors (eg, image processors, application processor baseband processors, etc.).
  • System control logic 1201 in one embodiment may include any suitable interface controller to provide any suitable interface to at least one of processors 1202, and/or to any suitable communication in communication with system control logic 1201. Any suitable interface to the device or component.
  • System control logic 1201 in one embodiment may include one or more memory controllers to provide an interface to system memory 1203.
  • System memory 1203 is used to load and store data and/or instructions.
  • corresponding device 1200 in one embodiment, system memory 1203 can include any suitable volatile memory.
  • NVM/memory 1204 can include one or more tangible, non-transitory computer readable media for storing data and/or instructions.
  • NVM/memory 1204 can include any suitable non-volatile storage device, such as one or more hard disk devices (HDDs), one or more compact disks (CDs), and/or one or more Digital versatile disk (DVD).
  • HDDs hard disk devices
  • CDs compact disks
  • DVD Digital versatile disk
  • NVM/memory 1204 may include storage resources that are physically part of, but not necessarily part of, the devices installed or accessible by the system. For example, NVM/memory 1204 can be accessed by the network via network interface 1206.
  • System memory 1203 and NVM/memory 1204 can each include a copy of a temporary or persistent instruction 1210.
  • the instructions 1210 can include instructions that, when executed by at least one of the processors 1202, cause the apparatus 1200 to implement one or a combination of the methods described in Figures 2-6.
  • instructions 1210 or hardware, firmware, and/or software components may additionally/alternatively be placed in system control logic 1201, network interface 1206, and/or processor 1202.
  • Network interface 1206 can include a receiver to provide device 1200 with a wireless interface to communicate with one or more networks and/or any suitable device.
  • Network interface 1206 can include any suitable hardware and/or firmware.
  • Network interface 1206 can include multiple antennas to provide a multiple input multiple output wireless interface.
  • network interface 1206 can include a network adapter, a wireless network adapter, a telephone modem, and/or a wireless modem.
  • At least one of the processors 1202 may be packaged with logic for one or more controllers of system control logic. In one embodiment, at least one of the processors may be packaged with logic for one or more controllers of system control logic to form a system level package. In one embodiment, at least one of the processors can be integrated on the same die as the logic of one or more controllers for system control logic. In one embodiment, at least one of the processors can be integrated on the same die as the logic of one or more controllers for system control logic to form a system chip.
  • Device 1200 can further include an input/output device 1205.
  • Input/output device 1205 can include a user interface intended to enable a user to interact with device 1200, can include a peripheral component interface that is designed to enable peripheral components to interact with the system, and/or can include sensors for determining environmental conditions And/or location information about the device 1200.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)
  • Telephone Function (AREA)

Abstract

本申请公开了一种控制方法及装置。本申请中,移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求;控制终端根据会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述移动终端;移动终端使用数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,使用会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给所述控制终端;控制终端使用所述会话秘钥解密得到所述门锁控制指令,根据解密得到的门锁控制指令进行门锁控制操作。采用本发明可提高控制操作的安全性。

Description

一种控制方法及装置
本申请要求2017年07月04日递交的申请号为201710538445.9、发明名称为“一种控制方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种控制方法及装置。
背景技术
随着智能移动终端(比如智能手机)的普及,在越来越多的场景下,可使用智能移动终端对一些设备进行控制。
一个具体的例子是,可使用智能手机控制车辆车门的开关。在该例子中,智能手机与车辆中设置的车载终端建立蓝牙链路,并通过蓝牙链路向该车载终端发送开车门的控制指令,车载终端根据该控制指令打开车门。
在上述过程中,如果开车门的指令为明文指令,则会到来很大的安全隐患。比如,若该指令被非法智能手机捕获,则该非法智能手机即可向该车辆的车载终端发送打开车门的指令,并触发该车载终端打开车门。
发明内容
本申请实施例公开了一种控制方法及装置,用以提高控制操作的安全性。
第一方面,提供一种控制方法,包括:
移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求;
所述控制终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述移动终端;
所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,使用所述会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给所述控制终端;
所述控制终端使用所述会话秘钥解密得到所述门锁控制指令,根据解密得到的门锁控制指令进行门锁控制操作。
第二方面,提供一种控制方法,包括:
移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求;
所述移动终端接收所述控制终端根据所述秘钥会话获取请求发送的会话秘钥,所述会话秘钥使用数字证书的公钥进行加密;
所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,并用所述会话秘钥加密所述门锁控制指令;
所述移动终端将加密的门锁控制指令发送给所述控制终端,所述门锁控制指令用于指示所述控制终端进行相应门锁控制操作。
可选地,所述会话秘钥获取请求中包括所述数字证书。
可选地,所述移动终端中包括第一应用和第二应用,所述第二应用为可信应用;所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,并用所述会话秘钥加密门锁控制指令,包括:所述第一应用将接收到的加密的会话秘钥发送给所述第二应用;所述第二应用从所述移动终端的安全存储区获取所述数字证书的私钥,并使用获取到的私钥解密得到会话秘钥;所述移动终端将加密的门锁控制指令发送给所述控制终端,包括:所述第二应用使用解密得到的会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给第一应用;所述第一应用将加密的门锁控制指令发送给所述控制终端。
可选地,所述第二应用从安全存储区获取所述数字证书的私钥,包括:所述第二应用从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;所述第二应用从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
可选地,所述移动终端中包括第一应用和第二应用,所述第二应用为可信应用;所述方法还包括:所述第二应用生成数字证书的私钥,从所述移动终端的只读存储区读取设备秘钥,使用所述设备秘钥加密所述私钥,并将加密的私钥存储到所述移动终端的安全存储区中;所述第二应用向第一应用发送数字证书请求,所述第一应用将所述数字证书请求发送给认证服务器;所述第二应用接收所述认证服务器根据所述数字证书请求发送的数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
可选地,移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求,包括:移动终端接收用户通过门锁控制应用的用户界面提交的门锁控制请求,确定是否与所述门锁控制应用关联的控制终端之间建立连接;若已建立连接,则通过所述连接向所述控制终端发送会话秘钥获取请求。
可选地,所述连接为蓝牙连接。
第三方面,提供一种控制方法,包括:
控制终端接收与所述控制终端连接的移动终端发送的会话秘钥获取请求;
所述控制终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述移动终端;
所述控制终端接收所述移动终端发送的加密的门锁控制指令,使用所述会话秘钥解密得到所述门锁控制指令,并根据解密得到的门锁控制指令进行相应门锁控制操作。
可选地,所述会话秘钥获取请求中包括数字证书,所述方法还包括:所述控制终端向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;所述控制终端接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
可选地,所述控制终端和所述移动终端通过蓝牙连接。
第四方面,提供一种控制方法,包括:
第一终端根据对受控设备的控制请求,向与所述第一终端连接的第二终端发送会话秘钥请求;
所述第一终端接收所述第二终端根据所述会话秘钥获取请求返回的会话秘钥,所述会话秘钥使用数字证书的公钥进行加密;
所述第一终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述控制请求生成控制指令,并用所述会话秘钥加密所述控制指令;
所述第一终端将加密的控制指令发送给所述第二终端,所述控制指令用于指示所述第二终端对所述受控设备进行相应的控制操作。
可选地,所述第一终端中包括第一应用和第二应用,所述第二应用为可信应用;所述第一终端使用所述数字证书的私钥解密得到所述会话秘钥,并用所述会话秘钥加密所述控制指令,包括:所述第一应用将接收到的加密的会话秘钥发送给所述第二应用;所述第二应用从所第一动终端的安全存储区获取所述数字证书的私钥,并使用获取到的私钥解密得到会话秘钥;所述移动终端将加密的控制指令发送给所述第二终端,包括:所述第二应用使用解密得到的会话秘钥加密控制指令,并将加密的控制指令发送给第一应用;所述第一应用将加密的控制指令发送给所述第二终端。
可选地,所述第二应用从安全存储区获取所述数字证书的私钥,包括:所述第二应 用从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;所述第二应用从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
第五方面,提供一种控制方法,包括:
第二终端接收与所述第二终端连接的第一终端发送的会话秘钥获取请求;
所述第二终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述第一终端;
所述第二终端接收所述第一终端发送的加密的控制指令,使用所述会话秘钥解密得到所述控制指令,并根据解密得到的控制指令对所述受控设备进行相应的控制操作。
可选地,所述会话秘钥获取请求中包括数字证书,所述方法还包括:所述第二终端向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;所述而终端接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
第六方面,提供一种移动终端,包括:第一应用模块、第二应用模块以及收发器;
第一应用模块,用于根据门锁控制请求,通过所述收发器向与所述移动终端连接的控制终端发送会话秘钥获取请求;以及,通过所述收发器接收所述控制终端根据所述秘钥会话获取请求发送的会话秘钥,并将所述加密的会话秘钥发送给第二应用模块;所述会话秘钥使用数字证书的公钥进行加密;
第二应用模块,用于使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,用所述会话秘钥加密所述门锁控制指令,并将加密的门锁控制指令发送给所述第一应用模块;
所述第一应用模块还用于,通过所述收发器将加密的门锁控制指令发送给所述控制终端,所述门锁控制指令用于指示所述控制终端进行相应门锁控制操作。
可选地,所述会话秘钥获取请求中包括所述数字证书。
可选地,所述第二应用模块具体用于:从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
可选地,所述第二应用模块还用于:生成数字证书的私钥,从所述移动终端的只读存储区读取设备秘钥,使用所述设备秘钥加密所述私钥,并将加密的私钥存储到所述移 动终端的安全存储区中,向第一应用发送数字证书请求;所述第一应用模块还用于:通过所述收发器将所述数字证书请求发送给认证服务器,通过所述收发器接收所述认证服务器根据所述数字证书请求发送的数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
可选地,所述第一应用模块具体用于:接收用户通过门锁控制应用的用户界面提交的门锁控制请求,确定是否与所述门锁控制应用关联的控制终端之间建立连接;所述收发器具体用于:若已建立连接,则通过所述连接向所述控制终端发送会话秘钥获取请求。
可选地,所述连接为蓝牙连接。
第七方面,提供一种控制终端,包括:会话秘钥处理模块、控制指令处理模块和收发器;
会话秘钥处理模块,用于通过所述收发器接收与所述控制终端连接的移动终端发送的会话秘钥获取请求,根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并通过所述收发器将加密的会话秘钥发送给所述移动终端;
控制指令处理模块,用于通过所述收发器接收所述移动终端发送的加密的门锁控制指令,使用所述会话秘钥解密得到所述门锁控制指令,并根据解密得到的门锁控制指令进行相应门锁控制操作。
可选地,所述会话秘钥获取请求中包括数字证书,所述控制终端中还包括:证书验证模块,用于通过所述收发器向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;以及,通过所述收发器接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
可选地,所述连接为蓝牙连接。
第八方面,提供一种终端,包括:第一应用模块、第二应用模块以及收发器;
第一应用模块,用于根据对受控设备的控制请求,通过所述收发器向与所述第一终端连接的第二终端发送会话秘钥获取请求;以及,通过所述收发器接收所述第二终端根据所述秘钥会话获取请求发送的会话秘钥,并将所述加密的会话秘钥发送给第二应用模块;所述会话秘钥使用数字证书的公钥进行加密;
第二应用模块,用于使用所述数字证书的私钥解密得到所述会话秘钥,根据所述控制请求生成控制指令,用所述会话秘钥加密所述控制指令,并将加密的控制指令发送给所述第一应用模块;
所述第一应用模块还用于,通过所述收发器将加密的控制指令发送给所述控制终端,所述控制指令用于指示所述第二终端对所述受控设备进行相应控制操作。
可选地,所述第二应用模块具体用于:从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
第九方面,提供一种终端,包括:会话秘钥处理模块、控制指令处理模块和收发器;
会话秘钥处理模块,用于通过所述收发器接收与所述第二终端连接的第一终端发送的会话秘钥获取请求,根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并通过所述收发器将加密的会话秘钥发送给所述第一终端;
控制指令处理模块,用于通过所述收发器接收所述第一终端发送的加密的控制指令,使用所述会话秘钥解密得到所述控制指令,并根据解密得到的控制指令对受控设备进行相应控制操作。
可选地,所述会话秘钥获取请求中包括数字证书,所述第二终端中还包括:证书验证模块,用于通过所述收发器向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;以及,通过所述收发器接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
第十方面,提供一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行上述第二方面中任一项所述的方法。
第十一方面,提供一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行上述第三方面中任一项所述的方法。
第十二方面,提供一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行上述第四方面中任一项所述的方法。
第十三方面,提供一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行上述第五方面中任一项所述的方法。
第十四方面,提供一种装置,包括:一个或多个处理器;以及一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被所述一个或多个处理器执行时,使得所述装置执行上述第二方面或第四方面中任一项所述的方法。
第十五方面,提供一种装置,包括:一个或多个处理器;以及一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被所述一个或多个处理器执行时,使得 所述装置执行上述第三方面或第五方面中任一项所述的方法。
本申请的上述实施例中,第一终端(比如移动终端)在需要对受控设备(比如门锁)进行控制时,向与该第一终端连接的第二终端(比如控制终端)发送会话秘钥获取请求,第二终端生成会话秘钥并使用数字证书的私钥进行加密后发送给第一终端,第一终端使用数字证书的私钥解密得到会话秘钥,用该会话秘钥加密控制指令,并将加密的控制指令发送给该第二终端,以使该第二终端根据该控制指令对受控设备进行相应的控制操作。由于一方面第二终端用数字证书的公钥对会话秘钥进行加密,另一方面,第一终端用会话秘钥对控制指令进行加密,保证了控制指令传输的安全性。
附图说明
图1示例性地示出了本申请实施例所使用的系统架构示意图;
图2示例性地示出了本申请实施例提供的一种对受控设备进行控制的流程示意图;
图3示例性地示出了本申请实施例提供的数字证书的申请流程示意图;
图4示例性地示出了本申请实施例提供的TEE架构示意图;
图5示例性地示出了基于TEE技术实现的对受控设备进行控制的流程示意图;
图6示例性地示出了基于TEE技术实现的数字证书申请的流程示意图;
图7示例性地示出了本申请实施例提供的第一终端的结构示意图;
图8示例性地示出了本申请实施例提供的第二终端的结构示意图;
图9示例性地示出了本申请实施例提供的装置的结构示意图;
图10示例性地示出了本申请另一实施例提供的装置的结构示意图。
具体实施方式
虽然本申请的概念易于进行各种修改和替代形式,但是其具体实施例已经通过附图中的示例示出并且将在本文中详细描述。然而,应当理解,没有意图将本申请的概念限制为所公开的特定形式,而是相反,意图是覆盖与本申请以及所附权利要求一致的所有修改、等同物和替代物。
说明书中对“一个实施例”、“实施例”、“说明性实施例”等的引用,指示所描述的实施例可包括特定特征、结构或特性,但是每个实施例可以或可以不必包括特定特征、结构或特性。此外,这样的短语不一定指的是相同的实施例。进一步地,认为在本领域技术人员的知识范围内,当结合实施例描述特定特征、结构或特性时,结合无论是 否明确描述的其它实施例影响这样的特征,结构或特性。另外,应当理解,以“A,B和C中的至少一个”的形式包括在列表中的项目可以表示(A);(B);(C);(A和B);(A和C);(B和C);或(A,B和C)。类似地,以“A,B或C中的至少一个”的形式列出的项目可以表示(A);(B);(C);(A和B);(A和C);(B和C)或(A,B和C)。
在一些情况下,所公开的实施例可以在硬件、固件、软件或其任何组合中实现。所公开的实施例还可以被实现为由一个或多个暂时性或非暂时性机器可读(例如,计算机可读)存储介质携带或存储的指令,其可以由一个或多个处理器读取和执行。机器可读存储介质可以体现为用于以机器可读形式(例如,易失性或非易失性存储器、介质盘或其他介质)存储或传输信息的任何存储设备,机制或其他物理结构的设备)。
在附图中,一些结构或方法特征可以以特定布置和/或顺序示出。然而,应当理解,可能不需要这样的具体布置和/或排序。相反,在一些实施例中,这些特征可以以与说明性附图中所示不同的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示这种特征在所有实施例中都是需要的,并且在一些实施例中可以不包括或可以与其他特征组合。
下面结合附图对本申请实施例进行详细描述。
图1示例性地示出了本申请实施例所使用的系统架构。如图所示,该架构中可包括:第一终端101、第二终端102、受控设备103,以及认证服务器104。其中,第一终端101和第二终端102具有无线通信功能。
认证服务器104主要用于数字证书的发放和管理,第二终端102可使用数字证书的公钥加密其所生成的会话秘钥并发送给第一终端101,第一终端101可使用该数字证书的私钥解密得到会话秘钥,用会话秘钥加密控制指令发送给第二终端102,第二终端102可使用会话秘钥解密得到控制指令,并根据该控制指令对受控设备104进行控制操作。
第一终端101和第二终端102之间可建立通信链路,第一终端101可通过该通信链路向第二终端102发送数字证书,第二终端102可通过该通信链路向第一终端101发送会话秘钥,以使第一终端101使用该会话秘钥加密控制指令,并将加密的控制指令通过该通信链路发送给第二终端102。所述通信链路可以是基于蓝牙(Bluetooth)通信协议的无线链路,也可以基于其他通信协议的链路,所述其他无线通信协议包括但不限于:Wi-Fi、以太网(ethernet)、专用短程通信技术(Dedicated Short Range Communications,简称DSRC)。
第二终端102与受控设备103之间电性连接,第二终端102可根据第一终端101发送的控制指令对受控设备103进行相应控制操作。
第一终端101和第二终端102分别与认证服务器104通过网络105进行信息交互。第一终端101可从认证服务器104获取数字证书,第二终端102可请求认证服务器104对数字证书进行有效性验证。可选地,所述网络105可以是无线蜂窝网络,比如长期演进(Long Term Evolution,简称LTE)系统或其演进系统。
可选地,第一终端101可以是移动终端,具体地,可以是智能手机、平板电脑、笔记本电脑、个人数字助理(Personal Digital Assistant,简称PDA)、智能穿戴设备或类似设备。第二终端102可以是控制终端,比如车载终端等设备,在家居环境下,控制终端还可以是路由器、智能音响等各类智能设备。在一个例子中,第一终端101为智能终端,比如智能手机;第二终端102为车载终端,该车载终端是汽车中用于通信的一个设备,一般支持蓝牙、3G/4G、Wi-Fi、DSRC等通信技术,也作为待机唤醒设备;受控设备103为门锁装置,比如车辆的门锁控制装置,用于控制车门的开启和关闭。
可选地,为了提高安全性,第一终端101可以采用可信执行环境(Trusted Execution Enviroment,简称TEE)硬件技术实现,认证服务器104可以是可信服务器。
基于上述架构,本申请实施例利用数字证书的秘钥对机制,对会话秘钥进行加解密,而会话秘钥用于对第一终端发送给第二终端的控制指令进行加解密,从而提高了控制指令传输的安全性,进而提高了对受控设备进行控制操作的安全性。其中,数字证书是经数字签名的电子文件,其中可包含公开密钥(即公钥)、拥有者信息以及公钥。数字证书可只在特定的时间段内有效。
基于图1所示的系统架构,图2示例性地示出了本申请实施例提供的一种对受控设备进行控制的流程示意图。如图所示,该流程可包括:
S201:第一终端根据对受控设备的控制请求,向与所述第一终端连接的第二终端发送会话秘钥请求。
该步骤中,第一终端可根据用户发起的对受控设备进行控制操作的请求,生成所述会话秘钥获取请求,并将该会话秘钥获取请求发送给第二终端。用户可通过多种方式发起对受控设备进行控制操作的请求,比如,第一终端中存在用于对门锁进行控制的应用程序,该应用程序提供有用户操作界面,供用户通过屏幕操作提交控制请求。基于该第一终端,在该用户界面上通过用户手势方式发起该请求,第一终端根据对用户手势的识别,确定接收到用户发起的对受控设备进行控制操作的请求,再比如,用户可通过语音 发送控制指令,第一终端根据对语音的识别,确定接收到用户发起的对受控设备进行控制操作的请求。
在具体实施时,当用户发起对受控设备的控制请求后,若第一终端与第二终端已经建立通信链路,则可通过该通信链路将该会话秘钥获取请求发送给该第二终端,否则,可先与第二终端建立通信链路,再通过该通信链路将该会话秘钥获取发送给该第二终端。
可选地,第一终端发送的会话秘钥获取请求中可包含数字证书。第一终端中保存的数字证书可能有多个,不同的数字证书用于不同的应用,可预先设置数字证书与相应的应用之间的对应关系。第一终端在接收到对受控设备的控制请求后,可根据该控制请求所对应的应用,获取该应用所对应的数字证书。
S202:第二终端接收到第一终端发送的会话秘钥获取请求后,可根据该会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密该会话秘钥,并将加密的会话秘钥发送给第一终端。
其中,会话秘钥可采用对称加密算法的密钥。该会话密钥可在每次会话时产生,会话结束后终止。其中,这里的一次“会话”是指一次从接收到第一终端发送的数字证书后生成会话秘钥,并将其发送给第一终端,到接收到第一终端发送的用该会话秘钥加密的控制指令,用该会话秘钥进行解密,执行解密得到的控制指令的过程。
进一步地,若会话秘钥获取请求中包含有数字证书,则第二终端还要对该数字证书进行验证,并在验证通过后生成会话秘钥。第二终端可通过与认证服务器之间的交互,实现对数字证书的有效性验证过程。具体地,第二终端向认证服务器发送用于确认数字证书是否有效的验证请求,该验证请求中可包含所请求验证的数字证书或者包含所请求验证的数字证书的索引信息;认证服务器接收到该验证请求后,可判断所请求验证的数字证书是否已被回收,若未被回收,则判断该数字证书是否在有效期内,若在有效期内,则向第二终端返回验证为有效的验证结果,否则,向第二终端返回验证为无效的验证结果。
进一步地,数字证书验证通过后,第二终端可将该数字证书进行保存,以便以后使用。
S203:第一终端接收到加密的会话秘钥后,使用数字证书的私钥解密得到会话秘钥,根据所述控制请求生成控制指令,并用解密得到的会话秘钥加密控制指令,该控制指令用于指示第二终端对受控设备进行相应控制。
S204:第一终端将加密的控制指令发送给第二终端。
S205:第二终端接收到加密的控制指令后,使用会话秘钥进行解密,得到控制指令,并根据该控制指令对受控设备进行相应的控制操作。
可选地,第一终端中的数字证书,可通过以下过程申请得到。图3示例性地示出了本申请实施例提供的数字证书的申请流程示意图。该流程可包括:
S301:第一终端生成数字证书的公钥和私钥。该数字证书与用于对受控设备进行控制的应用相对应。
S302:第一终端向认证服务器发送数字证书请求,所述数字证书请求中包括所述数字证书的公钥。
S303:第一终端与认证服务器之间进行必要的身份认证,并在身份认证通过后,认证服务器向第一终端发送数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
该步骤中,第一终端和认证服务器之间可采用多种方式进行身份认证。比如,以第一终端为智能手机为例,认证服务器可通过短消息方式向该智能手机发送验证码,并指示第一终端发送接收到的验证码,如果智能终端发送的验证码与认证服务器通过短消息方式发送的验证码相同,则认证服务器对该智能手机验证通过。
S304:第一终端接收到认证服务器发送的数字证书后进行保存。
可选地,认证服务器可在数字证书失效后,将失效的数字证书进行回收,比如,将失效的数字证书放入失效队列。可选地,认证服务器可在收到第二终端发送的数字证书验证请求后,判断所请求验证的数字证书是否失效,若已失效,则将失效的数字证书放入失效队列;认证服务器也可以按照设定时间或设定周期判断所分发的数字证书是否已失效,若发现失效的数字证书,则将失效的数字证书放入失效队列。
通过以上描述可以看出,第一终端在需要对受控设备进行控制时,将数字证书发送给与该第一终端连接的第二终端,接收第二终端发送的加密的会话秘钥,使用该数字证书的私钥解密得到会话秘钥,用该会话秘钥加密控制指令,并将加密的控制指令发送给该第二终端,以使该第二终端根据该车门控制指令对受控设备进行相应的控制操作。由于一方面第二终端用数字证书的公钥对会话秘钥进行加密,另一方面,第一终端用会话秘钥对控制指令进行加密,保证了控制指令传输的安全性。
上述对受控设备进行控制的流程以及数字证书申请流程,可应用于通过移动终端(比如智能手机)控制门锁(比如车门门锁)的场景。在该场景中,上述流程中的“第一终端”为移动终端(比如智能手机),“第二终端”为控制终端(比如车载终端),“受 控设备”为门锁控制装置(比如车辆的门锁控制装置),控制指令为对门锁进行相应的控制操作的控制指令。
通过以上描述可以看出,移动终端在需要进行门锁控制时,将数字证书发送给与该移动终端连接的控制终端,接收控制终端发送的加密的会话秘钥,使用该数字证书的私钥解密得到会话秘钥,用该会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给该控制终端,以使该控制终端根据该门锁控制指令对门锁进行相应的控制操作。由于一方面控制终端用数字证书的公钥对会话秘钥进行加密,另一方面,移动终端用会话秘钥对控制指令进行加密,保证了门锁控制指令传输的安全性。
为了进一步提高安全性,本申请实施例还提供了一种基于TEE硬件技术来保证秘钥安全性的方案。
TEE技术提供了安全执行环境,使得工作在此模式下的代码不会受到恶意软件的攻击。其基本原理是:只有可信的代码经过签名校验才可以工作在TEE中,并且这些代码所操作的敏感数据严格保护在安全内存区域中,不会被非TEE代码访问。
本申请实施例中,一方面,数字证书的私钥的生成、存储和使用,以及会话秘钥的使用均基于第一终端的TEE实现,保证了对密钥的相关操作是安全可靠的。另一方面,第二终端需要对第一终端发送的数字证书进行认证,在保证数字证书有效的情况下完成后续相关的指令操作,从而保证了对受控设备进行控制操作的安全性。
如图4所示,在前述实施例提供的控制流程的基础上,结合TEE技术,则第一终端中包括两个应用:第一应用401和第二应用402。进一步地,第一终端中还包括收发器(未在图中示出),该收发器可以是无线收发器,用于接收和/或发送无线信号。这两个应用相互配合来实现上述第一终端侧的流程。其中,第二应用为可信应用,即,第二应用是基于可信操作系统(Trust OS)的应用程序。第二应用主要用于在控制流程中进行加密、解密操作,在数字证书申请流程中,生成数字证书的秘钥对(包括公钥和私钥)。第一应用主要用于与第二应用交互、与第二终端交互以及与认证服务器交互。
如图4所示,在第一终端中包括第一存储区410、第二存储区420和第三存储区430。其中,第一存储区410用于存储数字证书,第二存储区420为安全存储区,用于存储数字证书的私钥和会话秘钥;第三存储区430为只读存储器的存储区,用于存储设备秘钥。设备秘钥具有唯一性,即一个终端的设备秘钥与其他终端的设备秘钥不同。设备秘钥通常在终端出厂前烧录到第三存储区。第一应用401可访问第一存储区410,第二应用402可访问第二存储区420以及第三存储区430。
基于图4所示的TEE架构,图5示例性地示出了基于TEE技术实现的对受控设备进行控制的流程示意图。如图所示,该流程可包括:
S501:第一终端中的第一应用根据对受控设备的控制请求,通过收发器向第二终端发送会话秘钥获取请求。
可选地,该会话秘钥获取请求中可包含数字证书。第一应用可从第一存储区读取与该控制请求对应的数字证书,将该数字证书携带于会话秘钥获取请求发送给与该第一终端连接的第二终端。该步骤的实现可参照图2中的步骤S201。
S502:第二终端接收到第一终端发送的会话秘钥获取请求后,可向认证服务器发送用于确认数字证书是否有效的验证请求,该验证请求中可包含所请求验证的数字证书或者包含所请求验证的数字证书的索引信息。
S503:认证服务器接收到该验证请求后,可判断所请求验证的数字证书是否已被回收,若未被回收,则判断该数字证书是否在有效期内,若在有效期内,则向第二终端返回验证为有效的验证结果,否则,向第二终端返回验证为无效的验证结果。本例子中,认证服务器返回验证为有效的验证结果。上述S502~S503为可选步骤(图中用虚线表示)。
S504:第二终端接生成用于本次控制流程的会话秘钥,使用该数字证书的公钥加密该会话秘钥,并将加密的会话秘钥发送给第一终端中的第一应用。该步骤的实现可如图2中的步骤S202。
S505:第一终端中的第一应用通过收发器接收到加密的会话秘钥后,将其发送给第一终端中的第二应用。
S506:第一终端中的第二应用使用数字证书的私钥解密得到会话秘钥,根据所述控制请求生成控制指令,并用解密得到的会话秘钥加密控制指令,并将加密的控制指令发送给第一终端中的第一应用。
该过程中,可选地,第一终端中的第二应用可首先从第三存储区读取设备秘钥,从第二存储区读取加密的数字证书私钥,然后用该设备秘钥对该加密的数字证书私钥进行解密,再用该数字证书私钥对接收到的加密的会话秘钥进行解密。
S507:第一终端中的第一应用将加密的控制指令通过收发器发送给第二终端。第二终端接收到加密的控制指令后,使用会话秘钥进行解密,得到控制指令,并根据该控制指令对受控设备进行相应的控制操作。
进一步地,在S506中,第一终端中的第二应用可在解密得到该会话秘钥后将其存储在第二存储区。在S507中,第二终端在执行该控制指令后可向第一终端中的第一应用返 回响应,第一终端中的第一应用可将该响应发送给第一终端中的第二应用,第二应用可根据该响应,将第二存储区中存储的该会话秘钥删除。
基于图4所示的TEE架构,图6示例性地示出了基于TEE技术实现的数字证书申请的流程示意图。如图所示,该流程可包括:
S601:第一终端中的第二应用生成数字证书的公钥和私钥,并将该数字证书的私钥存储在第二存储区。该数字证书与用于对受控设备进行控制的应用相对应。
可选地,第一终端中的第二应用在生成数字证书的私钥后,可从第三存储区读取设备秘钥,用户该设备秘钥加密数字证书的私钥,并将加密的数字证书私钥存储到第二存储区。
S602:第一终端中的第二应用向第二终端中的第一应用发送数字证书请求,该数字证书请求中包括所述数字证书的公钥。
S603:第一终端中的第一应用通过收发器向认证服务器发送数字证书请求。
S604:第一终端中的第一应用与认证服务器之间进行必要的身份认证,并在身份认证通过后,认证服务器向第一终端发送数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期等信息。
S604:第一终端中的第一应用通过收发器接收到认证服务器发送的数字证书后,将该数字证书存储在第一存储区。
上述对受控设备进行控制的流程以及数字证书申请流程,可应用于通过移动终端(比如智能手机)控制门锁的场景。在该场景中,上述流程中的“第一终端”为移动终端(比如智能手机),“第二终端”为控制终端,“受控设备”为门锁控制装置,控制指令为对门锁进行相应的控制操作的控制指令。
基于相同的技术构思,本申请实施例还提供了一种第一终端,该终端可实现前述实施例中第一终端所执行的流程。
参见图7,为本申请实施例提供的第一终端的结构示意图。该终端可包括:第一应用模块701、第二应用模块702,还可包括收发器(未在图中示出)。
第一应用模块701,用于根据对受控设备的控制请求,通过所述收发器向与所述第一终端连接的第二终端发送会话秘钥获取请求;以及,通过所述收发器接收所述第二终端根据所述秘钥会话获取请求发送的会话秘钥,并将所述加密的会话秘钥发送给第二应用模块;所述会话秘钥使用数字证书的公钥进行加密;
第二应用模块702,用于使用所述数字证书的私钥解密得到所述会话秘钥,根据所 述控制请求生成控制指令,用所述会话秘钥加密所述控制指令,并将加密的控制指令发送给所述第一应用模块;
所述第一应用模块701还用于,通过所述收发器将加密的控制指令发送给第二终端,所述控制指令用于指示所述第二终端对所述受控设备进行相应控制操作。
可选地,所述第二应用模块702具体用于:从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
可选地,所述会话秘钥获取请求中包括所述数字证书。
可选地,第二应用模块702还用于:生成数字证书的私钥,从所述第一终端的只读存储区读取设备秘钥,使用所述设备秘钥加密所述私钥,并将加密的私钥存储到所述移动终端的安全存储区中,向第一应用发送数字证书请求;所述第一应用模块701还用于:通过所述收发器将所述数字证书请求发送给认证服务器,通过所述收发器接收所述认证服务器根据所述数字证书请求发送的数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
可选地,所述第一应用模块701具体用于:接收用户通过门锁控制应用的用户界面提交的门锁控制请求,确定是否与所述门锁控制应用关联的第二终端之间建立连接;所述收发器具体用于:若已建立连接,则通过所述连接向所述第二终端发送会话秘钥获取请求。可选地,所述连接为蓝牙连接。
可选地,所述第一终端可以是移动终端,所述第二终端可以是控制终端(比如车载终端)。相应地,所述控制请求为门锁控制请求(比如车门控制请求),所述控制指令为门锁控制指令(比如车门控制指令)。
基于相同的技术构思,本申请实施例还提供了一种第二终端,该终端可实现前述实施例中第二终端所执行的流程。
参见图8,为本申请实施例提供的第二终端的结构示意图。该终端可包括:会话秘钥处理模块801、控制指令处理模块802,还可包括收发器(未在图中示出)。
会话秘钥处理模块801,用于通过所述收发器接收与所述第二终端连接的第一终端发送的会话秘钥获取请求,根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并通过所述收发器将加密的会话秘钥发送给所述第一终端;
控制指令处理模块802,用于通过所述收发器接收所述第一终端发送的加密的控制指令,使用所述会话秘钥解密得到所述控制指令,并根据解密得到的控制指令对受控设 备进行相应控制操作。
可选地,所述会话秘钥获取请求中包括数字证书,所述第二终端中还包括证书验证模块703。证书验证模块703用于通过所述收发器向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;以及,通过所述收发器接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
可选地,所述第一终端和所述第二终端之间的连接为蓝牙连接。
可选地,所述第一终端可以是移动终端,所述第二终端可以是控制终端(比如车载终端)。相应地,所述控制请求为门锁控制请求(比如车门控制请求),所述控制指令为门锁控制指令(比如车门控制指令)。
基于相同的技术构思,本申请实施例还提供了一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行前述实施例描述的第一终端执行的控制方法。
基于相同的技术构思,本申请实施例还提供了一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行前述实施例描述的第二终端执行的控制方法。
基于相同的技术构思,本申请实施例还提供了一种装置1100,该装置1100可实现前述实施例描述的第一终端执行的流程。
图9示例性地示出了根据各种实施例的示例装置1100,装置1100可包括一个或多个处理器1102,系统控制逻辑1101耦合于至少一个处理器1102,非易失性存储器(non-volatile memory,NMV)/存储器1104耦合于系统控制逻辑1101,网络接口1106耦合于系统控制逻辑1101。
处理器1102可包括一个或多个单核处理器或多核处理器。处理器1102可包括任何一般用途处理器或专用处理器(如图像处理器、应用处理器基带处理器等)的组合。
一个实施例中的系统控制逻辑1101,可包括任何适当的接口控制器,以提供到处理器1102中的至少一个的任何合适的接口,和/或提供到与系统控制逻辑1101通信的任何合适的设备或组件的任何合适的接口。
一个实施例中的系统控制逻辑1101,可包括一个或多个内存控制器,以提供到系统内存1103的接口。系统内存1103用来加载以及存储数据和/或指令。例如,对应装置1100, 在一个实施例中,系统内存1103可包括任何合适的易失性存储器。
NVM/存储器1104可包括一个或多个有形的非暂时的计算机可读介质,用于存储数据和/或指令。例如,NVM/存储器1104可包括任何合适的非易失性存储装置,如一个或多个硬盘(hard disk device,HDD),一个或多个光盘(compact disk,CD),和/或一个或多个数字通用盘(digital versatile disk,DVD)。
NVM/存储器1104可包括存储资源,该存储资源物理上是该系统所安装的或者可以被访问的设备的一部分,但不一定是设备的一部分。例如,NVM/存储器1104可经由网络接口1106被网络访问。
系统内存1103以及NVM/存储器1104可分别包括临时的或持久的指令1110的副本。指令1110可包括当由处理器1102中的至少一个执行时导致装置1100实现图2至图6描述的方法之一或组合的指令。各实施例中,指令1110或硬件、固件,和/或软件组件可另外地/可替换地被置于系统控制逻辑1101,网络接口1106和/或处理器1102。
网络接口1106可包括一个接收器来为装置1100提供无线接口来与一个或多个网络和/或任何合适的设备进行通信。网络接口1106可包括任何合适的硬件和/或固件。网络接口1106可包括多个天线来提供多输入多输出无线接口。在一个实施例中,网络接口1106可包括一个网络适配器、一个无线网络适配器、一个电话调制解调器,和/或无线调制解调器。
在一个实施例中,处理器1102中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑一起封装。在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑一起封装以形成系统级封装。在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑集成在相同的管芯上。在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑集成在相同的管芯上以形成系统芯片。
装置1100可进一步包括输入/输出装置1105。输入/输出装置1105可包括用户接口旨在使用户与装置1100进行交互,可包括外围组件接口,其被设计为使得外围组件能够与系统交互,和/或,可包括传感器,旨在确定环境条件和/或有关装置1100的位置信息。
基于相同的技术构思,本申请实施例还提供了一种装置,该装置可实现前述实施例描述的第二终端执行的流程。
图10示例性地示出了根据各种实施例的示例装置1200,装置1200可包括一个或多个处理器1202,系统控制逻辑1201耦合于至少一个处理器1202,非易失性存储器 (non-volatile memory,NMV)/存储器1204耦合于系统控制逻辑1201,网络接口1206耦合于系统控制逻辑1201。
处理器1202可包括一个或多个单核处理器或多核处理器。处理器1202可包括任何一般用途处理器或专用处理器(如图像处理器、应用处理器基带处理器等)的组合。
一个实施例中的系统控制逻辑1201,可包括任何适当的接口控制器,以提供到处理器1202中的至少一个的任何合适的接口,和/或提供到与系统控制逻辑1201通信的任何合适的设备或组件的任何合适的接口。
一个实施例中的系统控制逻辑1201,可包括一个或多个内存控制器,以提供到系统内存1203的接口。系统内存1203用来加载以及存储数据和/或指令。例如,对应装置1200,在一个实施例中,系统内存1203可包括任何合适的易失性存储器。
NVM/存储器1204可包括一个或多个有形的非暂时的计算机可读介质,用于存储数据和/或指令。例如,NVM/存储器1204可包括任何合适的非易失性存储装置,如一个或多个硬盘(hard disk device,HDD),一个或多个光盘(compact disk,CD),和/或一个或多个数字通用盘(digital versatile disk,DVD)。
NVM/存储器1204可包括存储资源,该存储资源物理上是该系统所安装的或者可以被访问的设备的一部分,但不一定是设备的一部分。例如,NVM/存储器1204可经由网络接口1206被网络访问。
系统内存1203以及NVM/存储器1204可分别包括临时的或持久的指令1210的副本。指令1210可包括当由处理器1202中的至少一个执行时导致装置1200实现图2至图6描述的方法之一或组合的指令。各实施例中,指令1210或硬件、固件,和/或软件组件可另外地/可替换地被置于系统控制逻辑1201,网络接口1206和/或处理器1202。
网络接口1206可包括一个接收器来为装置1200提供无线接口来与一个或多个网络和/或任何合适的设备进行通信。网络接口1206可包括任何合适的硬件和/或固件。网络接口1206可包括多个天线来提供多输入多输出无线接口。在一个实施例中,网络接口1206可包括一个网络适配器、一个无线网络适配器、一个电话调制解调器,和/或无线调制解调器。
在一个实施例中,处理器1202中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑一起封装。在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑一起封装以形成系统级封装。在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑集成在相同的管芯上。 在一个实施例中,处理器中的至少一个可以与用于系统控制逻辑的一个或多个控制器的逻辑集成在相同的管芯上以形成系统芯片。
装置1200可进一步包括输入/输出装置1205。输入/输出装置1205可包括用户接口旨在使用户与装置1200进行交互,可包括外围组件接口,其被设计为使得外围组件能够与系统交互,和/或,可包括传感器,旨在确定环境条件和/或有关装置1200的位置信息。

Claims (35)

  1. 一种控制方法,其特征在于,包括:
    移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求;
    所述控制终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述移动终端;
    所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,使用所述会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给所述控制终端;
    所述控制终端使用所述会话秘钥解密得到所述门锁控制指令,根据解密得到的门锁控制指令进行门锁控制操作。
  2. 一种控制方法,其特征在于,包括:
    移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求;
    所述移动终端接收所述控制终端根据所述秘钥会话获取请求发送的会话秘钥,所述会话秘钥使用数字证书的公钥进行加密;
    所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,并用所述会话秘钥加密所述门锁控制指令;
    所述移动终端将加密的门锁控制指令发送给所述控制终端,所述门锁控制指令用于指示所述控制终端进行相应门锁控制操作。
  3. 如权利要求2所述的方法,其特征在于,所述会话秘钥获取请求中包括所述数字证书。
  4. 如权利要求2所述的方法,其特征在于,所述移动终端中包括第一应用和第二应用,所述第二应用为可信应用;
    所述移动终端使用所述数字证书的私钥解密得到所述会话秘钥,并用所述会话秘钥加密门锁控制指令,包括:
    所述第一应用将接收到的加密的会话秘钥发送给所述第二应用;
    所述第二应用从所述移动终端的安全存储区获取所述数字证书的私钥,并使用获取到的私钥解密得到会话秘钥;
    所述移动终端将加密的门锁控制指令发送给所述控制终端,包括:
    所述第二应用使用解密得到的会话秘钥加密门锁控制指令,并将加密的门锁控制指令发送给第一应用;
    所述第一应用将加密的门锁控制指令发送给所述控制终端。
  5. 如权利要求4所述的方法,其特征在于,所述第二应用从安全存储区获取所述数字证书的私钥,包括:
    所述第二应用从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;
    所述第二应用从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
  6. 如权利要求2所述的方法,其特征在于,所述移动终端中包括第一应用和第二应用,所述第二应用为可信应用;
    所述方法还包括:
    所述第二应用生成数字证书的私钥,从所述移动终端的只读存储区读取设备秘钥,使用所述设备秘钥加密所述私钥,并将加密的私钥存储到所述移动终端的安全存储区中;
    所述第二应用向第一应用发送数字证书请求,所述第一应用将所述数字证书请求发送给认证服务器;
    所述第二应用接收所述认证服务器根据所述数字证书请求发送的数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
  7. 如权利要求2至5中任一项所述的方法,其特征在于,移动终端根据门锁控制请求,向与所述移动终端连接的控制终端发送会话秘钥获取请求,包括:
    移动终端接收用户通过门锁控制应用的用户界面提交的门锁控制请求,确定是否与所述门锁控制应用关联的控制终端之间建立连接;若已建立连接,则通过所述连接向所述控制终端发送会话秘钥获取请求。
  8. 如权利要求7所述的方法,其特征在于,所述连接为蓝牙连接。
  9. 一种控制方法,其特征在于,包括:
    控制终端接收与所述控制终端连接的移动终端发送的会话秘钥获取请求;
    所述控制终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述移动终端;
    所述控制终端接收所述移动终端发送的加密的门锁控制指令,使用所述会话秘钥解 密得到所述门锁控制指令,并根据解密得到的门锁控制指令进行相应门锁控制操作。
  10. 如权利要求9所述的方法,其特征在于,所述会话秘钥获取请求中包括数字证书,所述方法还包括:
    所述控制终端向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;
    所述控制终端接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
  11. 如权利要求9或10所述的方法,其特征在于,所述控制终端和所述移动终端通过蓝牙连接。
  12. 一种控制方法,其特征在于,包括:
    第一终端根据对受控设备的控制请求,向与所述第一终端连接的第二终端发送会话秘钥请求;
    所述第一终端接收所述第二终端根据所述会话秘钥获取请求返回的会话秘钥,所述会话秘钥使用数字证书的公钥进行加密;
    所述第一终端使用所述数字证书的私钥解密得到所述会话秘钥,根据所述控制请求生成控制指令,并用所述会话秘钥加密所述控制指令;
    所述第一终端将加密的控制指令发送给所述第二终端,所述控制指令用于指示所述第二终端对所述受控设备进行相应的控制操作。
  13. 如权利要求12所述的方法,其特征在于,所述第一终端中包括第一应用和第二应用,所述第二应用为可信应用;
    所述第一终端使用所述数字证书的私钥解密得到所述会话秘钥,并用所述会话秘钥加密所述控制指令,包括:
    所述第一应用将接收到的加密的会话秘钥发送给所述第二应用;
    所述第二应用从所第一动终端的安全存储区获取所述数字证书的私钥,并使用获取到的私钥解密得到会话秘钥;
    所述第一终端将加密的控制指令发送给所述第二终端,包括:
    所述第二应用使用解密得到的会话秘钥加密控制指令,并将加密的控制指令发送给第一应用;
    所述第一应用将加密的控制指令发送给所述第二终端。
  14. 如权利要求13所述的方法,其特征在于,所述第二应用从安全存储区获取所述数字证书的私钥,包括:
    所述第二应用从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;
    所述第二应用从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
  15. 一种控制方法,其特征在于,包括:
    第二终端接收与所述第二终端连接的第一终端发送的会话秘钥获取请求;
    所述第二终端根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并将加密的会话秘钥发送给所述第一终端;
    所述第二终端接收所述第一终端发送的加密的控制指令,使用所述会话秘钥解密得到所述控制指令,并根据解密得到的控制指令对受控设备进行相应的控制操作。
  16. 如权利要求15所述的方法,其特征在于,所述会话秘钥获取请求中包括数字证书,所述方法还包括:
    所述第二终端向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;
    所述第二终端接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
  17. 一种移动终端,其特征在于,包括:第一应用模块、第二应用模块以及收发器;
    第一应用模块,用于根据门锁控制请求,通过所述收发器向与所述移动终端连接的控制终端发送会话秘钥获取请求;以及,通过所述收发器接收所述控制终端根据所述秘钥会话获取请求发送的会话秘钥,并将加密的所述会话秘钥发送给第二应用模块;所述会话秘钥使用数字证书的公钥进行加密;
    第二应用模块,用于使用所述数字证书的私钥解密得到所述会话秘钥,根据所述门锁控制请求生成门锁控制指令,用所述会话秘钥加密所述门锁控制指令,并将加密的门锁控制指令发送给所述第一应用模块;
    所述第一应用模块还用于,通过所述收发器将加密的门锁控制指令发送给所述控制终端,所述门锁控制指令用于指示所述控制终端进行相应门锁控制操作。
  18. 如权利要求17所述的移动终端,其特征在于,所述会话秘钥获取请求中包括所 述数字证书。
  19. 如权利要求17所述的移动终端,其特征在于,所述第二应用模块具体用于:
    从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;
    从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
  20. 如权利要求17所述的移动终端,其特征在于,所述第二应用模块还用于:生成数字证书的私钥,从所述移动终端的只读存储区读取设备秘钥,使用所述设备秘钥加密所述私钥,并将加密的私钥存储到所述移动终端的安全存储区中,向第一应用发送数字证书请求;
    所述第一应用模块还用于:通过所述收发器将所述数字证书请求发送给认证服务器,通过所述收发器接收所述认证服务器根据所述数字证书请求发送的数字证书,所述数字证书中包括所述公钥、所述数字证书的有效期信息。
  21. 如权利要求17至20中任一项所述的移动终端,其特征在于,所述第一应用模块具体用于:接收用户通过门锁控制应用的用户界面提交的门锁控制请求,确定是否与所述门锁控制应用关联的控制终端之间建立连接;
    所述收发器具体用于:若已建立连接,则通过所述连接向所述控制终端发送会话秘钥获取请求。
  22. 如权利要求21所述的移动终端,其特征在于,所述连接为蓝牙连接。
  23. 一种控制终端,其特征在于,包括:会话秘钥处理模块、控制指令处理模块和收发器;
    会话秘钥处理模块,用于通过所述收发器接收与所述控制终端连接的移动终端发送的会话秘钥获取请求,根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并通过所述收发器将加密的会话秘钥发送给所述移动终端;
    控制指令处理模块,用于通过所述收发器接收所述移动终端发送的加密的门锁控制指令,使用所述会话秘钥解密得到所述门锁控制指令,并根据解密得到的门锁控制指令进行相应门锁控制操作。
  24. 如权利要求23所述的控制终端,其特征在于,所述会话秘钥获取请求中包括数字证书,所述控制终端中还包括:
    证书验证模块,用于通过所述收发器向认证服务器发送用于确认所述数字证书是否 有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;以及,通过所述收发器接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
  25. 如权利要求23或24所述的控制终端,其特征在于,所述连接为蓝牙连接。
  26. 一种终端,其特征在于,包括:第一应用模块、第二应用模块以及收发器;
    第一应用模块,用于根据对受控设备的控制请求,通过所述收发器向与第一终端连接的第二终端发送会话秘钥获取请求;以及,通过所述收发器接收所述第二终端根据所述秘钥会话获取请求发送的会话秘钥,并将加密的所述会话秘钥发送给第二应用模块;所述会话秘钥使用数字证书的公钥进行加密;
    第二应用模块,用于使用所述数字证书的私钥解密得到所述会话秘钥,根据所述控制请求生成控制指令,用所述会话秘钥加密所述控制指令,并将加密的控制指令发送给所述第一应用模块;
    所述第一应用模块还用于,通过所述收发器将加密的控制指令发送给第二终端,所述控制指令用于指示所述第二终端对所述受控设备进行相应控制操作。
  27. 如权利要求26所述的终端,其特征在于,所述第二应用模块具体用于:从安全存储区获取所述数字证书的私钥,所述数字证书的私钥被设备秘钥进行了加密;从只读存储区获取所述设备秘钥,并使用所述设备秘钥对加密的数字证书的私钥进行解密。
  28. 一种终端,其特征在于,包括:会话秘钥处理模块、控制指令处理模块和收发器;
    会话秘钥处理模块,用于通过所述收发器接收与第二终端连接的第一终端发送的会话秘钥获取请求,根据所述会话秘钥获取请求生成会话秘钥,使用数字证书的公钥加密所述会话秘钥,并通过所述收发器将加密的会话秘钥发送给所述第一终端;
    控制指令处理模块,用于通过所述收发器接收所述第一终端发送的加密的控制指令,使用所述会话秘钥解密得到所述控制指令,并根据解密得到的控制指令对受控设备进行相应控制操作。
  29. 如权利要求28所述的终端,其特征在于,所述会话秘钥获取请求中包括数字证书,所述第二终端中还包括:
    证书验证模块,用于通过所述收发器向认证服务器发送用于确认所述数字证书是否有效的验证请求,所述验证请求用于触发所述认证服务器在所述数字证书未被回收且在有效期内的情况下返回用于指示所述数字证书有效的验证结果;以及,通过所述收发器 接收所述认证服务器返回的验证结果,并根据所述验证结果确认所述数字证书是否有效。
  30. 一个或多个计算机可读介质,其特征在于,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行如权利要求2-8中任一项所述的方法。
  31. 一个或多个计算机可读介质,其特征在于,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行如权利要求9-11中任一项所述的方法。
  32. 一个或多个计算机可读介质,其特征在于,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行如权利要求12-14中任一项所述的方法。
  33. 一个或多个计算机可读介质,其特征在于,所述可读介质上存储有指令,所述指令被一个或多个处理器执行时,使得通信设备执行如权利要求15-16中任一项所述的方法。
  34. 一种装置,其特征在于,包括:一个或多个处理器;以及一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被所述一个或多个处理器执行时,使得所述装置执行如权利要求2-8、12-14中任一项所述的方法。
  35. 一种装置,其特征在于,包括:一个或多个处理器;以及一个或多个计算机可读介质,所述可读介质上存储有指令,所述指令被所述一个或多个处理器执行时,使得所述装置执行如权利要求9-11、15-16中任一项所述的方法。
PCT/CN2018/093269 2017-07-04 2018-06-28 一种控制方法及装置 WO2019007252A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710538445.9A CN109218263B (zh) 2017-07-04 2017-07-04 一种控制方法及装置
CN201710538445.9 2017-07-04

Publications (1)

Publication Number Publication Date
WO2019007252A1 true WO2019007252A1 (zh) 2019-01-10

Family

ID=64949695

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093269 WO2019007252A1 (zh) 2017-07-04 2018-06-28 一种控制方法及装置

Country Status (2)

Country Link
CN (1) CN109218263B (zh)
WO (1) WO2019007252A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047185A (zh) * 2019-04-25 2019-07-23 广州河东科技有限公司 一种智能门锁的开锁方法及系统
CN114124403A (zh) * 2021-11-10 2022-03-01 中国电信股份有限公司 实现设备远程控制的方法、装置和系统
CN115734221A (zh) * 2022-11-21 2023-03-03 北京深盾科技股份有限公司 物联网设备管理方法、设备、移动终端、装置及存储介质
CN116094730A (zh) * 2023-01-18 2023-05-09 中国第一汽车股份有限公司 一种车辆ecu数字证书申请方法及系统

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108768664B (zh) * 2018-06-06 2020-11-03 腾讯科技(深圳)有限公司 密钥管理方法、装置、系统、存储介质和计算机设备
CN110535641B (zh) * 2019-08-27 2022-06-10 中国神华能源股份有限公司神朔铁路分公司 密钥管理方法和装置、计算机设备和存储介质
WO2022000261A1 (zh) * 2020-06-30 2022-01-06 深圳市大疆创新科技有限公司 用于相机的启动、激活的方法和相机、云台
CN112861156B (zh) * 2021-02-26 2022-12-13 上海升途智能系统有限公司 显示数据的安全通信方法、装置、电子设备及存储介质
CN113141609B (zh) * 2021-03-17 2023-02-07 深圳市高格通讯技术有限公司 加密通信方法、终端
CN115604390A (zh) * 2021-07-07 2023-01-13 云丁网络技术(北京)有限公司(Cn) 对智能设备的离线控制方法和装置
CN114125827B (zh) * 2021-11-24 2023-11-10 北京天融信网络安全技术有限公司 一种终端管理方法、装置及集中化管理系统
CN116052307A (zh) * 2022-12-28 2023-05-02 广州河东科技有限公司 一种开锁方法、系统、智能门锁及存储介质
CN116824740B (zh) * 2023-05-12 2024-03-26 中山市元智科技有限公司 一种多重门锁互联处理方法及设备、控制装置、存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104658090A (zh) * 2015-01-29 2015-05-27 杭州晟元芯片技术有限公司 一种内置安全模块和ZigBee无线通讯模块的智能锁
US9189900B1 (en) * 2011-04-22 2015-11-17 Angel A. Penilla Methods and systems for assigning e-keys to users to access and drive vehicles
CN105281909A (zh) * 2015-06-26 2016-01-27 浙江巨联科技股份有限公司 一种加解密机制及采用该加解密机制的物联网锁系统
CN105307165A (zh) * 2015-10-10 2016-02-03 中国民生银行股份有限公司 基于移动应用的通信方法、服务端和客户端

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008312148A (ja) * 2007-06-18 2008-12-25 Toshiba Corp 通信装置、通信システム及び通信方法
CN103921759B (zh) * 2014-04-18 2017-02-01 深圳市威富安防有限公司 一种车辆智能防盗启动方法及系统
CN104851159B (zh) * 2014-12-01 2017-06-06 讯美电子科技有限公司 一种网络型门禁控制系统
CN104851206A (zh) * 2015-05-25 2015-08-19 华北电力大学 一种基于usbkey的电费在线支付系统
CN106603238B (zh) * 2015-10-20 2019-06-18 飞天诚信科技股份有限公司 一种多数字证书的签发系统、证书管理端、签发装置及其工作方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189900B1 (en) * 2011-04-22 2015-11-17 Angel A. Penilla Methods and systems for assigning e-keys to users to access and drive vehicles
CN104658090A (zh) * 2015-01-29 2015-05-27 杭州晟元芯片技术有限公司 一种内置安全模块和ZigBee无线通讯模块的智能锁
CN105281909A (zh) * 2015-06-26 2016-01-27 浙江巨联科技股份有限公司 一种加解密机制及采用该加解密机制的物联网锁系统
CN105307165A (zh) * 2015-10-10 2016-02-03 中国民生银行股份有限公司 基于移动应用的通信方法、服务端和客户端

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110047185A (zh) * 2019-04-25 2019-07-23 广州河东科技有限公司 一种智能门锁的开锁方法及系统
CN114124403A (zh) * 2021-11-10 2022-03-01 中国电信股份有限公司 实现设备远程控制的方法、装置和系统
CN115734221A (zh) * 2022-11-21 2023-03-03 北京深盾科技股份有限公司 物联网设备管理方法、设备、移动终端、装置及存储介质
CN115734221B (zh) * 2022-11-21 2023-11-03 北京深盾科技股份有限公司 物联网设备管理方法、设备、移动终端、装置及存储介质
CN116094730A (zh) * 2023-01-18 2023-05-09 中国第一汽车股份有限公司 一种车辆ecu数字证书申请方法及系统

Also Published As

Publication number Publication date
CN109218263B (zh) 2021-06-08
CN109218263A (zh) 2019-01-15

Similar Documents

Publication Publication Date Title
WO2019007252A1 (zh) 一种控制方法及装置
KR102138283B1 (ko) 하나의 장치를 이용하여 다른 장치를 언로크하는 방법
CN110177354B (zh) 一种车辆的无线控制方法及系统
CN112987581B (zh) 用于智能家居设备的控制方法及其介质和终端
KR102399582B1 (ko) 모바일 디바이스를 사용한 시스템 액세스
EP3723399A1 (en) Identity verification method and apparatus
KR102201093B1 (ko) 암호화를 이용한 데이터 보안 시스템
US7912224B2 (en) Wireless network system and communication method for external device to temporarily access wireless network
US8295484B2 (en) System and method for securing data from a remote input device
EP3032857B1 (en) Hearing device with communication protection and related method
US9762567B2 (en) Wireless communication of a user identifier and encrypted time-sensitive data
WO2015192670A1 (zh) 用户身份认证方法、终端和服务端
EP3032845B1 (en) Hearing device configured to authenticate a mode request and related method
JP2010532107A (ja) ソフトsimクレデンシャルのセキュア転送
US11546699B2 (en) Hearing device with service mode and related method
CN107733652B (zh) 用于共享交通工具的开锁方法和系统及车锁
US10334431B2 (en) Near field communications (NFC)-based offload of NFC operation
US20070157020A1 (en) Method and apparatus for providing session key for WUSB security and method and apparatus for obtaining the session key
CN105325021B (zh) 用于远程便携式无线设备认证的方法和装置
WO2023279283A1 (zh) 建立车辆安全通信的方法、车辆、终端及系统
EP2974201A1 (en) Method and apparatus to authenticate a personal device to access an enterprise network
JPWO2016035466A1 (ja) 通信システム、サーバ装置用プログラム及びこれを記録した記録媒体、通信装置用プログラム及びこれを記録した記録媒体、端末装置用プログラム及びこれを記録した記録媒体
CN113316916A (zh) 数字密钥共享系统中更新防盗令牌的设备及方法
CN111200807A (zh) 一种基于蓝牙的信息交互方法及其装置
US11516215B2 (en) Secure access to encrypted data of a user terminal

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: 18828215

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18828215

Country of ref document: EP

Kind code of ref document: A1