WO2022171177A1 - 通信密钥配置方法及装置 - Google Patents

通信密钥配置方法及装置 Download PDF

Info

Publication number
WO2022171177A1
WO2022171177A1 PCT/CN2022/075864 CN2022075864W WO2022171177A1 WO 2022171177 A1 WO2022171177 A1 WO 2022171177A1 CN 2022075864 W CN2022075864 W CN 2022075864W WO 2022171177 A1 WO2022171177 A1 WO 2022171177A1
Authority
WO
WIPO (PCT)
Prior art keywords
certificate
key
terminal
message
management server
Prior art date
Application number
PCT/CN2022/075864
Other languages
English (en)
French (fr)
Inventor
郭志鹏
潘凯
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP22752337.0A priority Critical patent/EP4283955A1/en
Publication of WO2022171177A1 publication Critical patent/WO2022171177A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/40Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P]
    • H04W4/44Services specially adapted for particular environments, situations or purposes for vehicles, e.g. vehicle-to-pedestrians [V2P] for communication between vehicles and infrastructures, e.g. vehicle-to-cloud [V2C] or vehicle-to-home [V2H]
    • 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
    • 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
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • 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/14Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • 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/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3268Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/069Authentication using certificates or pre-shared keys
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/84Vehicles
    • 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/10Protocols in which an application is distributed across nodes in the network
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/70Services for machine-to-machine communication [M2M] or machine type communication [MTC]

Definitions

  • the present application relates to the technical fields of Internet of Vehicles and communications, and in particular, to a method and device for configuring a communication key.
  • the cloud device needs to upload the data to the cloud.
  • the cloud device In order to ensure the security of data uploading, the cloud device needs to negotiate a key with the vehicle-end device to obtain the key, and then encrypt the data and upload it.
  • the key negotiation process requires multiple message exchanges, and the communication data volume is large, which affects the data upload performance.
  • the security of the temporary key obtained through key negotiation is related to the randomness of the random numbers generated by both parties in the negotiation. Once the randomness of the random numbers is reduced, it will lead to the risk of being easily predicted by attackers, which will lead to lower data security. Difference. Therefore, how to configure the key used for the data in the communication to ensure the security of the data has become an urgent problem to be solved.
  • the embodiments of the present application provide a communication key configuration method and device, which can directly allocate communication keys to vehicles to reduce the required number of message interactions, and ensure the security of distribution and transmission of communication keys, thereby ensuring data security sex.
  • the present application provides a communication key configuration method.
  • a certificate key management server receives a first message from a first terminal, where the first message includes a first certificate and a second certificate;
  • the key management server uses the first certificate to verify that the first terminal has an identity certificate that uses the second certificate to request a communication key;
  • the certificate key management server can use the second certificate to encrypt the communication key allocated to the first terminal, Obtaining the ciphertext of the communication key; thereby sending a second message containing the ciphertext of the communication key to the first terminal.
  • the first terminal may be a vehicle or a vehicle module, such as a vehicle-mounted device.
  • the first terminal may also be an intelligent device such as a robot, a drone, or a transportation tool, or a component or a module in a device such as a smart device or a transportation tool.
  • the certificate key management server supports communication with multiple robots, drones and other intelligent devices, or multiple vehicles, multiple vehicle-end devices and other means of transport, or components or modules in intelligent devices, means of transport and other devices, and for For these smart devices, transportation vehicles or components or modules therein, the certificate key management server is more trusted.
  • the certificate key management server can directly assign a communication key to the first terminal to avoid the problem that the key obtained through key negotiation cannot guarantee the key strength; and the certificate The key management server can use the first certificate to verify that the first terminal has an identity credential to request a communication key using the second certificate, to ensure that the communication key is assigned to the vehicle with the identity credential; and the certificate key management server can also use the second certificate The certificate encrypts the communication key assigned to the vehicle to ensure the security of the communication key transmission.
  • the certificate key management server allocates the communication key to the vehicle, which is also beneficial to meet the needs of supervision and auditing compared with the way in which the vehicle directly negotiates the key with the cloud server.
  • the first certificate may be different from the device certificate, and the first certificate may be specially used to verify the identity certificate of the vehicle requesting the key, so as to avoid the direct use of the device certificate by the first terminal because the device certificate is not easy to update and revoke.
  • the device certificate request key leads to the problem that the device certificate is used too many times and the private key corresponding to the device certificate is easily leaked, which in turn leads to the leakage of the communication key.
  • the first certificate can also be updated more frequently than the device certificate. Even if the private key corresponding to the first certificate is leaked, a new first certificate can be applied for again, and the leaked registration certificate can be revoked, so that the subsequent identity certificate can be revoked. The authentication is not affected, improving security.
  • the second certificate may be a certificate dedicated to communication key distribution.
  • This application uses the second certificate to ensure the confidentiality of the communication key transmission, which can further improve the update frequency of the second certificate compared to the method of encrypting the communication key with the device certificate or the first certificate, even if the second certificate corresponding to the second certificate After the private key is leaked, it is also possible to apply for a new second certificate, and at the same time revoke the leaked second certificate, so that the transmission of the subsequent communication key is not affected and the security is improved.
  • the number of first certificates possessed by a vehicle may be multiple, corresponding to different services; the number of second certificates possessed by a vehicle may also be multiple, corresponding to different data of the same service, respectively.
  • Application is not limited.
  • the first message from the first terminal further includes a first signature.
  • the certificate key management server verifies, according to the first public key in the first certificate, that the first terminal has the identity certificate for requesting the communication key by using the second certificate, which may include: the certificate key management server according to the first message and the first certificate The first public key in the first key is used to verify the first signature; the certificate key management server determines that the first terminal has the first private key corresponding to the first message and the first certificate (or, The first terminal has a first private key corresponding to the first certificate and the first message has not been tampered with), the first message and the first private key are used to indicate that the first terminal has an identity credential for requesting a communication key by using the second certificate . Therefore, it is beneficial for the certificate key management server to distribute the communication key to the vehicle with the identity certificate.
  • the second message sent by the certificate key management server further includes a second signature.
  • the second signature is generated by the certificate key management server using the ciphertext of the communication key and the private key corresponding to its own certificate, and is used to indicate that the second message comes from the certificate key management server. Therefore, it is beneficial for the first terminal to verify the legitimacy of the source of the second message according to the second signature, and then to be able to use the communication key for data transmission.
  • the above-mentioned first certificate and second certificate may be distributed to the first terminal by the certificate key management server.
  • the certificate key management server allocates the first certificate and the second certificate to the first terminal.
  • the relevant operation of the certificate key management server allocating the second certificate to the first terminal may include but is not limited to the following steps: the certificate key management server receives a third message from the first terminal, the The third message contains the first certificate and the second public key; the certificate key management server uses the first public key in the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate; the certificate key management server uses A second certificate is generated from the second public key of the first terminal; the certificate key management server sends a fourth message to the first terminal, where the fourth message includes the second certificate. It can be seen that this embodiment ensures that the second certificate can be distributed to the vehicle with the corresponding identity certificate, so that the vehicle can directly request the communication key from the certificate key management server by using the communication key configuration method described in this application.
  • the third message from the first terminal may be a second certificate request message, which is used to request a second certificate and then a communication key.
  • the third message from the first terminal further includes a third signature.
  • the certificate key management server uses the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate, including: the certificate key management server uses the second public key and the first public key in the first certificate key to verify the third signature; when the verification of the third signature is passed, the certificate key management server determines that the first terminal has the second public key and the first private key corresponding to the first certificate (or the first terminal has the first private key) The first private key and the second public key corresponding to the certificate have not been tampered with); the second public key and the first private key are used to indicate that the first terminal has an identity certificate for requesting a communication key by using the second certificate. Furthermore, it is advantageous to assign the second certificate to the vehicle having the corresponding identity certificate through the above-mentioned fourth message.
  • the relevant operation of the certificate key management server allocating the first certificate to the first terminal may include but not limited to the following steps: the certificate key management server receives the fifth message from the first terminal; The fifth message includes the device certificate and the first public key; the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate requesting the first certificate; the certificate key management server generates the first terminal based on the first public key from the first terminal. a certificate; the certificate key management server sends a sixth message to the first terminal, where the sixth message includes the first certificate. It can be seen that this embodiment can not only assign the first certificate to the vehicle, but also ensure that the vehicle to which the first certificate is assigned is a vehicle with a corresponding identity certificate.
  • the fifth message further includes a fourth signature.
  • the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate for requesting the first certificate, including: the certificate key management server verifying the fourth public key according to the first public key and the third public key in the device certificate signature; the certificate key management server determines that the first terminal has the first public key and the third private key corresponding to the device certificate when the fourth signature verification is passed, and the first public key and the third private key are used to indicate the first terminal Has the credentials to request the first certificate. It can be seen that this embodiment can ensure that the vehicle to which the first certificate is assigned is the vehicle with the corresponding identity certificate.
  • the communication key configuration method provided by the present application may further include: the certificate key management server transmits the communication key allocated to the first terminal to the cloud server through a secure channel. Therefore, it is beneficial for the cloud server to use the communication key to decrypt the data encrypted by the communication key uploaded by the first terminal, which is further beneficial for the cloud server to optimize applications such as automatic driving.
  • the above-mentioned related operations of the communication key configuration method, the related operations of the first certificate distribution, and the related operations of the second certificate distribution are respectively performed in three different stages.
  • operations related to distribution of the first certificate can be performed
  • operations related to distribution of the second certificate can be performed
  • operations related to configuration of communication keys can be performed.
  • the update cycles for the first terminal to apply for the first certificate, the second certificate and the communication key may also be different from each other. Therefore, it is beneficial to improve the flexibility of the first terminal to trigger related operations at various stages, and also to improve the flexibility of the division of functional modules in the first terminal.
  • the present application further provides a communication key configuration method, which corresponds to the communication key configuration method described in the first aspect and is described from the perspective of the first terminal.
  • the first terminal can send a first message to the certificate key management server; the first message includes the first certificate and the second certificate; the first terminal receives the second message; the second message is the certificate key management server Sent by using the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate; the second message contains the ciphertext of the communication key of the first terminal; the first terminal uses the second certificate corresponding to the second certificate. private key, decrypt the ciphertext of the communication key, and obtain the communication key.
  • the first terminal may be a vehicle or a vehicle module, such as a vehicle-mounted device.
  • the first terminal may also be an intelligent device such as a robot, a drone, or a transportation tool, or a component or a module in a device such as a smart device or a transportation tool.
  • the certificate key management server supports communication with multiple robots, drones and other intelligent devices, or multiple vehicles, multiple vehicle-end devices and other means of transport, or components or modules in intelligent devices, means of transport and other devices, and for For these smart devices, transportation vehicles or components or modules therein, the certificate key management server is more trusted.
  • the first terminal can apply for a communication key through the first message, so that it can directly receive the second message returned from the certificate key management server to obtain the communication key, avoiding the need for the first terminal to communicate with the communication pair.
  • terminal such as a cloud server
  • the key obtained through negotiation cannot guarantee the strength of the key; and, on the one hand, the first terminal can use the first certificate to indicate to the certificate key management server that it is a vehicle with an identity certificate, and on the other hand , the first terminal can use the second private key corresponding to the second certificate to uniquely know the communication key allocated to itself by the certificate key management server, which ensures the security of the communication key transmission.
  • the first terminal can obtain the communication key from the certificate key management server, which is more conducive to meeting the needs of supervision and auditing compared with the way in which the vehicle directly negotiates the communication key with the cloud server.
  • the first certificate may be different from the device certificate, and the first certificate may be specially used to verify the identity certificate of the vehicle requesting the key, so as to avoid the direct use of the device certificate by the first terminal because the device certificate is not easy to update and revoke.
  • the device certificate request key leads to the problem that the device certificate is used too many times and the private key corresponding to the device certificate is easily leaked, which in turn leads to the leakage of the communication key.
  • the first certificate can also be updated more frequently than the device certificate. Even if the private key corresponding to the first certificate is leaked, a new first certificate can be applied for again, and the leaked first certificate can be revoked, so that the subsequent identity Validation of credentials is not affected, improving security.
  • the second certificate may be a certificate dedicated to communication key distribution.
  • This application uses the second certificate to ensure the confidentiality of the communication key transmission, which can further improve the update frequency of the second certificate compared with the method of encrypting the communication key with the device certificate or the first certificate.
  • After the second private key is leaked it is also possible to apply for a new second certificate, and at the same time revoke the leaked second certificate, so that the transmission of the subsequent communication key is not affected, and the security is improved.
  • the first message sent by the first terminal further includes a first signature, that is, before the first terminal sends the first message to the certificate key management server
  • the method further includes: the first terminal uses The first certificate, the second certificate, and the first private key corresponding to the first certificate generate a first signature; the first signature is used by the certificate key management server to verify in combination with the first certificate that the first terminal has the request for a communication key by using the second certificate 's identity credentials. Therefore, it is beneficial for the certificate key management server to distribute the communication key to the first terminal having the identity certificate.
  • the second message further includes a second signature
  • the method further includes: the first terminal uses the public key in the certificate of the certificate key management server to verify the certificate. verifying the second signature; when the second signature verification is passed, the first terminal determines that the second message comes from the certificate key management server.
  • the first terminal verifies the second signature by using the ciphertext of the communication key and the public key in the certificate of the certificate key management server. It can be seen that this embodiment is beneficial for the first terminal to verify the legitimacy of the source of the second message according to the second signature, and then can use the communication key for data transmission, thereby improving the security of the communication key.
  • first certificate and second certificate may be applied for by the first terminal respectively.
  • the first terminal before the first terminal sends the first message, such as in the stage of activation of the first terminal or delivery to the client, the first terminal requests the first certificate and the second certificate from the certificate key management server.
  • the first terminal requests the certificate key management server for the second certificate, including but not limited to the following steps: the first terminal sends a third message to the certificate key management server, and the third message includes the first certificate and the second public key; the first terminal receives the fourth message; the fourth message is sent by the certificate key management server after verifying that the first terminal has the identity credential for requesting the communication key by using the second certificate by using the first certificate; the fourth The message includes the second certificate generated by the certificate key management server based on the second public key. It can be seen that this embodiment can indicate to the certificate key management server that the first terminal is a vehicle with a corresponding identity certificate, so that the first terminal can obtain the second certificate.
  • the third message further includes a third signature; that is, before the first terminal sends the third message to the certificate key management server, the method further includes: the first terminal according to the second public key and the corresponding first certificate.
  • the first private key is used to generate a third signature; the third signature is used by the certificate key management server to verify in combination with the first certificate that the first terminal has the identity certificate for requesting the communication key by using the second certificate.
  • the first terminal requests the certificate key management server for the first certificate, which may include, but is not limited to, the following related operations: the first terminal sends a fifth message to the certificate key management server; the fifth message includes: The device certificate and the first public key; the first terminal receives the sixth message; the sixth message is sent after the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate requesting the first certificate; the sixth message includes the certificate
  • the key management server generates a first certificate based on the first public key. It can be seen that this embodiment can indicate to the certificate key management server that the first terminal is a vehicle with a corresponding identity certificate, so that the first terminal can obtain the first certificate.
  • the fifth message further includes a fourth signature
  • the method before the first terminal sends the fifth message to the certificate key management server, the method further includes: according to the first public key and the device certificate corresponding to the first terminal.
  • the third private key is used to generate a fourth signature; the fourth signature is used by the certificate key management server to verify that the first terminal has the identity certificate requesting the first certificate in combination with the device certificate.
  • the first terminal decrypts the ciphertext of the communication key by using the second private key corresponding to the second certificate, and after obtaining the communication key, the method further includes: the first terminal uses the communication key The key encrypts the data to be transmitted to obtain the ciphertext of the data to be transmitted; the first terminal uploads the ciphertext of the data to be transmitted to the cloud server. Therefore, it is beneficial for the cloud server to obtain these data safely, which in turn is beneficial for the cloud server to optimize applications such as autonomous driving.
  • the first terminal may also upload the key identifier corresponding to the communication key and the vehicle identifier of the first terminal to the cloud server;
  • the first terminal uploads the ciphertext of the data to be transmitted and the key identifier corresponding to the communication key to the cloud server. Therefore, the cloud server can use the corresponding communication key to decrypt the ciphertext of the data.
  • the key identifier corresponding to the communication key can be obtained by the first terminal in the second message, that is, it is generated when the certificate key management server allocates the communication key to the first terminal.
  • the present application also provides a data decryption method, which is explained from the perspective of a cloud server, that is, the cloud server can be pushed in advance or actively obtain the communication key corresponding to each vehicle, and then, based on the The corresponding communication key is used to decrypt the ciphertext of the data uploaded by the corresponding vehicle.
  • the cloud server also needs to be pushed in advance or actively obtain multiple communication keys corresponding to each vehicle and each The communication key identifier of each communication key; correspondingly, while receiving the ciphertext of the data from each vehicle, the cloud server can also receive the communication key identifier corresponding to the ciphertext of the data, and then select the corresponding communication key to decrypt The ciphertext of this data. It can be seen that the data decryption method avoids the problem of insufficient communication key strength caused by negotiating the communication key between the cloud server and the vehicle, and reduces the number of interactive messages, thereby reducing the impact on data upload performance.
  • the present application further provides an apparatus for configuring a communication key, including a receiving unit, a processing unit and a sending unit.
  • the communication key configuration apparatus is used to implement the method described in the first aspect or any possible implementation manner of the first aspect.
  • the present application further provides another communication key configuration device, including a receiving unit, a processing unit and a sending unit.
  • the communication key configuration apparatus is used to implement the method described in the second aspect or any possible implementation manner of the second aspect.
  • the present application further provides a data decryption device, including a receiving unit and a processing unit.
  • the data decryption apparatus is used to implement the method described in the third aspect or any possible implementation manner of the third aspect.
  • the sending unit or the receiving unit in any one of the fourth aspect to the sixth aspect may also be a transceiver, for sending and/or receiving the data in any one of the fourth aspect to the sixth aspect; the processing unit It can also be a processor for processing the data in any one of the fourth to sixth aspects.
  • the present application provides a system-on-a-chip
  • the system-on-a-chip includes at least one processor configured to support implementing the functions involved in any one of the first to third aspects above, such as receiving or Process the data and/or information involved in the above methods.
  • the chip system further includes a memory for storing program instructions and data, and the memory is located inside the processor or outside the processor.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the present application further provides a communication key configuration device, the communication key configuration device includes at least one processor and a communication interface, the communication interface is used for sending and/or receiving data, the at least one processing The device is configured to invoke a computer program stored in at least one memory, so that the communication key configuration apparatus implements any one of the first aspect to the third aspect or any one of the possible implementations of the first aspect to the third aspect. method described.
  • the present application further provides a communication key configuration system, where the communication key configuration system includes at least two devices in a certificate key management server, a cloud server and a first terminal.
  • the certificate key management server is used to implement the method described in the first aspect or any possible implementation manner of the first aspect
  • the first terminal is used to implement the second aspect or one of the second aspects.
  • the method described in a possible implementation manner; the cloud server is configured to obtain or receive the communication key distributed by the certificate key management server to the first terminal.
  • the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program runs on one or more processors, the first aspect is implemented to the method described in any one of the third aspects (or implementing any one possible implementation thereof).
  • the embodiments of the present application disclose a computer program product, which, when the computer program product is run on one or more processors, implements any one of the first to third aspects (or implements the other any one of the possible implementations) described in the method.
  • FIG. 1 is a schematic diagram of the architecture of a communication system shown in the present application.
  • FIG. 2 is a schematic structural diagram of a communication key configuration system provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for configuring a communication key provided by an embodiment of the present application
  • FIG. 4 is a schematic flowchart of another communication key configuration method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of another communication key configuration method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a method for obtaining a first certificate provided by an embodiment of the present application
  • FIG. 7 is a schematic flowchart of a method for obtaining a second certificate provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for configuring a communication key provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an apparatus for configuring a communication key provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a chip provided by an embodiment of the present application.
  • ordinal numbers such as “first” and “second” are used in the embodiments of the present application to distinguish multiple objects, and are not used to limit the order, sequence, priority or importance of multiple objects.
  • first message, the second message, the third message, etc. are only for distinguishing different message types, and do not mean that the structures and importance levels of the two kinds of messages are different.
  • a public key and a private key are usually used in the signing process, and the public key and the private key are a pair of keys for mutual encryption and decryption.
  • the private key is stored privately, and the public key is open to the public.
  • use the public key to encrypt the plaintext to obtain the ciphertext, and use the private key to decrypt the ciphertext to obtain the plaintext.
  • use the private key to sign the original text, and use the public key and signature to verify whether the original text has been tampered with.
  • the workflow of signature and verification can be as follows (taking the two parties as node A and node B as an example): node A hashes the original text to obtain the first hash value; node A uses its own private key to pair the first hash value. The hash value is encrypted to obtain the signature value, and the original text and the signature value are sent to node B; node B decrypts the signature value with the public key to obtain the second hash value; node B hashes the original text to obtain the third hash value, and compares the second hash value Whether the value is consistent with the third hash value to verify whether the original text has been tampered with.
  • the source of the public key may be the public key in the digital certificate.
  • a digital certificate also called a security certificate
  • CA Certificate Authority
  • Node B can determine that the public key is the public key of Node B through the digital certificate of the public key.
  • FIG. 1 is a schematic diagram of the architecture of a communication system exemplified in the present application.
  • the communication system may include a service cloud platform 101 (also referred to as a cloud server) and a vehicle 102 .
  • the vehicle 102 is a vehicle based on a vehicle electrical/Electronic Architecture (E/E) architecture, see area 103, the vehicle 102 may include at least one of the following components: Mobile Data Center (MDC, MDC) ), human-machine interaction (Human-Machine Interaction, HMI), gateway (gateway, GW), car box (Telematics BOX, Tbox or TCU), electronic control unit (Electronic Control Unit, ECU), etc.
  • MDC Mobile Data Center
  • HMI human-machine Interaction
  • gateway gateway
  • car box Telematics BOX, Tbox or TCU
  • ECU Electronic Control Unit
  • the GW is the core component of the vehicle.
  • the GW can connect the Controller Area Network (CAN), Local Interconnect Network (LIN), multimedia data transmission (Media Oriented System Transport, MOST) and other network data are routed in different networks.
  • MDC Controller Area Network
  • LIN Local Interconnect Network
  • MOST multimedia data transmission
  • MDC is the intelligent in-vehicle computing platform of the vehicle.
  • the T-BOX is mainly used to communicate with the outside of the vehicle, the background system and the mobile phone application (application, APP).
  • HMI is the information input, entertainment and interaction system of the vehicle.
  • the ECU is the controller within the vehicle.
  • the vehicle 102 In order to ensure the security of the data uploaded by the vehicle 102 to the service cloud platform 101, the vehicle 102 needs to obtain a communication key with the service cloud platform 101 through key negotiation, key derivation, etc., and then the vehicle 102 uses the communication key for the uploaded data.
  • the key is encrypted and uploaded to the service cloud platform 101 .
  • key negotiation, key derivation and other methods during the establishment of a data upload connection will require multiple message interactions, and the amount of communication data will be large, which affects the data upload performance.
  • the security of the temporary key obtained through key negotiation is related to the randomness of the random numbers generated by both parties in the negotiation. Once the randomness of the random numbers is reduced, it will lead to the risk of being easily predicted by attackers, which will lead to lower data security. Difference.
  • the present application provides a communication key configuration system, which can directly allocate communication keys to vehicles to reduce the required number of message interactions, and ensure the security of distribution and transmission of communication keys, thereby ensuring data security.
  • FIG. 2 is a schematic structural diagram of a communication key configuration system provided by an embodiment of the present application.
  • the system includes at least two devices in a certificate key management server 201 , a first terminal 202 and a cloud server 203 .
  • the system includes two devices in the certificate key management server 201, the first terminal 202 and the cloud server 203, then the system can interact with another device other than the two devices through a communication interface.
  • FIG. 2 is described by taking the system including three devices as an example. in:
  • the certificate key management server 201 is a device with data processing capability, which may be a physical device such as a host, a server, etc., or a virtual device such as a virtual machine, a container, and the like.
  • the certificate key management server 201 can perform information transmission with the first terminal 202, for example, assign a communication key to the first terminal 202; the certificate key management server 201 can perform information transmission with the cloud server 203, for example, for the first terminal
  • the communication key distributed by 202 is pushed to the cloud server 203 through a secure channel.
  • the certificate key management server 201 is also referred to as a certificate/key management server.
  • the first terminal 202 may be a vehicle, or a device in a vehicle, such as a vehicle-mounted device.
  • the first terminal 202 may be a smart device such as a robot, a drone, or a transportation tool such as a vehicle, or a component or module in a device such as a smart device or a transportation tool.
  • the cloud server 203 is a device with data processing capability, which may be a physical device such as a host, a server, etc., or a virtual device such as a virtual machine, a container, and the like. It should be noted that, for the convenience of description, it is referred to as a server, and in a specific implementation process, it may be a server, or other devices with data processing capabilities, or a module (eg, a chip or an integrated circuit) in the device.
  • the cloud server 203 is a server that collects data such as geographic location information, vehicle trajectory, and vehicle surrounding information collected by the vehicle.
  • the terminal can perform an initialization operation of the communication key, which may also be referred to as a communication key configuration operation.
  • the first terminal 202 may send a communication key request to the certificate key management server 201, and the communication key request may include the first certificate and the second certificate possessed by the first terminal 202.
  • the certificate key management server 201 uses the first certificate to verify that the first terminal 202 has an identity certificate for requesting a communication key by using the second certificate;
  • the communication key is encrypted to obtain the ciphertext of the communication key, which is then transmitted to the first terminal 202, thereby ensuring the security of the communication key.
  • the communication key request may also include a first signature and a request time, etc.
  • the first signature may be used by the certificate key management server 201 in combination with the first certificate to verify that the first terminal 202 has the ability to use the second certificate.
  • the identity credential of the communication key is requested; the request time can be used by the certificate key management server 201 to verify the freshness of the communication key request, so as to avoid being duplicated and repeatedly requesting the communication key.
  • the first terminal 202 may receive the ciphertext of the communication key from the certificate key management server 201 .
  • the certificate key management server 201 may transmit the communication key allocated to the first terminal 202 to the cloud server 203 through a secure channel.
  • the first terminal 202 may include a certificate key management module, the certificate key management module may perform the above-mentioned operation of the communication key request, and receive the encryption key of the communication key from the certificate key management server 201. operations, such as decrypting the ciphertext of the communication key, will not be described in detail here.
  • the terminal can perform operations such as encrypting the data to be transmitted.
  • the first terminal 202 may obtain the ciphertext of the data after encrypting the data to be transmitted by using the communication key obtained by request.
  • the first terminal 202 may further include a data encryption module, and the data encryption module may obtain the ciphertext of the data after encrypting the data to be transmitted by using the communication key obtained by request.
  • the certificate key management module and the data encryption module in the first terminal 202 may be deployed in the same module shown in FIG. 1, such as MDC; or, the first terminal 202 has multiple sets of certificate key management modules and Data encryption module, among the multiple modules shown in Figure 1, such as MDC, Tbox, GW and other on-board equipment, one or more sets of certificate key management modules and data encryption modules can be deployed to manage different certificates and data encryption modules. Communication key.
  • the first terminal 202 uploads the encrypted text of the data to the cloud server 203 .
  • the first terminal 202 may further include a data packaging module and a transmission module.
  • the data packaging module may package the ciphertext of the data into a data packet, and the transmission module sends the data packet to the cloud server 203 .
  • the cloud server can perform operations such as data decryption.
  • the cloud server 203 decrypts the ciphertext of the data using the communication key of the first terminal 202 transmitted by the certificate key management server 201 .
  • the terminal may also perform the initialization operation of the certificate.
  • the first terminal 202 may send a first certificate request and a second certificate request to the certificate key management server 201, respectively, or the first terminal 202 may send a certificate request to the certificate key management server 201 to request the first certificate and the second certificate Second certificate.
  • the certificate key management server 201 may assign the first certificate and the second certificate to the first terminal 202 respectively or simultaneously.
  • the first certificate request may include the device certificate and the first public key of the first terminal 202; the certificate key management server 201 may verify that the first terminal 202 has the identity certificate requesting the first certificate according to the device certificate; the certificate key The key management server 201 can use the first public key to generate a first certificate and send it to the first terminal 202 .
  • the second certificate request may include the first certificate and the second public key of the first terminal 202; the certificate key management server 201 may, according to the first certificate, verify that the first terminal 202 has the ability to request a communication key by using the second certificate The certificate key management server 201 can use the second public key to generate a second certificate and send it to the first terminal 202 .
  • the certificate request may include the device certificate, the first public key and the second public key of the first terminal 202; the certificate key management server 201 may, according to the device certificate, verify that the first terminal 202 has the certificate requesting the first certificate. identity certificate; the certificate key management server 201 can use the first public key to generate the first certificate and use the second public key to generate the second certificate; the certificate key management server 201 can send the first certificate and the second certificate together to the first certificate A terminal 202 .
  • the related operations of certificate initialization and communication key initialization can be performed together; in some scenarios such as data upload services, the related operations of communication key initialization can be performed. That is, the relevant certificate of the terminal has been completed through the previous certificate initialization stage.
  • first certificate request for the above-mentioned first certificate request, second certificate request, or certificate request, operations such as receiving the first certificate and second certificate from the certificate key management server 201 can be performed by the above-mentioned first terminal 202.
  • the certificate key management module executes.
  • the certificate key management server 201 may be deployed with at least one of a certificate management module and a key management module.
  • the certificate key management server 201 can perform operations related to certificate initialization through the certificate management module, such as allocating the first certificate and the second certificate to the first terminal 202; the certificate key management server 201 can execute the communication key through the key management module Initialization-related operations, such as assigning a communication key to the first terminal 202 .
  • the cloud server 203 may include at least one of a certificate key management module, a data decryption module, a data unpacking module, and a transmission module.
  • the certificate key management module can actively obtain the communication key of the first terminal 202 from the certificate key management server, and can also receive the communication key of the first terminal 202 pushed by the certificate key management server; the transmission module can receive the communication key from the first terminal 202.
  • a data message of the terminal 202, and the data unpacking module obtains the ciphertext of the data from the data message, and then the decryption module decrypts the ciphertext of the data according to the communication key of the first terminal 202, and obtains the data. .
  • the certificate key management server 201 can directly assign a communication key to the first terminal 202 to avoid the problem that the key obtained through key negotiation cannot guarantee the key strength; and the certificate key management The server 201 can use the first certificate to verify that the first terminal 202 has the identity certificate to request the communication key using the second certificate, so as to ensure that the communication key is distributed to the terminal with the identity certificate; and the certificate key management server can also use the second certificate
  • the communication key assigned to the first terminal 202 is encrypted to ensure the security of the communication key transmission.
  • the certificate key management server 201 allocates the communication key to the first terminal 202, which is also beneficial to meet the needs of supervision and auditing compared with the way in which the first terminal 202 directly negotiates the key with the cloud server 203.
  • the following describes the communication key configuration method provided by the present application from the perspective of interaction among the certificate key management server, the first terminal, and the cloud server.
  • FIG. 3 is a schematic flowchart of a method for configuring a communication key provided by an embodiment of the present application.
  • the communication key configuration method shown in FIG. 3 may be implemented based on the structure shown in FIG. 2 .
  • the communication key configuration method may include but not limited to the following steps:
  • the first terminal sends a first message to a certificate key management server.
  • the certificate key management server receives the first message.
  • the certificate key management server may be a server, a server cluster composed of multiple servers, or a distributed server.
  • the first message contains the first certificate and the second certificate.
  • the first certificate is used to verify that the first terminal has an identity credential for requesting a communication key by using the second certificate; the second certificate is used to encrypt the communication key allocated to the first terminal.
  • the first message may also contain multiple messages.
  • the first message includes message A and message B, wherein message A includes the first certificate and message B includes the second certificate.
  • the first message may be a communication key request message, or may be other types of messages.
  • the first message may carry an identifier to inform the certificate key management server that the first terminal requests a communication key.
  • the certificate key management server verifies, according to the first certificate, that the first terminal has an identity certificate for requesting a communication key by using the second certificate;
  • the first certificate may be different from the device certificate, and the first certificate may be specially used to verify the identity certificate of the first terminal, so as to avoid that the device certificate is not easy to update and revoke, and the first terminal directly uses the device certificate to request the key.
  • the certificate is used too many times and the private key corresponding to the device certificate is easily leaked, which in turn leads to the leakage of the communication key.
  • the first certificate can also be updated more frequently than the device certificate. Even if the private key corresponding to the first certificate is leaked, a new first certificate can be applied for again, and the leaked registration certificate can be revoked, so that the subsequent identity certificate can be revoked.
  • the authentication is not affected, improving security.
  • the certificate key management server may also use the root certificate of the first certificate to verify the first certificate, so as to ensure that the first certificate is issued by itself and is credible.
  • the certificate key management server may use the second certificate to encrypt the communication key allocated to the first terminal to obtain the ciphertext of the communication key.
  • the second certificate may be a certificate dedicated to communication key distribution.
  • Using the second certificate to ensure the confidentiality of the communication key transmission can further increase the update frequency of the second certificate compared to using the device certificate or the first certificate to encrypt the communication key, even if the second certificate corresponding to the second certificate After the key is leaked, it is also possible to apply for a new second certificate, and at the same time revoke the leaked second certificate, so that the transmission of the subsequent communication key is not affected and the security is improved.
  • the certificate key management server sends a second message to the first terminal.
  • the second message contains the ciphertext of the communication key assigned to the first terminal.
  • the certificate key management server transmits the communication key allocated to the first terminal to the cloud server through the secure channel.
  • sequence of execution between steps S305 and S306 is not limited in this application.
  • the first terminal can receive the second message, and the cloud server can obtain the communication key of the first terminal.
  • the certificate key management server actively pushes the communication key allocated to the first terminal to the cloud server through a secure channel; optionally, the cloud server may also actively obtain the communication key of the first terminal from the certificate key management server.
  • the key is not limited in this embodiment of the present application.
  • the certificate key management server after receiving the first message from the first terminal, can directly assign a communication key to the first terminal to avoid that the key obtained through key negotiation cannot guarantee the key and the certificate key management server can use the first certificate to verify that the first terminal has the identity certificate to request the communication key with the second certificate, so as to ensure that the communication key is distributed to the vehicle with the identity certificate; and certificate key management The server may also encrypt the communication key allocated to the vehicle by using the second certificate, so as to ensure the security of the communication key transmission.
  • the certificate key management server allocates the communication key to the vehicle, which is also beneficial to meet the needs of supervision and auditing compared with the way in which the vehicle directly negotiates the key with the cloud server.
  • FIG. 4 is a schematic flowchart of another communication key configuration method provided by an embodiment of the present application.
  • the communication key configuration method shown in FIG. 3 also includes a first signature in the first message.
  • the first terminal may generate the first signature according to the first certificate, the second certificate and the first private key corresponding to the first certificate.
  • the first terminal uses the first private key corresponding to the first certificate to sign the content (eg, the first certificate and the second certificate) in the first message to obtain the first signature.
  • the algorithm used for the signature may be known based on the first certificate.
  • the certificate key management server before the certificate key management server sends the second message, for example, as shown in FIG. 4 , after receiving the first message, the certificate key management server uses the first message and the first public key in the first certificate , verifies the first signature; the certificate key management server determines that the first terminal has a first private key corresponding to the first message and the first certificate when the first signature verification is passed, and the first message and the first private key Used to indicate that the first terminal has an identity credential for requesting a communication key using the second certificate. It can be seen that this embodiment enables the certificate key management server to know that the first terminal is legal and has a corresponding identity certificate, thereby helping to ensure the security of communication key distribution.
  • the second message may further include a second signature.
  • the certificate key management server generates the second signature according to the ciphertext of the communication key and the private key corresponding to its own certificate.
  • the first terminal verifies the second signature by using the ciphertext of the communication key and the public key in the certificate of the certificate key management server;
  • the second signature verification is passed, it is determined that the second message comes from the certificate key management server.
  • the certificate key management server generates the second signature according to the ciphertext of the communication key and the private key corresponding to its own certificate, which may include: the certificate key management server uses the private key corresponding to its own certificate to calculate the ciphertext of the communication key The hash value of , and then get the second signature.
  • the first message may also include the request time of the communication key, that is, the sending time of the first message, so as to ensure the freshness of the first message and avoid multiple requests for the communication key after the first message is copied by other third parties. key.
  • the second message may also include the response time, that is, the sending time of the second message, so as to ensure the freshness of the second message, and avoid the second message being copied by other third parties and used multiple times, resulting in encrypted data. Security is not enough.
  • FIG. 5 is a schematic flowchart of another communication key configuration method provided by an embodiment of the present application.
  • the difference between the communication key configuration method shown in FIG. 5 and the communication key configuration method shown in FIG. 3 and FIG. 4 is that before the relevant operations of the communication key configuration method shown in FIG. 3 and FIG.
  • the certificate key management server may distribute the first certificate and the second certificate to the first terminal, that is, the first certificate and the second certificate distribution stage. The following describes the process of acquiring the first certificate and the process of acquiring the second certificate with reference to FIG. 6 and FIG. 7 .
  • the first certificate acquisition process may include but not limited to the following related operations:
  • the first terminal sends a fifth message to the certificate key management server.
  • the certificate key management server receives the fifth message from the first terminal.
  • the fifth message includes the device certificate and the first public key, wherein the first terminal needs to preset the device certificate.
  • the first public key may be a public-private key pair generated by the first terminal using an asymmetric cryptographic algorithm, and the public-private key pair includes a first public key and a first private key.
  • the first public key is used to generate the first certificate by the certificate password management server, and the first private key is used to sign the second public key in the first message, the third message or the third message to inform the certificate
  • the key management server The first terminal has an identity credential for requesting a communication key using the second certificate.
  • the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate for requesting the first certificate.
  • the certificate key management server needs to preset the root certificate of the device certificate to verify the device certificate of the first terminal, and then determine whether the first terminal has the identity certificate for requesting the first certificate.
  • the fifth message further includes a fourth signature
  • the method further includes: according to the first public key and the device certificate corresponding to the first terminal.
  • the third private key is used to generate a fourth signature
  • the fourth signature is used by the certificate key management server to verify in combination with the device certificate that the first terminal has the identity certificate requesting the first certificate.
  • the first terminal signs the first public key or the fifth message according to the third private key corresponding to the available device certificate, and obtains the fourth signature.
  • the algorithm used for the signature can be specified by the device certificate.
  • the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate for requesting the first certificate, and further includes: the certificate key management server, according to the first public key and the third public key in the device certificate, verifying Fourth signature; when the verification of the fourth signature is passed, the certificate key management server determines that the first terminal has the first public key and the third private key corresponding to the device certificate, and the first public key and the third private key are used to indicate the first public key and the third private key.
  • a terminal has an identity credential to request the first certificate. That is to say, the certificate key management server not only uses the root certificate of the device certificate to verify the device certificate, but also uses the third public key in the device certificate and the first public key in the fifth message when the device certificate is verified to pass.
  • the fourth signature through the verification result that the integrity of the first public key has not been tampered with, it is guaranteed that the vehicle to which the first certificate is assigned is the vehicle with the corresponding identity certificate.
  • the certificate key management server generates a first certificate based on the first public key.
  • the certificate key management server sends a sixth message to the first terminal, where the sixth message includes the first certificate.
  • the first terminal receives the sixth message.
  • the sixth message is sent after the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate for requesting the first certificate.
  • the certificate key management server can only assign a first certificate, corresponding to the lidar data upload service. If the two services have been activated for other vehicles, the certificate key management server can allocate two registration certificates for them, corresponding to the two services respectively.
  • the first terminal executes the above-mentioned communication key configuration method, the first terminal can carry the corresponding first certificate for different services.
  • the fifth message may also include the request time of the first certificate, that is, the sending time of the fifth message, so as to ensure the freshness of the fifth message and avoid multiple requests for the first certificate after the fifth message is copied by other third parties. Certificate.
  • the sixth message may also include the response time, that is, the sending time of the sixth message, so that the freshness of the sixth message can also be guaranteed, and the sixth message can be prevented from being used repeatedly after being copied by other third parties, resulting in the first certificate. security is not enough.
  • the fourth signature may also be generated in combination with the request time of the first certificate, which is not limited in this application.
  • the first certificate acquisition process shown in FIG. 6 can ensure that the certificate key management server allocates the first certificate to the vehicle with the corresponding identity certificate.
  • the second certificate acquisition process may include but not limited to the following related operations:
  • the first terminal sends a third message to the certificate key management server.
  • the certificate key management server receives the third message from the first terminal.
  • the third message includes the first certificate and the second public key, wherein the first terminal has the first certificate.
  • the certificate key management server uses the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate.
  • the third message further includes a third signature
  • the method further includes: the first terminal corresponds to the first certificate according to the second public key.
  • the first private key is used to generate a third signature;
  • the third signature is used by the certificate key management server to verify in combination with the first certificate that the first terminal has the identity certificate for requesting the communication key by using the second certificate.
  • the first terminal signs the second public key or the third message according to the first private key corresponding to the available first certificate, and obtains the third signature.
  • the algorithm used for the signature may be specified by the first certificate.
  • the certificate key management server uses the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate, and further includes: the certificate key management server uses the second public key and the first certificate in the first certificate a public key to verify the third signature; the certificate key management server determines that the first terminal has a third private key corresponding to the first public key and the device certificate when the third signature is verified, and the first public key and the third The private key is used to indicate that the first terminal has an identity credential for requesting a communication key using the second certificate. That is to say, the certificate key management server not only uses the device certificate to verify the first certificate, but also uses the first public key in the first certificate and the second public key in the third message when the verification of the first certificate passes.
  • the third signature in this way, through the verification result that the integrity of the second public key has not been tampered with, it is guaranteed that the vehicle to which the second certificate is assigned is the vehicle with the corresponding identity certificate.
  • the certificate key management server generates a second certificate based on the second public key.
  • the certificate key management server sends a fourth message to the first terminal, where the fourth message includes the second certificate.
  • the first terminal receives the fourth message.
  • the fourth message is sent after the certificate key management server uses the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate.
  • the data to be uploaded may have different classifications and corresponding different security requirements.
  • the data of lidar may include geographic information coordinates, raw laser point cloud data, structured data, etc.
  • the security requirements of these data may be different.
  • the key needs to be updated every day, while the security requirements for the original data of the laser point cloud are relatively low, and the communication key used for encryption can be updated once a month. Therefore, in this scenario, the certificate key management server may allocate multiple second certificates to the vehicle-end device, such as the first terminal, to request different types of communication keys for encryption of different types of data. That is, for each type of communication key, a different second certificate can be used for protection.
  • the third message may also include the request time of the second certificate, that is, the sending time of the third message, so as to ensure the freshness of the third message and avoid multiple requests for the second certificate after the third message is copied by other third parties. Certificate.
  • the fourth message may also include the response time, that is, the sending time of the fourth message, so that the freshness of the fourth message can also be guaranteed, and the sixth message can be prevented from being used repeatedly after being copied by other third parties, resulting in the second certificate. security is not enough.
  • the third signature may also be generated in combination with the request time of the second certificate, which is not limited in this application.
  • the second certificate acquisition process shown in FIG. 7 can ensure that the certificate key management server allocates the second certificate to the vehicle with the corresponding identity certificate.
  • the data encryption method may adopt the communication key configuration method shown in Figures 3 and 4 above, and the obtained communication key encrypts the data collected by the first terminal, obtains the ciphertext of the data, and uploads it to the cloud server.
  • the following is a brief description of the data encryption process.
  • the data encryption process may include but is not limited to the following steps:
  • the first terminal determines the data to be encrypted.
  • the data to be encrypted may be called plaintext. If there is unencrypted content in the plaintext, set the unencrypted content as the identifiable data of the cryptographic algorithm (that is, as one of the input parameters of the cryptographic algorithm), set the content to be encrypted as the plaintext input of the cryptographic algorithm, and generate the initial vector (initialization vector, IV).
  • the length of the parameter IV required for data encryption and decryption is 128 bits, and its generation method is not limited in the embodiments of the present application.
  • the parameter IV can include but not be limited to the following two ways:
  • the parameter IV consists of a 48-bit time and an 80-bit random number.
  • the 48-bit time is the binary representation of the 14-bit decimal number composed of "year, month, day, hour, minute, and second"; the 80-bit random number is generated by a random number generation algorithm.
  • the parameter IV is a random number (128bit), which is obtained as the input of the encryption algorithm after the encryption time and the plaintext are concatenated.
  • the first terminal encrypts the plaintext by using a cryptographic algorithm and the above-distributed communication key to generate a ciphertext.
  • the first terminal determines that the generated ciphertext, the parameter IV, the identifier of the communication key, and the identifier of the first terminal are taken together as the data ciphertext.
  • the steps S801 to S803 may be performed by an encryption module in the first terminal.
  • the identification of the communication key may be generated by the certificate key management server when the communication key is allocated to the first terminal, and then carried in the second message and sent to the first terminal.
  • the first terminal may carry the identifier in the data ciphertext to inform the cloud server, and use the corresponding communication key to decrypt the data ciphertext.
  • the identifier of the first terminal may be information that can identify the vehicle-end device, such as a vehicle identification number (Vehicle Identification Number, VIN), a device certificate serial number, and the like.
  • VIN Vehicle Identification Number
  • VIN Vehicle Identification Number
  • VIN device certificate serial number
  • the first terminal can upload the data ciphertext to the cloud server, and the transmission process of the data ciphertext can be based on a secure transmission protocol, such as HyperText Transfer Protocol over Secure Socket. Layer, HTTPS).
  • a secure transmission protocol such as HyperText Transfer Protocol over Secure Socket. Layer, HTTPS.
  • the data encryption method can directly use the communication key distributed by the certificate key management server to encrypt the data. Compared with the method in which the first terminal also needs the cloud server to negotiate the communication key or derive the communication key, the data is greatly reduced.
  • the amount of interactive messages required in the upload process avoids the impact of excessive amount of interactive messages on data uploading.
  • an embodiment of the present application provides a data decryption method.
  • the data decryption method can adopt the communication key configuration method shown in the above-mentioned FIG. 3 and FIG. 4 , the cloud server can use the communication key transmitted to the cloud server by the certificate key management server through a secure channel to perform related operations.
  • the data decryption process is briefly described below.
  • the data decryption process may include but is not limited to the following steps:
  • the cloud server receives the data ciphertext.
  • the data ciphertext includes the ciphertext generated in S802, the parameter IV, the identifier of the communication key, and the identifier of the first terminal as described above.
  • the cloud server determines the corresponding communication key according to the identification of the communication key and the identification of the first terminal.
  • the cloud server uses the communication key and the parameter IV to decrypt using a cryptographic algorithm to obtain plaintext;
  • the cloud server may also judge the freshness of the data ciphertext according to the time bit in the parameter IV. For example, when the difference between the time in parameter IV and the current time is too large, the data ciphertext is considered invalid, thereby preventing the cloud server from obtaining erroneous plaintext.
  • the cloud server may output the obtained plaintext.
  • the related operations of steps S901 to S903 may be performed by a decryption module in the cloud server.
  • the cloud server can directly use the communication key allocated by the certificate key management server to the first terminal to decrypt the data ciphertext, and the cloud server also needs to negotiate the communication key with the first terminal or derive the communication key.
  • the amount of interactive messages required in the data upload process is greatly reduced, and the impact of excessive amount of interactive messages on data upload is avoided.
  • data compression may be performed before the data is encrypted; correspondingly, in the data decryption method, the plaintext obtained after the data ciphertext is decrypted may be decompressed. It can be seen that this embodiment can handle some uploading services of large data volume, such as the uploading service of camera avatar video and the like.
  • the related methods provided by the embodiments of the present application are respectively introduced from the perspectives of the certificate key management server, the first terminal, and the cloud server.
  • the certificate key management server, the first terminal, and the cloud server may include hardware structures and software modules, which may be implemented in the form of hardware structures, software modules, or hardware structures plus software modules. realize the above functions.
  • the communication apparatus related to the embodiments of the present application will be described in detail below with reference to FIG. 8 to FIG. 10 .
  • FIG. 8 shows a schematic block diagram of a communication key configuration apparatus.
  • the communication key configuration apparatus 800 may perform the relevant operations of the certificate key management server in the above method embodiments.
  • the communication key configuration apparatus 800 may be the one shown in FIG. 2 . It can also be a device in the certificate key management server, such as a chip or an integrated circuit. Wherein, the communication key configuration device may include but is not limited to:
  • a communication unit 801 configured to receive a first message from a first terminal, where the first message includes a first certificate and a second certificate;
  • a processing unit 802 configured to use the first certificate to verify that the first terminal has an identity credential for requesting a communication key by using the second certificate;
  • the processing unit 802 is further configured to use the second certificate to encrypt the communication key allocated to the first terminal to obtain the ciphertext of the communication key;
  • the communication unit 801 is further configured to send a second message to the first terminal, where the second message includes the ciphertext of the communication key.
  • the communication key configuration device can not only directly assign a communication key to the first terminal to reduce the number of message interactions required for negotiating the key, but also can use the first certificate to verify the identity certificate possessed by the first terminal, and use the first certificate to verify the identity certificate of the first terminal.
  • the second certificate encrypts the communication key, thereby greatly ensuring the security of the distribution and transmission of the communication key.
  • the first message further includes the first signature.
  • the processing unit 802 verifies, according to the first certificate, that the first terminal has an identity certificate for requesting a communication key by using the second certificate, specifically: verifying the first signature according to the first public key in the first certificate; When the signature verification is passed, it is determined that the first terminal has a first private key corresponding to the first message and the first certificate, and the first message and the first private key are used to indicate that the first terminal has the identity of requesting a communication key by using the second certificate certificate. It can be seen that this embodiment ensures that the communication key configuration apparatus allocates a communication key to the first terminal having the corresponding identity credential.
  • the second message further includes a second signature.
  • the processing unit 802 is further configured to, before the communication unit 801 sends the second message to the first terminal, use the private key corresponding to the self-certificate and the ciphertext of the communication key to generate a second signature; the second signature is used to indicate the second The message is from the certificate key management server.
  • the communication unit 801 is further configured to send the first certificate and the second certificate to the first terminal.
  • the communication unit 801 may send the first certificate and the second certificate respectively at different times, such as through multiple messages; or the communication unit 801 may send the first certificate and the second certificate at the same time, such as through a message. send.
  • the communication unit 801 is further configured to receive a third message from the first terminal, where the third message includes the first certificate and the second public key;
  • the processing unit 802 is further configured to use the first certificate to verify that the first terminal has an identity certificate for requesting a communication key by using the second certificate;
  • the processing unit 802 is further configured to generate a second certificate by using the second public key
  • the communication unit 801 is configured to send a fourth message to the first terminal, where the fourth message includes the second certificate.
  • the operations related to the generation of the second certificate and the operations related to the generation of the second signature may be performed by different software modules.
  • the number of processing units included in the communication key configuration apparatus 800 is not limited.
  • the processing unit 802 uses the first certificate to verify that the first terminal has the identity credential for requesting the communication key by using the second certificate, which may be performed before the communication unit 801 sends the fourth message to the first terminal.
  • the third message further includes a third signature.
  • the processing unit 802 uses the first certificate to verify that the first terminal has the identity certificate for requesting the communication key by using the second certificate, including:
  • a processing unit 802 configured to verify the third signature according to the second public key and the first public key in the first certificate
  • the processing unit 802 is further configured to, when the third signature verification passes, determine that the first terminal has the second public key and the first private key corresponding to the first certificate; the second public key and the first private key are used for to indicate that the first terminal has an identity credential for requesting a communication key using the second credential.
  • the communication unit 801 is further configured to receive a fifth message from the first terminal; the fifth message includes a device certificate and a first public key;
  • the processing unit 802 is further configured to use the device certificate to verify that the first terminal has the identity certificate for requesting the first certificate;
  • the processing unit 802 is further configured to generate a first certificate based on the first public key
  • the communication unit 801 is further configured to send a sixth message to the first terminal, where the sixth message includes the first certificate.
  • the operations related to the generation of the first certificate and the operations related to the generation of the second signature may be performed by different software modules.
  • the number of processing units included in the communication key configuration apparatus 800 is not limited.
  • the operations related to the generation of the first certificate, the operations related to the generation of the second certificate, and the operations related to the generation of the second signature can be performed by different software modules, such as by three processing units respectively. Executed, that is, the number of processing units included in the communication key configuration apparatus 800 is not limited in this embodiment of the present application.
  • the fifth message further includes a fourth signature.
  • the processing unit 802 uses the device certificate to verify that the first terminal has the identity certificate requesting the first certificate, specifically: verifying the fourth signature according to the first public key and the third public key in the device certificate; When the fourth signature verification is passed, it is determined that the first terminal has the first public key and the third private key corresponding to the device certificate, and the first public key and the third private key are used to indicate that the first terminal has the identity of requesting the first certificate certificate.
  • the communication unit 801 is further configured to transmit the communication key allocated to the first terminal to the cloud server through a secure channel. Therefore, it is beneficial for the cloud server to decrypt the ciphertext of the data uploaded by the first terminal to obtain the data.
  • the communication key configuration apparatus 800 may perform the relevant operations of the first terminal in the foregoing method embodiments, and the communication key configuration apparatus 800 shown in FIG. 8 may be the system shown in FIG. 1 or FIG. 2 .
  • the communication key configuration device 800 In the communication key configuration device 800:
  • a communication unit 801 configured to send a first message to a certificate key management server; the first message includes a first certificate and a second certificate;
  • the communication unit 801 is further configured to receive a second message; the second message is sent after the certificate key management server uses the first certificate to verify that the first terminal has an identity credential that uses the second certificate to request a communication key; the second message the ciphertext containing the communication key of the first terminal;
  • the processing unit 802 uses the second private key corresponding to the second certificate to decrypt the ciphertext of the communication key to obtain the communication key.
  • the communication key configuration apparatus 800 can directly obtain the communication key from the certificate key management server to reduce the number of message interactions required to negotiate the key, and can also send the first certificate and the second certificate to the certificate key management server , so that the certificate key management server can use the first certificate to verify the identity certificate possessed by the first terminal, and use the second certificate to encrypt the communication key, thereby greatly ensuring the security of the distribution and transmission of the communication key .
  • the first message further includes the first signature.
  • the processing unit 802 is further configured to generate a first signature by using the first private key, the first certificate and the second certificate corresponding to the first certificate;
  • the certificate key management server verifies that the first terminal has an identity certificate for requesting a communication key by using the second certificate in combination with the first certificate.
  • the second message further includes a second signature.
  • the processing unit 802 is further configured to use the public key in the certificate of the certificate key management server to verify the second signature; and when the verification of the second signature is passed, determine that the second message comes from. Certificate Key Management Server. It can be seen that this embodiment enables the communication key configuration apparatus 800 to know the validity of the source of the communication key.
  • the communication unit 801 is further configured to request the first certificate and the second certificate from the certificate key management server.
  • the communication unit 801 requests the certificate key management server for the second certificate, specifically: sending a third message to the certificate key management server, where the third message includes the first certificate and the second public key ; Receive a fourth message; the fourth message is sent by the certificate key management server after verifying that the first terminal has the identity credential for requesting the communication key by using the second certificate; the fourth message includes The certificate key management server generates the second certificate based on the second public key.
  • the third message further includes a third signature.
  • the processing unit 802 generates a third signature according to the second public key and the first private key corresponding to the first certificate before the communication unit 801 sends the third message to the certificate key management server; the third signature is used for the certificate.
  • the key management server verifies, in combination with the first certificate, that the first terminal has an identity credential for requesting the communication key using the second certificate. Therefore, the certificate key management server is made to know, according to the third signature, that the communication key configuration apparatus 800 has an identity certificate for requesting a communication key by using the second certificate, so as to allocate the second certificate to the communication key configuration apparatus 800 in time.
  • the communication unit 801 requests the first certificate from the certificate key management server, specifically:
  • the certificate key management server sending a fifth message to the certificate key management server;
  • the fifth message includes the device certificate and the first public key;
  • the sixth message is received; the sixth message is sent after the certificate key management server uses the device certificate to verify that the first terminal has the identity certificate requesting the first certificate; the sixth message includes the information generated by the certificate key management server based on the first public key. first certificate.
  • the fifth message further includes a fourth signature.
  • the processing unit 802 Before the communication unit 801 sends the fifth message to the certificate key management server, the processing unit 802 generates a fourth signature according to the first public key and the third private key corresponding to the device certificate; the fourth signature is used for certificate key management
  • the server verifies that the first terminal has the identity credential for requesting the first certificate in combination with the device certificate. Therefore, the certificate key management server is made to know that the communication key configuration apparatus 800 has the identity certificate for requesting the first certificate according to the fourth signature, so as to allocate the first certificate to the communication key configuration apparatus 800 in time.
  • the processing unit 802 can use the communication key to treat the communication key.
  • the transmission data is encrypted to obtain the ciphertext of the data to be transmitted, that is, the ciphertext of the uploaded data; and then, the communication unit 801 uploads the ciphertext of the data to be transmitted to the cloud server.
  • the communication key configuration apparatus 800 may perform the relevant operations of the cloud server in the above method embodiments, and the communication key configuration apparatus 800 shown in FIG. 8 may be in the system shown in FIG. 1 or FIG. 2 .
  • cloud server or a device in the cloud server, such as a chip or an integrated circuit.
  • a communication unit 801 which can be used to obtain or receive a communication key distributed to the first terminal by a certificate key management server; The ciphertext of the data is decrypted to obtain the data.
  • FIG. 9 shows a schematic block diagram of a communication key configuration apparatus 900 .
  • the communication key configuration apparatus 900 corresponds to the certificate key management server in the above communication key configuration method.
  • the communication key configuration apparatus 900 is an apparatus in a certificate key management server that executes the foregoing method embodiments, such as a chip, a chip system, or a processor.
  • the communication key configuration apparatus 900 can be used to implement the methods described in the foregoing method embodiments, and for details, refer to the descriptions in the foregoing method embodiments.
  • the communication key configuration apparatus 900 corresponds to the first terminal in the above communication key configuration method.
  • the communication key configuration apparatus 900 is an apparatus in the first terminal that executes the above method embodiments, such as a chip, a chip system, or a processor, or an MDC, Tbox, GW, etc. as shown in FIG. 1 .
  • Car Equipment such as a chip, a chip system, or a processor, or an MDC, Tbox, GW, etc.
  • the communication key configuration apparatus 900 can be used to implement the methods described in the foregoing method embodiments, and for details, refer to the descriptions in the foregoing method embodiments.
  • the communication key configuration apparatus 900 may include one or more processors 901 .
  • the processor 901 may be a general-purpose processor or a special-purpose processor, or the like.
  • the communication key configuration apparatus 900 may also include a transceiver 905 .
  • the transceiver 905 may be referred to as a transceiver unit, a transceiver, or a transceiver circuit, etc., and is used to implement a transceiver function.
  • the transceiver 905 may include a receiver and a transmitter, the receiver may be called a receiver or a receiving circuit, etc., for implementing a receiving function; the transmitter may be called a transmitter or a transmitting circuit, etc., for implementing a transmitting function.
  • the communication key configuration apparatus 900 may include one or more memories 902 on which instructions 904 may be stored.
  • the instructions 904 may be computer programs, and the computer programs may be executed on the communication key configuration apparatus 900.
  • Running, the communication key configuration apparatus 900 executes the methods described in the above method embodiments.
  • the memory 902 may also store data.
  • the communication key configuration device 900 and the memory 902 can be set separately or integrated together.
  • the communication key configuration apparatus 900 is used to implement the function of the certificate key management server in the above method embodiment:
  • the processor 901 is configured to execute steps S303 and S304 shown in any of FIG. 3 to FIG. 5 ; or execute steps S603 and S604 in FIG. 6 ; or execute steps S703 and S704 in FIG. 7 .
  • the transceiver 905 is configured to perform steps S302, S305, and S306 shown in any of FIG. 3 to FIG. 5; or perform steps S602, S605 in FIG. 6; or perform steps S702, S705 in FIG.
  • the communication key configuration apparatus 900 is used to implement the function of the first terminal in the above method embodiment:
  • the transceiver 905 is configured to perform step S301 in the communication key configuration method shown in any of FIG. 3 to FIG. 5 and the operations of receiving the second message; or be configured to perform step S601 in FIG. 6 and receive the sixth message , or perform step S701 in FIG. 7 and receive the fourth message.
  • the communication key configuration apparatus 900 is used to implement the function of the cloud server in the above method embodiment:
  • the transceiver 905 is configured to perform the operation of obtaining the communication key in the communication key configuration method shown in any of FIG. 3 to FIG. 5; or the operation of receiving the ciphertext of the data in the data encryption method;
  • the processor 901 is configured to perform operations related to data decryption in the data decryption method.
  • the processor 901 may include a transceiver for implementing receiving and transmitting functions.
  • the transceiver may be a transceiver circuit, or an interface, or an interface circuit.
  • Transceiver circuits, interfaces or interface circuits used to implement receiving and transmitting functions may be separate or integrated.
  • the above-mentioned transceiver circuit, interface or interface circuit can be used for reading and writing code/data, or the above-mentioned transceiver circuit, interface or interface circuit can be used for signal transmission or transmission.
  • the processor 901 may store an instruction 703, which may be a computer program, and the computer program 903 runs on the processor 901 to enable the communication key configuration apparatus 900 to execute the method described in the above method embodiments .
  • the computer program 903 may be embodied in the processor 901, in which case the processor 901 may be implemented by hardware.
  • the communication key configuration apparatus 900 may include a circuit, and the circuit may implement the functions of sending or receiving or communicating in the foregoing method embodiments.
  • the processors and transceivers described in this application can be implemented in integrated circuits (ICs), analog ICs, radio frequency integrated circuits (RFICs), mixed-signal ICs, application specific integrated circuits (application specific integrated circuits, ASIC), printed circuit board (PCB), electronic equipment, etc.
  • the processor and transceiver can also be fabricated using various IC process technologies, such as complementary metal oxide semiconductor (CMOS), nMetal-oxide-semiconductor (NMOS), P-type Metal oxide semiconductor (positive channel metal oxide semiconductor, PMOS), bipolar junction transistor (BJT), bipolar CMOS (BiCMOS), silicon germanium (SiGe), gallium arsenide (GaAs), etc.
  • CMOS complementary metal oxide semiconductor
  • NMOS nMetal-oxide-semiconductor
  • PMOS P-type Metal oxide semiconductor
  • BJT bipolar junction transistor
  • BiCMOS bipolar CMOS
  • SiGe silicon germanium
  • GaAs gallium arsenide
  • the communication key configuration apparatus 900 described in the above embodiments may be a certificate key management server or a component thereof; or the communication key configuration apparatus 900 described in the above embodiments may be a first terminal, such as a vehicle, or a first terminal , such as in-vehicle equipment, etc.; or the communication key configuration apparatus 900 described in the above embodiments may be a cloud server or a component in a cloud server, or the like.
  • the communication key configuration apparatus 900 may be a stand-alone device or may be part of a larger device.
  • the communication key configuration apparatus 900 may be:
  • the communication key configuration apparatus 900 may be a chip or a chip system
  • the chip shown in FIG. 10 includes a processor 1001 and an interface 1002 .
  • the number of processors 1001 may be one or more, and the number of interfaces 1002 may be multiple.
  • the processor 1001 is configured to perform steps S303 and S304 shown in any of FIG. 3 to FIG. 5 ; or perform steps S603 and S604 in FIG. 6 ; or perform steps S703 and S704 in FIG. 7 .
  • the interface 1002 is configured to perform steps S302, S305, and S306 shown in any of FIG. 3 to FIG. 5; or perform steps S602, S605 in FIG. 6; or perform steps S702, S705 in FIG.
  • the interface 1002 is used to perform step S301 in the communication key configuration method shown in any of Figures 3 to 5 and the operation of receiving the second message; or to perform step S601 in Figure 6 and receive the sixth message, Or perform step S701 in FIG. 7 and receive the fourth message.
  • the interface 1002 is used to perform the operation of obtaining the communication key in the communication key configuration method shown in any one of FIG. 3 to FIG. 5; or the operation of receiving the ciphertext of the data in the data encryption method;
  • the processor 1001 is configured to perform operations related to data decryption in the data decryption method.
  • the chip may also execute the relevant implementation manners in the foregoing method embodiments, which will not be described in detail here.
  • the present application further provides a communication key configuration system, and the communication key configuration system may include at least two devices among the three communication key configuration devices described in the above three embodiments respectively.
  • the communication key configuration system includes a communication key configuration device, the communication key configuration device can perform the relevant operations of the certificate key management server in the above method embodiment; another communication key configuration device, the The communication key configuration apparatus may perform the relevant operations of the first terminal in the foregoing method embodiments.
  • the communication key configuration system includes a communication key configuration device, the communication key configuration device can perform the relevant operations of the certificate key management server in the above method embodiment; another communication key configuration device, The communication key configuration apparatus can perform the relevant operations of the first terminal in the above method embodiments; and another communication key configuration apparatus, the communication key configuration apparatus can perform the relevant operations of the cloud server in the above method embodiments.
  • the present application also provides a communication key configuration system, which may include at least two devices among a certificate key management server, a first terminal, and a cloud server.
  • the communication key configuration system includes the certificate key management server described in the above method embodiments; and the first terminal in the above method embodiments.
  • the communication key configuration system includes the certificate key management server in the above method embodiment, the first terminal in the above method embodiment, and the cloud server in the above method embodiment.
  • the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer-readable storage medium is executed by a computer, implements the functions of any of the foregoing method embodiments.
  • the present application also provides a computer program product, which implements the functions of any of the above method embodiments when the computer program product is executed by a computer.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer programs. When the computer program is loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer program may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program may be downloaded from a website site, computer, server, or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line, DSL) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, high-density digital video discs (DVDs)), or semiconductor media (eg, solid state disks, SSD)) etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请提供了一种通信密钥配置方法及装置,其中,证书密钥管理服务器可接收来自第一终端的第一消息,该第一消息包含第一证书和第二证书。证书密钥管理服务器可基于该第一证书验证第一终端具有利用第二证书请求该通信密钥的身份凭证,进而,证书密钥管理服务器可利用第二证书中的第一公钥对分配给该第一终端的通信密钥进行加密,获得该通信密钥的密文,从而将包含该通信密钥的密文的第二消息发送给该第一终端。可见,该方法不仅能够为第一终端直接分配通信密钥以减少协商密钥所需的消息交互数量,而且还可利用第一证书验证第一终端所具有的身份凭证,并利用第二证书为通信密钥加密,从而极大的保障了通信密钥的分配和传递的安全性。

Description

通信密钥配置方法及装置
本申请要求于2021年02月10日提交中国专利局、申请号为202110184217.2、申请名称为“通信密钥配置方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及车联网、通信技术领域,尤其涉及一种通信密钥配置方法及装置。
背景技术
随着车端传感器的数量的增加、功能的增强和精度的提高,车端设备采集到的地理位置信息、车辆轨迹、车辆周边信息等信息的信息量极大增加和敏感度也极大提升,因此,对数据安全性的要求也越来越高。云端设备为了收集车端采集到的传感器数据,以对自动驾驶等应用进行优化,需要车端设备将数据上传到云端。
为了保障数据上传的安全性,云端设备需要与车端设备通过协商密钥的方式,获得密钥,进而对数据进行加密后上传。然而密钥协商过程需要多次消息交互,通信数据量大,影响数据上传性能。另外,密钥协商获得的临时密钥的安全性与协商双方产生的随机数的随机性有关,一旦随机数的随机性降低,会导致易被攻击者预测的风险,从而导致数据的安全性较差。因此,如何配置通信中数据所用的密钥以保证数据的安全性成为一个亟待解决的问题。
发明内容
本申请实施例提供了一种通信密钥配置方法及装置,能够直接为车辆分配通信密钥减少所需的消息交互数量,并保障通信密钥的分配和传递的安全性,从而保证数据的安全性。
第一方面,本申请提供了一种通信密钥配置方法,该方法中,证书密钥管理服务器接收来自第一终端的第一消息,该第一消息包含第一证书和第二证书;证书密钥管理服务器利用第一证书,验证第一终端具有利用该第二证书请求通信密钥的身份凭证;证书密钥管理服务器可利用该第二证书对分配给第一终端的通信密钥进行加密,获得通信密钥的密文;从而将包含该通信密钥的密文的第二消息发送给该第一终端。
可选的,第一终端可为车辆或车辆模块,如车载设备。可选的,第一终端还可为机器人、无人机等智能设备或运输工具,或者为智能设备、运输工具等设备中的部件或模块等。证书密钥管理服务器支持与多个机器人、无人机等智能设备,或多车辆、多个车端设备等运输工具,或智能设备、运输工具等设备中的部件或模块进行通信连接,且对于这些智能设备、运输工具或其中的部件或模块来说,证书密钥管理服务器较为可信。
可见,证书密钥管理服务器在收到来自第一终端的第一消息后,可直接为该第一终端分配通信密钥以避免密钥协商获得的密钥无法保证密钥强度的问题;并且证书密钥管理服务器可利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证,以保证通信密钥分配给有身份凭证的车辆;以及证书密钥管理服务器还可利用第二证书对分配给车辆的通信密钥进行加密,以保证通信密钥传递的安全性。
另外,本申请由证书密钥管理服务器为车辆分配通信密钥,与车辆直接和云服务器协商密钥的方式相比,也有利于满足监管和审计的需求。
一种可选的实施方式中,第一证书可不同于设备证书,该第一证书可专用于验证请求密钥的车辆的身份凭证,避免由于设备证书不容易更新和撤销,第一终端直接使用设备证书请 求密钥导致设备证书使用次数太多而易泄露设备证书对应的私钥的问题,进而导致通信密钥的泄露。可选的,第一证书还可以比设备证书的更新频率更高,即使第一证书对应的私钥被泄露,也可再次申请新的第一证书,撤销已泄露的注册证书,使得后续身份凭证的验证不受影响,提高安全性。
一种可选的实施方式,第二证书可为专用于通信密钥分发的证书。本申请使用第二证书保证通信密钥传递的机密性,能够相比于设备证书或第一证书加密通信密钥的方式,进一步的提高第二证书的更新频率,即使第二证书对应的第二私钥泄露后,也可申请新的第二证书,同时撤销已泄露的第二证书,使后续通信密钥的传递不受影响,提高安全性。
另外,一个车辆所具有的第一证书的个数可为多个,分别对应不同的业务;一个车辆所具有的第二证书的个数也可为多个,分别对应同一业务的不同数据,本申请不做限定。
一种可选的实施方式中,来自第一终端的第一消息还包含第一签名。这样,证书密钥管理服务器根据第一证书中的第一公钥验证第一终端具有利用第二证书请求通信密钥的身份凭证,可包括:证书密钥管理服务器根据第一消息和第一证书中的第一公钥,校验第一签名;证书密钥管理服务器在第一签名校验通过时,确定第一终端具有第一消息和所述第一证书对应的第一私钥(或者,第一终端具有第一证书对应的第一私钥且第一消息未被篡改),该第一消息和该第一私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。从而,有利于证书密钥管理服务器为具有身份凭证的车辆分配通信密钥。
一种可选的实施方式中,证书密钥管理服务器发送的第二消息还包含第二签名。该第二签名是证书密钥管理服务器利用通信密钥的密文和自身证书对应的私钥生成的,用于指示该第二消息来自证书密钥管理服务器。从而,有利于第一终端根据第二签名验证第二消息来源的合法性,进而能够使用该通信密钥进行数据传输。
本申请中,上述所述的第一证书和第二证书可由证书密钥管理服务器为第一终端分配。例如但不限于,证书密钥管理服务器接收来自第一终端的第一消息之前,如第一终端激活或交付客户等阶段,为第一终端分配第一证书和第二证书。
一种可选的实施方式中,证书密钥管理服务器为第一终端分配第二证书的相关操作可包括但不限于以下步骤:证书密钥管理服务器接收来自第一终端的第三消息,该第三消息包含第一证书和第二公钥;证书密钥管理服务器利用第一证书中第一公钥,验证第一终端具有利用第二证书请求通信密钥的身份凭证;证书密钥管理服务器利用来自第一终端的第二公钥,生成第二证书;证书密钥管理服务器向第一终端发送第四消息,该第四消息中包括该第二证书。可见,该实施方式保证了第二证书能够分发给具有对应身份凭证的车辆,使得车辆可以利用本申请所述的通信密钥配置方法向证书密钥管理服务器直接请求通信密钥。
可选的,该来自第一终端的第三消息可为第二证书请求消息,用于请求第二证书,进而请求通信密钥。
可选的,该来自第一终端的第三消息还包含第三签名。这样,证书密钥管理服务器利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证,包括:证书密钥管理服务器根据第二公钥和第一证书中的第一公钥,校验第三签名;证书密钥管理服务器在第三签名校验通过时,确定第一终端具有第二公钥和第一证书对应的第一私钥(或者,第一终端具有第一证书对应的第一私钥且第二公钥未被篡改);该第二公钥和该第一私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。进而,有利于通过上述所述的第四消息将第二证书分配给具有该对应身份凭证的车辆。
一种可选的实施方式中,证书密钥管理服务器为第一终端分配第一证书的相关操作可包 括但不限于以下步骤:证书密钥管理服务器接收来自第一终端的第五消息;该第五消息包括设备证书和第一公钥;证书密钥管理服务器利用设备证书,验证第一终端具有请求第一证书的身份凭证;证书密钥管理服务器基于来自第一终端的第一公钥生成第一证书;证书密钥管理服务器向第一终端发送第六消息,该第六消息中包括该第一证书。可见,该实施方式不仅能够为车辆分配第一证书,还能够保证被分配第一证书的车辆为具有对应身份凭证的车辆。
可选的,第五消息中还包括第四签名。这样,证书密钥管理服务器利用设备证书,验证第一终端具有请求第一证书的身份凭证,包括:证书密钥管理服务器根据第一公钥和设备证书中的第三公钥,校验第四签名;证书密钥管理服务器在第四签名校验通过时,确定第一终端具有第一公钥和设备证书对应的第三私钥,第一公钥和第三私钥用于指示第一终端具有请求第一证书的身份凭证。可见,该实施方式能够保证被分配第一证书的车辆为具有对应身份凭证的车辆。
本申请提供的通信密钥配置方法还可以包括:证书密钥管理服务器通过安全通道,向云服务器传输分配给第一终端的通信密钥。从而,有利于云服务器能够利用该通信密钥,解密第一终端上传的采用该通信密钥加密的数据,进而有利于云服务器优化自动驾驶等应用。
可选的,上述所述的通信密钥配置方法的相关操作、第一证书分配的相关操作、第二证书分配的相关操作,包括但不限于,分别在不同的三个阶段中执行。如一个阶段,可执行第一证书分配的相关操作,另一阶段,可执行第二证书分配的相关操作,又一阶段,可执行通信密钥配置的相关操作。可选的,第一终端申请第一证书、第二证书以及通信密钥的更新周期也可互为不同。从而,有利于改善第一终端触发各个阶段相关操作的灵活性,也有利于改善第一终端中各功能模块划分的灵活性。
第二方面,本申请还提供了一种通信密钥配置方法,该方法与第一方面所述的通信密钥配置方法相对应,是从第一终端的角度进行阐述的。该方法中,第一终端可向证书密钥管理服务器发送第一消息;该第一消息包含第一证书和第二证书;第一终端接收第二消息;该第二消息是证书密钥管理服务器利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证后发送的;第二消息包含第一终端的通信密钥的密文;第一终端利用第二证书对应的第二私钥,解密该通信密钥的密文,获得通信密钥。
可选的,第一终端可为车辆或车辆模块,如车载设备。可选的,第一终端还可为机器人、无人机等智能设备或运输工具,或者为智能设备、运输工具等设备中的部件或模块等。证书密钥管理服务器支持与多个机器人、无人机等智能设备,或多车辆、多个车端设备等运输工具,或智能设备、运输工具等设备中的部件或模块进行通信连接,且对于这些智能设备、运输工具或其中的部件或模块来说,证书密钥管理服务器较为可信。
可见,本申请中,第一终端可通过第一消息申请通信密钥,从而可直接接收来自证书密钥管理服务器返回的第二消息,以获得通信密钥,避免了第一终端需与通信对端,如云服务器,协商获得的密钥无法保证密钥强度的问题;并且,一方面,第一终端能够利用第一证书向证书密钥管理服务器指示自身为有身份凭证的车辆,另一方面,第一终端能够利用第二证书对应的第二私钥唯一获知证书密钥管理服务器分配给自身的通信密钥,保证了通信密钥传递的安全性。
另外,本申请中,第一终端可从证书密钥管理服务器获取通信密钥,与车辆直接和云服务器协商通信密钥的方式相比,更有利于满足监管和审计的需求。
一种可选的实施方式中,第一证书可不同于设备证书,该第一证书可专用于验证请求密 钥的车辆的身份凭证,避免由于设备证书不容易更新和撤销,第一终端直接使用设备证书请求密钥导致设备证书使用次数太多而易泄露设备证书对应的私钥的问题,进而导致通信密钥的泄露。可选的,第一证书还可以比设备证书的更新频率更高,即使第一证书对应的私钥被泄露,也可再次申请新的第一证书,撤销已泄露的第一证书,使得后续身份凭证的验证不受影响,提高安全性。
一种可选的实施方式,第二证书可为专用于通信密钥分发的证书。本申请使用第二证书保证通信密钥传递的机密性,能够相比于设备证书或第一证书加密通信密钥的方式,进一步的提高第二证书的更新频率更高,即使第二证书对应的第二私钥泄露后,也可申请新的第二证书,同时撤销已泄露的第二证书,使后续通信密钥的传递不受影响,提高安全性。
一种可选的实施方式中,第一终端发送的第一消息中还包括第一签名,即第一终端向证书密钥管理服务器发送第一消息之前,所述方法还包括:第一终端利用第一证书、第二证书和第一证书对应的第一私钥,生成第一签名;第一签名用于证书密钥管理服务器结合第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证。从而,有利于证书密钥管理服务器为具有身份凭证的第一终端分配通信密钥。
一种可选的实施方式中,第二消息还包含第二签名;第一终端接收第二消息之后,所述方法还包括:第一终端利用证书密钥管理服务器的证书中的公钥,校验第二签名;第一终端在第二签名校验通过时,确定第二消息来自证书密钥管理服务器。可选的,第一终端利用通信密钥的密文和证书密钥管理服务器的证书中的公钥,校验第二签名。可见,该实施方式有利于第一终端根据第二签名验证第二消息来源的合法性,进而能够使用该通信密钥进行数据传输,从而提高了通信密钥的安全性。
本申请中,上述所述的第一证书和第二证书可由第一终端分别申请。例如但不限于,第一终端发送第一消息之前,如第一终端激活或交付客户等阶段,第一终端向证书密钥管理服务器请求第一证书和第二证书。
一种可选的实施方式中,第一终端向证书密钥管理服务器请求第二证书,包括但不限于以下步骤:第一终端向证书密钥管理服务器发送第三消息,第三消息包括第一证书和第二公钥;第一终端接收第四消息;第四消息是证书密钥管理服务器利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证后发送的;第四消息中包括证书密钥管理服务器基于第二公钥生成的第二证书。可见,该实施方式可以向证书密钥管理服务器指示第一终端是具有对应身份凭证的车辆,从而使得第一终端获得第二证书。
可选的,第三消息中还包括第三签名;即第一终端向证书密钥管理服务器发送第三消息之前,所述方法还包括:第一终端根据第二公钥和第一证书对应的第一私钥,生成第三签名;第三签名用于证书密钥管理服务器结合第一证书验证第一终端具有利用第二证书请求所述通信密钥的身份凭证。
一种可选的实施方式中,第一终端向证书密钥管理服务器请求第一证书,可包括但不限于以下相关操作:第一终端向证书密钥管理服务器发送第五消息;第五消息包括设备证书和第一公钥;第一终端接收第六消息;第六消息是证书密钥管理服务器利用设备证书验证第一终端具有请求第一证书的身份凭证后发送的;第六消息中包括证书密钥管理服务器基于第一公钥生成的第一证书。可见,该实施方式可以向证书密钥管理服务器指示第一终端是具有对应身份凭证的车辆,从而使得第一终端获得第一证书。
可选的,所述第五消息中还包括第四签名;第一终端向证书密钥管理服务器发送第五消息之前,所述方法还包括:第一终端根据第一公钥和设备证书对应的第三私钥,生成第四签 名;第四签名用于证书密钥管理服务器结合设备证书验证第一终端具有请求第一证书的身份凭证。
本申请提供的通信密钥配置方法中,第一终端利用第二证书对应的第二私钥,解密通信密钥的密文,获得通信密钥之后,该方法还包括:第一终端利用通信密钥对待传输数据进行加密,获得待传输数据的密文;第一终端将待传输数据的密文上传到云服务器。从而,有利于云服务器安全获得这些数据,进而有利于云服务器优化自动驾驶等应用。
可选的,一种方式,第一终端将待传输数据的密文上传给云服务器的同时,还可以将对应通信密钥的密钥标识以及第一终端的车辆标识一并上传给云服务器;另一种方式,第一终端将待传输数据的密文和对应通信密钥的密钥标识上传给云服务器。从而使得云服务器能够采用对应的通信密钥解密数据的密文。通信密钥对应的密钥标识可由第一终端在第二消息中获得,即由证书密钥管理服务器为第一终端分配通信密钥时一并生成。
第三方面,本申请还提供一种数据解密方法,是从云服务器的角度进行阐述的,即云服务器可预先被推送或主动获取每个车辆对应的通信密钥,进而,基于每个车辆分别对应的通信密钥来解密对应车辆上传的数据的密文。可选的,若一个车辆可具有多个通信密钥,以对不同安全要求的数据进行加密上传,那么,云服务器还需预先被推送或主动获取每个车辆对应的多个通信密钥以及每个通信密钥的通信密钥标识;相应地,云服务器接收来自各个车辆的数据的密文的同时,还能够接收该数据的密文对应的通信密钥标识,进而选择对应的通信密钥解密该数据的密文。可见,该数据解密方法避免了云服务器与车辆之间协商通信密钥所导致的通信密钥强度不够的问题,减少了交互的消息数量,从而有利于减少对数据上传性能的影响。
第四方面,本申请还提供了一种通信密钥配置装置,包括接收单元、处理单元和发送单元。所述通信密钥配置装置用于实现第一方面或者第一方面的任意一种可能的实施方式所描述的方法。
第五方面,本申请还提供了另一种通信密钥配置装置,包括接收单元、处理单元和发送单元。所述通信密钥配置装置用于实现第二方面或者第二方面的任意一种可能的实施方式所描述的方法。
第六方面,本申请还提供了一种数据解密装置,包括接收单元、处理单元。所述数据解密装置用于实现第三方面或者第三方面的任意一种可能的实施方式所描述的方法。
上述第四方面至第六方面中任一方面中的发送单元或接收单元也可以为收发器,用于发送和/或接收上述第四方面至第六方面中任一方面中的数据;处理单元也可以为处理器,用于处理上述第四方面至第六方面中任一方面中的数据。
第七方面,本申请提供了一种芯片系统,该芯片系统包括至少一个处理器,用于支持实现上述第一方面至第三方面中的任一方面中所涉及的功能,例如,例如接收或处理上述方法中所涉及的数据和/或信息。
在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存程序指令和数据,存储器位于处理器之内或处理器之外。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。
第八方面,本申请还提供一种通信密钥配置装置,所述通信密钥配置装置包括至少一个 处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得通信密钥配置装置实现如第一方面至第三方面中的任一方面或第一方面至第三方面中任意一种可能的实施方式所描述的方法。
第九方面,本申请还提供一种通信密钥配置系统,该通信密钥配置系统包括证书密钥管理服务器、云服务器和第一终端中至少两个设备。其中,该证书密钥管理服务器用于实现上述第一方面或第一方面的任一种可能的实现方式所描述的方法,该第一终端用于实现上述第二方面或第二方面的一种可能的实现方式所描述的方法;云服务器用于获取或接收证书密钥管理服务器为第一终端分配的通信密钥。
第十方面,本申请还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,实现第一方面至第三方面中任一方面(或实现其任意一种可能的实施方式)所描述的方法。
第十一方面,本申请实施例公开了一种计算机程序产品,当所述计算机程序产品在一个或多个处理器上运行时,实现第一方面至第三方面中任一方面(或实现其任意一种可能的实施方式)所描述的方法。
附图说明
图1是本申请示出的一种通信系统的架构示意图;
图2是本申请实施例提供的一种通信密钥配置系统的结构示意图;
图3是本申请实施例提供的一种通信密钥配置方法的流程示意图;
图4是本申请实施例提供的另一种通信密钥配置方法的流程示意图;
图5是本申请实施例提供的又一种通信密钥配置方法的流程示意图;
图6是本申请实施例提供的一种第一证书获取方法的流程示意图;
图7是本申请实施例提供的一种第二证书获取方法的流程示意图;
图8是本申请实施例提供的一种通信密钥配置装置的结构示意图;
图9是本申请实施例提供的一种通信密钥配置装置的结构示意图;
图10是本申请实施例提供的一种芯片的结构示意图。
具体实施方式
下面结合本申请实施例中的附图对本申请实施例中的技术方案进行描述。
需要说明的是,本申请实施例使用“第一”、“第二”等序数词是用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或重要程度。例如,第一消息、第二消息、第三消息等,只是为了区分不同的消息类型,而并不是表示这两种消息的结构、重要程度等不同。
本申请实施例中,签名的过程中通常会使用到公钥和私钥,公钥和私钥是一对互相加解密的密钥。其中,私钥私密存储,公钥对外公开。在使用时,使用公钥加密明文得到密文,使用私钥解密密文得到明文。或者,使用私钥对原文进行签名,使用公钥和签名验证原文是否被篡改。
签名与验签的工作流程可以为(以双方分别为A节点和B节点为例):A节点将原文进行哈希(hash),得到第一hash值;A节点用自己的私钥对第一hash值加密得到签名值,将原文、签名值发送给B节点;B节点用公钥将签名值进行解密,得到第二hash值;B节点将原文进行hash得到第三hash值,对比第二hash值与第三hash值是否一致,以验证原文是否 被篡改。
其中,公钥的来源,可以是数字证书中的公钥。其中,数字证书(也可以称为安全证书)是标志身份的一个数字认证,通常是由证书授权(Certificate Authority,CA)中心或受信任的第三方设备所颁发的一种较为权威与公正的证书。B节点可以通过公钥的数字证书确定公钥为B节点的公钥。
应理解,前述的关于公钥、私钥以及签名等的解释只是用于简单叙述实现的原理,并不限定使用时一定使用相同的参数进行实现。例如,签名的具体实现过程中还可以有其他的改进和变体。另外需要说明的是,本申请实施例提到的“认证”、“校验”、“验证”,可以用于指示检查是否正确或合理、以及检查是否被篡改的意思。
对本申请实施例的系统架构和业务场景进行描述。
需要说明的是,本申请描述的系统架构及业务场景是为了更加清楚的说明本申请的技术方案,并不构成对于本申请提供的技术方案的限定,本领域普通技术人员可知,随着系统架构的演变和新业务场景的出现,本申请提供的技术方案对于类似的技术问题,同样适用。
请参见图1,图1是本申请示例的一种通信系统的架构示意图,该通信系统可包括业务云平台101(也可以称为云服务器)和车辆102。例如但不限于,车辆102是基于车辆电子电气(Electrical/Electronic Architecture,E/E)架构的车辆,参见区域103,车辆102可以包括以下部件中的至少一个:移动数据中心(Mobile Data Center,MDC)、人机交互(Human–Machine Interaction,HMI)、网关(gateway,GW)、汽车盒子(Telematics BOX,Tbox或称为TCU)、电子控制单元(Electronic Control Unit,ECU)等。其中,GW是整车的核心部件,其作为整车网络的数据交互枢纽,可将控制区域网络(Controller Area Network,CAN)、局域互联网络(Local Interconnect Network,LIN)、多媒体数据传输(Media Oriented System Transport,MOST)等网络数据在不同网络中进行路由。MDC是车辆的智能车载计算平台。T-BOX主要用于和车辆外部、后台系统和手机应用(application,APP)通信。HMI是车辆的信息输入、娱乐、交互系统。ECU是车辆内的控制器。
为了保障车辆102向业务云平台101上传的数据的安全性,车辆102需要与业务云平台101通过密钥协商、密钥派生等方式获得通信密钥,进而,车辆102将上传的数据利用该通信密钥加密后上传给业务云平台101。然而,数据上传连接建立过程中进行密钥协商、密钥派生等方式会需要多次消息交互、通信数据量较大,影响数据上传性能。另外,密钥协商获得的临时密钥的安全性与协商双方产生的随机数的随机性有关,一旦随机数的随机性降低,会导致易被攻击者预测的风险,从而导致数据的安全性较差。
本申请提供一种通信密钥配置系统,能够直接为车辆分配通信密钥减少所需的消息交互数量,并保障通信密钥的分配和传递的安全性,从而保证数据的安全性。
请参阅图2,图2是本申请实施例提供的一种通信密钥配置系统的结构示意图,该系统包括证书密钥管理服务器201、第一终端202和云服务器203中的至少两个设备。例如,该系统包括证书密钥管理服务器201、第一终端202和云服务器203中的两个设备,那么该系统可通过通信接口与该两个设备之外的另一设备进行交互。其中,图2以该系统包括三个设备为例进行阐述。其中:
证书密钥管理服务器201是具有数据处理能力的设备,可以是实体设备如主机、服务器等,也可以是虚拟设备如虚拟机、容器等。证书密钥管理服务器201能够与第一终端202进行信息传输,例如,为第一终端202分配通信密钥;证书密钥管理服务器201能够与云服务 器203进行信息传输,例如,将为第一终端202分配的通信密钥通过安全通道,推送给云服务器203。在一些具体的实施场景中,也将证书密钥管理服务器201称为证书/密钥管理服务器。
第一终端202可为车辆,或者为车辆中的设备,如车载设备等。可选的,第一终端202可为机器人、无人机等智能设备或车辆等运输工具,或者为智能设备、运输工具等设备中的部件或模块等。
云服务器203是具有数据处理能力的设备,可以是实体设备如主机、服务器等,也可以是虚拟设备如虚拟机、容器等。需要说明的是,此处为了便于描述称为服务器,具体实现过程中可以是服务器,也可以是其他具有数据处理能力的设备,或者是设备中的一个模块(例如芯片或集成电路)。云服务器203为收集车辆采集到的地理位置信息、车辆轨迹、车辆周边信息等数据的服务器。
基于该通信密钥配置系统,终端可执行通信密钥的初始化操作,也可称为通信密钥配置操作。例如,第一终端202可向证书密钥管理服务器201发送通信密钥请求,该通信密钥请求中可包含第一终端202具有的第一证书和第二证书。证书密钥管理服务器201利用第一证书,验证第一终端202具有利用该第二证书请求通信密钥的身份凭证;证书密钥管理服务器201可利用该第二证书对分配给第一终端202的通信密钥进行加密,获得通信密钥的密文,进而传递给第一终端202,从而保证通信密钥的安全性。可选的,该通信密钥请求还可包含第一签名和请求时间等,具体的,第一签名可用于由证书密钥管理服务器201结合第一证书验证第一终端202具有利用该第二证书请求通信密钥的身份凭证;请求时间可用于由证书密钥管理服务器201验证该通信密钥请求的新鲜性,以避免被复制重复请求通信密钥。第一终端202可接收来自证书密钥管理服务器201的通信密钥的密文。可选的,证书密钥管理服务器201可将分配给第一终端202的通信密钥通过安全通道传输给云服务器203。
可选的,第一终端202中可包括证书密钥管理模块,该证书密钥管理模块可执行上述所述的通信密钥请求的操作,接收来自证书密钥管理服务器201的通信密钥的密文,以及对该通信密钥的密文进行解密等操作,此处不再详述。
可选的,基于该通信密钥配置系统,终端可执行对待传输的数据进行加密等操作。例如,第一终端202可利用请求获得的通信密钥对待传输的数据进行加密后,获得数据的密文。
可选的,该第一终端202还可包括数据加密模块,该数据加密模块可利用请求获得的通信密钥对待传输的数据进行加密后,获得数据的密文。可选的,第一终端202中的证书密钥管理模块和数据加密模块可部署在图1所示的同一模块中,如MDC;或者,第一终端202中具有多套证书密钥管理模块和数据加密模块,图1所示的多个模块中,如MDC、Tbox、GW等车载设备中均可部署一套或多套证书密钥管理模块和数据加密模块,以用于管理不同的证书和通信密钥。
可选的,基于该通信密钥配置系统,终端与云服务器之间可执行数据安全传输等操作。例如,第一终端202将数据的密文上传给云服务器203。可选的,该第一终端202还可包括数据打包模块和传输模块,该数据打包模块可将数据的密文打包成数据报文,由传输模块将该数据报文发送给云服务器203。
可选的,基于该通信密钥配置系统,云服务器可执行数据解密等操作。例如,云服务器203使用证书密钥管理服务器201传输的第一终端202的通信密钥对该数据的密文进行解密。
可选的,终端执行通信密钥的初始化操作之前,终端还可执行证书的初始化操作。例如,第一终端202可分别向证书密钥管理服务器201发送第一证书请求、第二证书请求,或者, 第一终端202可向证书密钥管理服务器201发送证书请求以请求第一证书和第二证书。进而,证书密钥管理服务器201可分别或同时为第一终端202分配第一证书、第二证书。
其中,第一证书请求中可包括第一终端202的设备证书和第一公钥;证书密钥管理服务器201可根据该设备证书,验证第一终端202具有请求第一证书的身份凭证;证书密钥管理服务器201可利用第一公钥,生成第一证书并发送给第一终端202。其中,第二证书请求中可包括第一终端202的第一证书和第二公钥;证书密钥管理服务器201可根据该第一证书,验证第一终端202具有利用第二证书请求通信密钥的身份凭证;证书密钥管理服务器201可利用第二公钥,生成第二证书并发送给第一终端202。可选的,证书请求中可包括第一终端202的设备证书、第一公钥和第二公钥;证书密钥管理服务器201可根据该设备证书,验证第一终端202具有请求第一证书的身份凭证;证书密钥管理服务器201可利用第一公钥生成第一证书以及利用第二公钥生成第二证书;证书密钥管理服务器201可将第一证书和第二证书一并发送给第一终端202。
可选的,在一些终端初始化等场景,如车辆首次启动的场景,可一并执行证书初始化、通信密钥初始化的相关操作;在一些数据上传业务等场景,可执行通信密钥初始化的相关操作即可,即终端的相关证书已经通过之前的证书初始化阶段完成。
可选的,上述所述的第一证书请求、第二证书请求,或证书请求,接收来自证书密钥管理服务器201的第一证书、第二证书等操作可由上述所述的第一终端202中证书密钥管理模块执行。
可选的,证书密钥管理服务器201可以部署有证书管理模块和密钥管理模块中的至少一项。证书密钥管理服务器201可通过证书管理模块执行证书初始化的相关操作,如为第一终端202分配第一证书、第二证书;证书密钥管理服务器201可通过密钥管理模块,执行通信密钥初始化的相关操作,如为第一终端202分配通信密钥。
可选的,云服务器203中可包括证书密钥管理模块、数据解密模块、数据拆包模块以及传输模块中的至少一个。其中,证书密钥管理模块可主动从证书密钥管理服务器获取第一终端202的通信密钥,也可接收证书密钥管理服务器推送的第一终端202的通信密钥;传输模块可接收来自第一终端202的数据报文,并由数据拆包模块从该数据报文中获取数据的密文,进而由解密模块根据该第一终端202的通信密钥解密该数据的密文,获得该数据。
可见,图2所示的系统中,证书密钥管理服务器201可直接为该第一终端202分配通信密钥以避免密钥协商获得的密钥无法保证密钥强度的问题;并且证书密钥管理服务器201可利用第一证书验证第一终端202具有利用第二证书请求通信密钥的身份凭证,以保证通信密钥分配给有身份凭证的终端;以及证书密钥管理服务器还可利用第二证书对分配给第一终端202的通信密钥进行加密,以保证通信密钥传递的安全性。另外,该系统由证书密钥管理服务器201为第一终端202分配通信密钥,与第一终端202直接和云服务器203协商密钥的方式相比,也有利于满足监管和审计的需求。
以下从证书密钥管理服务器、第一终端、云服务器之间交互的角度,对本申请提供的通信密钥配置方法进行相关的阐述。
请参阅图3,图3是本申请实施例提供的一种通信密钥配置方法的流程示意图。可选的,图3所示的通信密钥配置方法可基于图2所示的结构来实现。如图3所示,该通信密钥配置方法可包括但不限于以下步骤:
S301、第一终端向证书密钥管理服务器发送第一消息。
S302、证书密钥管理服务器接收该第一消息。
其中,证书密钥管理服务器的相关描述可以参看前述对证书密钥管理服务器201的描述。该证书密钥管理服务器可以是一个服务器,也可以是多个服务器组成的服务器集群,还可以是分布式的服务器。
该第一消息包含第一证书和第二证书。第一证书用于验证第一终端具有利用该第二证书请求通信密钥的身份凭证;第二证书用于加密分配给第一终端的通信密钥。应理解,第一消息也可以包含多条消息。例如,第一消息包含消息A和消息B,其中消息A中包含第一证书,消息B中包含第二证书。可选的,第一消息可以是通信密钥请求消息,也可以是其他类型的消息。可选的,第一消息中可携带标识以告知证书密钥管理服务器,第一终端请求通信密钥。
S303、证书密钥管理服务器根据第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证;
可选的,第一证书可不同于设备证书,该第一证书可专用于验证第一终端的身份凭证,避免由于设备证书不容易更新和撤销,第一终端直接使用设备证书请求密钥导致设备证书使用次数太多而易泄露设备证书对应的私钥的问题,进而导致通信密钥的泄露。可选的,第一证书还可以比设备证书的更新频率更高,即使第一证书对应的私钥被泄露,也可再次申请新的第一证书,撤销已泄露的注册证书,使得后续身份凭证的验证不受影响,提高安全性。
可选的,证书密钥管理服务器还可利用第一证书的根证书对第一证书进行验证,以保证第一证书是由自身颁布的,是可信的。
S304、证书密钥管理服务器可利用该第二证书对分配给第一终端的通信密钥进行加密,获得通信密钥的密文。
可选的,第二证书可为专用于通信密钥分发的证书。采用第二证书保证通信密钥传递的机密性,相比于采用设备证书或第一证书加密通信密钥的方式,能够进一步的提高第二证书的更新频率,即使第二证书对应的第二私钥泄露后,也可申请新的第二证书,同时撤销已泄露的第二证书,使后续通信密钥的传递不受影响,提高安全性。
S305、证书密钥管理服务器向该第一终端发送第二消息。
其中,该第二消息包含分配给第一终端的通信密钥的密文。
S306、证书密钥管理服务器通过安全通道,向云服务器传输分配给第一终端的通信密钥。
可选的,步骤S305与S306之间执行的先后顺序,本申请不做限定。
相应地,第一终端可接收第二消息,云服务器可获得第一终端的通信密钥。
可选的,证书密钥管理服务器通过安全通道,主动向云服务器推送分配给第一终端的通信密钥;可选的,云服务器也可主动向证书密钥管理服务器获取该第一终端的通信密钥,本申请实施例不做限定。
可见,本申请实施例中,证书密钥管理服务器在收到来自第一终端的第一消息后,可直接为该第一终端分配通信密钥以避免密钥协商获得的密钥无法保证密钥强度的问题;并且证书密钥管理服务器可利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证,以保证通信密钥分配给有身份凭证的车辆;以及证书密钥管理服务器还可利用第二证书对分配给车辆的通信密钥进行加密,以保证通信密钥传递的安全性。另外,本申请由证书密钥管理服务器为车辆分配通信密钥,与车辆直接和云服务器协商密钥的方式相比,也有利于满足监管和审计的需求。
请参阅图4,图4是本申请实施例提供的另一种通信密钥配置方法的流程示意图。图4 所示的通信密钥配置方法与图3所示的通信密钥配置方法相比,第一消息中还包含第一签名。如图4所示,第一终端在发送第一消息之前,第一终端可根据第一证书、第二证书和第一证书对应的第一私钥,生成第一签名。例如,第一终端利用第一证书对应的第一私钥,对第一消息中的内容(如第一证书、第二证书)进行签名,获得第一签名。其中,该签名采用的算法可基于第一证书获知。
相应地,证书密钥管理服务器在发送第二消息之前,例如,如图4所示,在接收到第一消息后,证书密钥管理服务器根据第一消息和第一证书中的第一公钥,校验第一签名;证书密钥管理服务器在第一签名校验通过时,确定第一终端具有第一消息和第一证书对应的第一私钥,该第一消息和该第一私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。可见,该实施方式使得证书密钥管理服务器获知该第一终端是合法的,且具有对应的身份凭证,从而有利于保证通信密钥分配的安全性。
可选的,第二消息中还可包含第二签名。如图4所示,证书密钥管理服务器根据通信密钥的密文和自身证书对应的私钥,生成第二签名。相应的,如图4所示,第一终端接收第二消息之后,第一终端利用通信密钥的密文和证书密钥管理服务器的证书中的公钥,校验第二签名;第一终端在第二签名校验通过时,确定第二消息来自证书密钥管理服务器。可见,该实施方式使得第一终端根据第二签名验证第二消息来源的合法性,进而能够使用该通信密钥进行数据传输,从而提高了通信密钥的安全性。
其中,证书密钥管理服务器根据通信密钥的密文和自身证书对应的私钥,生成第二签名,可以包括:证书密钥管理服务器利用自身证书对应的私钥,计算通信密钥的密文的哈希值,进而得到第二签名。
可选的,第一消息中还可以包括通信密钥的请求时间,即第一消息的发送时间,从而保证第一消息的新鲜性,避免第一消息被其他第三方复制后多次请求通信密钥。相应地,第二消息中还可以包括响应时间,即第二消息的发送时间,从而也能够保证第二消息的新鲜性,避免第二消息被其他第三方复制后多次使用,导致加密的数据安全性不够。
请参阅图5,图5是本申请实施例提供的又一通信密钥配置方法的流程示意图。图5所示的通信密钥配置方法与上述图3、图4所示的通信密钥配置方法的不同之处在于,在图3、图4所示的通信密钥配置方法的相关操作之前,证书密钥管理服务器可向第一终端分配第一证书和第二证书,即第一证书、第二证书分配阶段。以下结合图6、图7对第一证书的获取流程以及第二证书的获取流程进行阐述。
如图6所示的第一证书获取流程示意图,第一证书获取流程可包括但不限于以下相关操作:
S601、第一终端向证书密钥管理服务器发送第五消息。
S602、证书密钥管理服务器接收来自第一终端的第五消息。
该第五消息包括设备证书和第一公钥,其中,第一终端需要预置设备证书。其中,第一公钥可以是第一终端采用非对称密码算法生成的公私钥对,该公私钥对包括第一公钥和第一私钥。第一公钥用于由证书密码管理服务器生成第一证书,第一私钥用于对所述的对第一消息、第三消息或第三消息中的第二公钥进行签名,以告知证书密钥管理服务器第一终端具有利用第二证书请求通信密钥的身份凭证。
S603、证书密钥管理服务器利用设备证书,验证第一终端具有请求第一证书的身份凭证。
该证书密钥管理服务器需要预置设备证书的根证书,用于验证第一终端的设备证书,进 而确定第一终端是否具有请求第一证书的身份凭证。
可选的,所述第五消息中还包括第四签名;第一终端向证书密钥管理服务器发送第五消息之前,所述方法还包括:第一终端根据第一公钥和设备证书对应的第三私钥,生成第四签名;第四签名用于证书密钥管理服务器结合设备证书验证第一终端具有请求第一证书的身份凭证。其中,第一终端根据可利用设备证书对应的第三私钥,对第一公钥或第五消息进行签名,获得第四签名。可选的,该签名采用的算法可由设备证书指定。
相应地,证书密钥管理服务器利用设备证书,验证第一终端具有请求第一证书的身份凭证,还包括:证书密钥管理服务器根据第一公钥和设备证书中的第三公钥,校验第四签名;证书密钥管理服务器在第四签名校验通过时,确定第一终端具有第一公钥和设备证书对应的第三私钥,第一公钥和第三私钥用于指示第一终端具有请求第一证书的身份凭证。也就是说,证书密钥管理服务器不仅利用设备证书的根证书验证设备证书,还在设备证书验证通过时,利用设备证书中的第三公钥和第五消息中的第一公钥,校验第四签名,这样,通过第一公钥的完整性未被篡改的校验结果,保证被分配第一证书的车辆为具有对应身份凭证的车辆。
S604、证书密钥管理服务器基于来自第一公钥生成第一证书。
S605、证书密钥管理服务器向第一终端发送第六消息,该第六消息中包括该第一证书。
S606、第一终端接收第六消息。
也就是说,第六消息是证书密钥管理服务器利用设备证书验证第一终端具有请求第一证书的身份凭证后发送的。
可选的,该部分获取的第一证书可以有多个,对应于不同的业务数据。例如,若一些车辆开通了激光雷达数据上传业务,但没有开通摄像头图片上传业务,则证书密钥管理服务器就可以只分配一个第一证书,对应于激光雷达数据上传业务。若另一些车辆该两种业务都已开通,则证书密钥管理服务器就可以为其分配两个注册证书,分别对应于两种业务。相应地,第一终端执行上述所述的通信密钥配置方法时,第一终端可针对不同业务,携带对应的第一证书。
可选的,第五消息中还可以包括第一证书的请求时间,即第五消息的发送时间,从而保证第五消息的新鲜性,避免第五消息被其他第三方复制后多次请求第一证书。相应地,第六消息中还可以包括响应时间,即第六消息的发送时间,从而也能够保证第六消息的新鲜性,避免第六消息被其他第三方复制后多次使用,导致第一证书的安全性不够。
可选的,第四签名还可结合第一证书的请求时间生成,本申请不做限定。
可见,图6所示的第一证书获取流程可以保证证书密钥管理服务器向具有对应身份凭证的车辆分配第一证书。
如图7所示的第二证书获取流程示意图,第二证书获取流程可包括但不限于以下相关操作:
S701、第一终端向证书密钥管理服务器发送第三消息。
S702、证书密钥管理服务器接收来自第一终端的第三消息。
该第三消息包括第一证书和第二公钥,其中,第一终端具有第一证书。
S703、证书密钥管理服务器利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证。
可选的,所述第三消息中还包括第三签名;第一终端向证书密钥管理服务器发送第三消息之前,所述方法还包括:第一终端根据第二公钥和第一证书对应的第一私钥,生成第三签 名;第三签名用于证书密钥管理服务器结合第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证。其中,第一终端根据可利用第一证书对应的第一私钥,对第二公钥或第三消息进行签名,获得第三签名。可选的,该签名采用的算法可由第一证书指定。
相应地,证书密钥管理服务器利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证,还包括:证书密钥管理服务器根据第二公钥和第一证书中的第一公钥,校验第三签名;证书密钥管理服务器在第三签名校验通过时,确定第一终端具有第一公钥和设备证书对应的第三私钥,第一公钥和第三私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。也就是说,证书密钥管理服务器不仅利用设备证书验证第一证书,还在第一证书验证通过时,利用第一证书中的第一公钥和第三消息中的第二公钥,校验第三签名,这样,通过第二公钥的完整性未被篡改的校验结果,保证被分配第二证书的车辆为具有对应身份凭证的车辆。
S704、证书密钥管理服务器基于来自第二公钥生成第二证书。
S705、证书密钥管理服务器向第一终端发送第四消息,该第四消息中包括该第二证书。
S706、第一终端接收第四消息。
也就是说,第四消息是证书密钥管理服务器利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证后发送的。
可选的,该部分获取的第二证书可以有多个,分别用于保护不同的通信密钥。例如,在实际进行数据加密上传业务时,需要上传的数据可能有不同的分类以及对应的不同安全要求。例如,激光雷达的数据中可能包括地理信息坐标、激光点云原始数据、结构化数据等,这些数据的安全要求可能不同,比如高精度的地理信息坐标数据安全要求很高,加密所用的通信密钥需要每天更新,而激光点云原始数据安全要求相对较低,加密所用的通信密钥可以一个月更新一次。因此,在这种场景下,证书密钥管理服务器可以为车端设备,如第一终端,分配多个第二证书,以请求不同类型的通信密钥用于不同类型数据的加密。也就是说,对于每种类型的通信密钥,可以使用不同的第二证书进行保护。
可选的,第三消息中还可以包括第二证书的请求时间,即第三消息的发送时间,从而保证第三消息的新鲜性,避免第三消息被其他第三方复制后多次请求第二证书。相应地,第四消息中还可以包括响应时间,即第四消息的发送时间,从而也能够保证第四消息的新鲜性,避免第六消息被其他第三方复制后多次使用,导致第二证书的安全性不够。
可选的,第三签名还可结合第二证书的请求时间生成,本申请不做限定。
可见,图7所示的第二证书获取流程可以保证证书密钥管理服务器向具有对应身份凭证的车辆分配第二证书。
本申请实施例提供的一种数据加密方法。该数据加密方法可采用上述图3、图4所示的通信密钥配置方法,获得的通信密钥对第一终端采集的数据进行加密,获得数据的密文,并上传到云服务器。以下对数据加密流程进行简单阐述。该数据加密流程可包括但不限于以下步骤:
S801、第一终端确定待加密数据。
该待加密数据可称为明文。若明文中有不加密的内容,则将不加密的内容设为密码算法的可鉴别数据(即作为密码算法的输入参数之一),将需要加密的内容设为密码算法的明文输入,生成初始向量(initialization vector,IV)。可选的,数据加解密需要所使用的参数IV长度为128比特,其生成方法,本申请实施例不做限定,可选的,参数IV可包括但不限于以下 两种方式:
方案1:参数IV由48比特的时间和80比特的随机数组成。48比特的时间是“年月日时分秒”组成的14位10进制数的2进制表示;80比特的随机数是通过随机数生成算法产生。
方案2:参数IV是随机数(128bit),加密时间和明文串接后作为加密算法输入获得的。
S802、第一终端利用密码算法和上述分配的通信密钥对该明文进行加密,生成密文。
S803、第一终端确定生成的密文、参数IV、通信密钥的标识、第一终端的标识一起作为数据密文。
可选的,该步骤S801至S803可由第一终端中的加密模块来执行。
其中,通信密钥的标识可由证书密钥管理服务器在为第一终端分配该通信密钥时生成,进而携带于第二消息中发送给第一终端。这样,对于第一终端配置有多个通信密钥的情况,第一终端可在数据密文中携带该标识以告知云服务器,采用对应的通信密钥来解密该数据密文。
第一终端的标识可以是车辆识别代号(Vehicle Identification Number,VIN)、设备证书序列号等能够标识车端设备的信息。
可选的,在步骤S803之后,第一终端可将该数据密文上传给云服务器,该数据密文的传输过程可基于安全传输协议,如超文本传输安全协议(Hyper Text Transfer Protocol over Secure Socket Layer,HTTPS)进行。
可见,该数据加密方法可直接利用证书密钥管理服务器分配的通信密钥对数据进行加密,与第一终端还需云服务器协商通信密钥或派生通信密钥的方式相比,大大减少了数据上传过程中所需的交互消息量,避免了交互消息量过大对数据上传的影响。
相应地,本申请实施例提供的一种数据解密方法。数据解密方法可采用上述图3、图4所示的通信密钥配置方法中,云服务器可利用证书密钥管理服务器通过安全通道传输给云服务器的通信密钥,执行相关操作。以下对数据解密流程进行简单阐述。该数据解密流程可包括但不限于以下步骤:
S901、云服务器接收数据密文。
其中,该数据密文如上所述包括S802生成的密文、参数IV、通信密钥的标识、第一终端的标识。
S902、云服务器根据通信密钥的标识、第一终端的标识,确定对应的通信密钥。
S903、云服务器利用通信密钥和参数IV,使用密码算法解密,获得明文;
可选的,云服务器还可以根据参数IV中的时间比特,判断数据密文的新鲜性。例如,参数IV中的时间和当前时间差别过大时,认为数据密文无效,从而避免云服务器获得错误的明文。
可选的,云服务器可输出获得的明文。可选的,步骤S901至S903的相关操作可由云服务器中的解密模块执行。
可见,该数据解密方法中,云服务器可直接利用证书密钥管理服务器分配给第一终端的通信密钥对数据密文进行解密,与云服务器还需和第一终端协商通信密钥或派生通信密钥的方式相比,大大减少了数据上传过程中所需的交互消息量,避免了交互消息量过大对数据上传的影响。
可选的,上述数据加密方法中,数据在加密之前,可先进行数据压缩处理;相应地,该数据解密方法中,数据密文解密后获得的明文可进行解压缩处理。可见,该实施方式能够处 理某些大数据量的上传业务,如摄像头头像视频上传业务等。
需要说明的是,上述各实施例中的步骤可以根据实际需要进行顺序调整、合并和删减。
上述本申请提供的实施例中,分别从证书密钥管理服务器、第一终端以及云服务器等角度对本申请实施例提供的相关方法进行了介绍。为了实现本申请实施例提供的方法中的各功能,证书密钥管理服务器、第一终端以及云服务器可以包括硬件结构、软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。下面将结合图8至图10详细描述本申请实施例相关的通信装置。
图8示出了通信密钥配置装置的示意性框图,通信密钥配置装置800可以执行上述方法实施例中证书密钥管理服务器的相关操作,该通信密钥配置装置800可以是图2所示的证书密钥管理服务器,也可以是证书密钥管理服务器中的一个器件,例如芯片或集成电路等。其中,该通信密钥配置装置可包括但不限于:
通信单元801,用于接收来自第一终端的第一消息,该第一消息包含第一证书和第二证书;
处理单元802,用于利用所述第一证书,验证该第一终端具有利用第二证书请求通信密钥的身份凭证;
该处理单元802,还用于利用第二证书,对分配给第一终端的通信密钥进行加密,获得通信密钥的密文;
所述通信单元801,还用于向第一终端发送第二消息,该第二消息包含该通信密钥的密文。
可见,该通信密钥配置装置不仅能够为第一终端直接分配通信密钥以减少协商密钥所需的消息交互数量,而且还可利用第一证书验证第一终端所具有的身份凭证,并利用第二证书为通信密钥加密,从而极大的保障了通信密钥的分配和传递的安全性。
一种可选的实施方式中,第一消息中还包括第一签名。处理单元802根据第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证,具体为:根据第一证书中的第一公钥,校验该第一签名;在该第一签名校验通过时,确定第一终端具有第一消息和第一证书对应的第一私钥,第一消息和第一私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。可见,该实施方式保证了该通信密钥配置装置为具有对应身份凭证的第一终端分配通信密钥。
一种可选的实施方式中,该第二消息还包含第二签名。处理单元802,还用于在通信单元801向第一终端发送第二消息之前,利用自身证书对应的私钥和通信密钥的密文,生成第二签名;该第二签名用于指示第二消息来自证书密钥管理服务器。
一种可选的实施方式中,通信单元801,还用于向第一终端发送第一证书和第二证书。可选的,通信单元801可在不同时刻分别发送第一证书、第二证书,如通过多条消息分别发送;或者通信单元801可在同一时刻发送第一证书、第二证书,如通过一条消息发送。
一种可选的实施方式中,该通信密钥配置装置800中,
通信单元801,还用于接收来自第一终端的第三消息,该第三消息包含第一证书和第二公钥;
处理单元802,还用于利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证;
处理单元802,还用于利用该第二公钥,生成第二证书;
通信单元801,用于向第一终端发送第四消息,该第四消息中包括所述第二证书。
可选的,该通信密钥配置装置800中,第二证书生成的相关操作与第二签名生成的相关操作可由不同的软件模块执行,如由两个处理单元分别执行,即本申请实施例中不限定该通信密钥配置装置800具有的处理单元的个数。
可选的,处理单元802利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证的操作,可以在通信单元801向第一终端发送第四消息之前执行。
可选的,第三消息中还包括第三签名。处理单元802利用第一证书,验证第一终端具有利用第二证书请求通信密钥的身份凭证,包括:
处理单元802,用于根据第二公钥和所述第一证书中的第一公钥,校验第三签名;
处理单元802,还用于在所述第三签名校验通过时,确定第一终端具有第二公钥和第一证书对应的第一私钥;该第二公钥和该第一私钥用于指示第一终端具有利用第二证书请求通信密钥的身份凭证。
一种可选的实施方式中,该通信密钥配置装置800中:
通信单元801,还用于接收来自第一终端的第五消息;所述第五消息包括设备证书和第一公钥;
处理单元802,还用于利用设备证书,验证第一终端具有请求第一证书的身份凭证;
处理单元802,还用于基于所述第一公钥生成第一证书;
通信单元801,还用于向所述第一终端发送第六消息,所述第六消息中包括该第一证书。
可选的,该通信密钥配置装置800中,第一证书生成的相关操作与第二签名生成的相关操作可由不同的软件模块执行,如由两个处理单元分别执行,即本申请实施例中不限定该通信密钥配置装置800具有的处理单元的个数。可选的,该通信密钥配置装置800中,第一证书生成的相关操作、第二证书生成的相关操作以及第二签名生成的相关操作可由不同的软件模块执行,如由三个处理单元分别执行,即本申请实施例中不限定该通信密钥配置装置800具有的处理单元的个数。
可选的,第五消息中还包括第四签名。处理单元802利用所述设备证书,验证所述第一终端具有请求所述第一证书的身份凭证,具体为:根据第一公钥和设备证书中的第三公钥,校验第四签名;在第四签名校验通过时,确定第一终端具有第一公钥和设备证书对应的第三私钥,第一公钥和第三私钥用于指示第一终端具有请求第一证书的身份凭证。
该通信密钥配置装置800中,通信单元801还用于通过安全通道,向云服务器传输分配给第一终端的通信密钥。从而,有利于云服务器对第一终端上传的数据的密文进行解密,获得数据。
另一实施例中,该通信密钥配置装置800可以执行上述方法实施例中第一终端的相关操作,图8中所示的通信密钥配置装置800可以为图1或图2所示的系统中的第一终端,或为第一终端中的一个器件,例如,芯片或集成电路等,再例如图1中所示的MDC、Tbox、GW等车载设备。该通信密钥配置装置800中:
通信单元801,用于向证书密钥管理服务器发送第一消息;该第一消息包含第一证书和第二证书;
该通信单元801,还用于接收第二消息;该第二消息是证书密钥管理服务器利用第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证后发送的;第二消息包含第一终端的通信密钥的密文;
处理单元802,利用第二证书对应的第二私钥,解密通信密钥的密文,获得通信密钥。
可见,该通信密钥配置装置800可直接从证书密钥管理服务器获得通信密钥以减少协商密钥所需的消息交互数量,而且还可向证书密钥管理服务器发送第一证书和第二证书,使得证书密钥管理服务器可利用该第一证书验证第一终端所具有的身份凭证,并利用第二证书为通信密钥加密,从而极大的保障了通信密钥的分配和传递的安全性。
一种可选的实施方式中,第一消息中还包括第一签名。处理单元802在通信单元801向证书密钥管理服务器发送第一消息之前,还用于利用第一证书对应的第一私钥和第一证书、第二证书,生成第一签名;第一签名用于证书密钥管理服务器结合第一证书验证第一终端具有利用第二证书请求通信密钥的身份凭证。
一种可选的实施方式中,第二消息还包含第二签名。处理单元802在通信单元801接收第二消息之后,还用于利用证书密钥管理服务器的证书中的公钥,校验第二签名;以及在第二签名校验通过时,确定第二消息来自证书密钥管理服务器。可见,该实施方式使得通信密钥配置装置800可获知该通信密钥来源的合法性。
一种可选的实施方式中,通信单元801,还用于向证书密钥管理服务器请求第一证书和第二证书。
一种可选的实施方式中,通信单元801向证书密钥管理服务器请求第二证书,具体为:向证书密钥管理服务器发送第三消息,该第三消息包括第一证书和第二公钥;接收第四消息;第四消息是证书密钥管理服务器利用第一证书验证所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证后发送的;第四消息中包括证书密钥管理服务器基于第二公钥生成的第二证书。
一种可选的实施方式中,第三消息中还包括第三签名。处理单元802在通信单元801向证书密钥管理服务器发送第三消息之前,根据第二公钥和第一证书对应的第一私钥,生成第三签名;所述第三签名用于所述证书密钥管理服务器结合所述第一证书验证所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证。从而,使得证书密钥管理服务器根据该第三签名,获知该通信密钥配置装置800具有利用第二证书请求通信密钥的身份凭证,从而及时为该通信密钥配置装置800分配第二证书。
一种可选的实施方式中,通信单元801向证书密钥管理服务器请求第一证书,具体为:
向证书密钥管理服务器发送第五消息;第五消息包括设备证书和第一公钥;
接收第六消息;第六消息是证书密钥管理服务器利用设备证书验证第一终端具有请求第一证书的身份凭证后发送的;第六消息中包括证书密钥管理服务器基于第一公钥生成的第一证书。
可选的,第五消息中还包括第四签名。处理单元802在通信单元801向证书密钥管理服务器发送第五消息之前,根据第一公钥和所述设备证书对应的第三私钥,生成第四签名;第四签名用于证书密钥管理服务器结合设备证书验证第一终端具有请求第一证书的身份凭证。从而,使得证书密钥管理服务器根据该第四签名,获知该通信密钥配置装置800具有请求第一证书的身份凭证,从而及时为该通信密钥配置装置800分配第一证书。
一种可选的实施方式中,处理单元802在利用所述第二证书对应的第二私钥,解密所述通信密钥的密文,获得所述通信密钥之后,可利用通信密钥对待传输数据进行加密,获得待传输数据的密文,即上传的数据的密文;进而,由通信单元801将该待传输数据的密文上传到云服务器。
又一实施例中,该通信密钥配置装置800可以执行上述方法实施例中云服务器的相关操作,图8中所示的通信密钥配置装置800可以为图1或图2所示的系统中的云服务器,或为云服务器中的一个器件,例如芯片或集成电路等。该通信密钥配置装置800中:通信单元801,可用于获取或接收证书密钥管理服务器分配给第一终端的通信密钥;处理单元802,可用于基于该通信密钥对第一终端上传的数据的密文进行解密,获得数据。从而,有利于及时对自动驾驶等应用的优化。
图9示出了通信密钥配置装置900的示意性框图。
一种实现方式中,通信密钥配置装置900对应上述通信密钥配置方法中的证书密钥管理服务器。可选的,通信密钥配置装置900为执行上述各方法实施例的证书密钥管理服务器中的装置,如芯片、芯片系统、或处理器等。该通信密钥配置装置900可用于实现上述方法实施例中描述的方法,具体可以参见上述方法实施例中的说明。
另一种实现方式中,通信密钥配置装置900对应上述通信密钥配置方法中的第一终端。可选的,通信密钥配置装置900为执行上述各方法实施例的第一终端中的装置,如芯片、芯片系统、或处理器等,或如图1中所示的MDC、Tbox、GW等车载设备。
该通信密钥配置装置900可用于实现上述方法实施例中描述的方法,具体可以参见上述方法实施例中的说明。
通信密钥配置装置900可以包括一个或多个处理器901。处理器901可以是通用处理器或者专用处理器等。通信密钥配置装置900还可以包括收发器905。收发器905可以称为收发单元、收发机、或收发电路等,用于实现收发功能。收发器905可以包括接收器和发送器,接收器可以称为接收机或接收电路等,用于实现接收功能;发送器可以称为发送机或发送电路等,用于实现发送功能。可选的,通信密钥配置装置900中可以包括一个或多个存储器902,其上可以存有指令904,该指令904可为计算机程序,所述计算机程序可在通信密钥配置装置900上被运行,使得通信密钥配置装置900执行上述方法实施例中描述的方法。可选的,所述存储器902中还可以存储有数据。通信密钥配置装置900和存储器902可以单独设置,也可以集成在一起。
一种实施方式中,对于通信密钥配置装置900用于实现上述方法实施例中证书密钥管理服务器的功能:
处理器901用于执行图3至图5中任一附图所示的步骤S303、S304;或者执行图6中的步骤S603、S604;或者执行图7中的步骤S703、S704。
收发器905用于执行图3至图5中任一附图所示的步骤S302、S305、S306;或者执行图6中的步骤S602、S605;或者执行图7中的步骤S702、S705。
另一种实施方式中,对于通信密钥配置装置900用于实现上述方法实施例中第一终端的功能:
收发器905用于执行图3至图5中任一附图所示的通信密钥配置方法中步骤S301以及接收第二消息的操作;或者用于执行图6中的步骤S601以及接收第六消息,或者执行图7中的步骤S701以及接收第四消息。
又一种实施方式中,对于通信密钥配置装置900用于实现上述方法实施例中云服务器的功能:
收发器905用于执行图3至图5中任一附图所示的通信密钥配置方法中获得通信密钥的操作;或者数据加密方法中接收数据的密文的操作;
处理器901用于执行数据解密方法中数据解密的相关操作。
在一种实现方式中,处理器901中可以包括用于实现接收和发送功能的收发器。例如该收发器可以是收发电路,或者是接口,或者是接口电路。用于实现接收和发送功能的收发电路、接口或接口电路可以是分开的,也可以集成在一起。上述收发电路、接口或接口电路可以用于代码/数据的读写,或者,上述收发电路、接口或接口电路可以用于信号的传输或传递。
在一种实现方式中,处理器901可以存有指令703,该指令可为计算机程序,计算机程序903在处理器901上运行,可使得通信密钥配置装置900执行上述方法实施例中描述的方法。计算机程序903可能固化在处理器901中,该种情况下,处理器901可能由硬件实现。
在一种实现方式中,通信密钥配置装置900可以包括电路,所述电路可以实现前述方法实施例中发送或接收或者通信的功能。本申请中描述的处理器和收发器可实现在集成电路(integrated circuit,IC)、模拟IC、射频集成电路(radio frequency integrated circuit,RFIC)、混合信号IC、专用集成电路(application specific integrated circuit,ASIC)、印刷电路板(printed circuit board,PCB)、电子设备等上。该处理器和收发器也可以用各种IC工艺技术来制造,例如互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)、N型金属氧化物半导体(nMetal-oxide-semiconductor,NMOS)、P型金属氧化物半导体(positive channel metal oxide semiconductor,PMOS)、双极结型晶体管(bipolar junction transistor,BJT)、双极CMOS(BiCMOS)、硅锗(SiGe)、砷化镓(GaAs)等。
以上实施例描述中的通信密钥配置装置900可以是证书密钥管理服务器或其中的部件;或者以上实施例描述中的通信密钥配置装置900可以是第一终端,如车辆,或第一终端中的部件,如车载设备等;或者以上实施例描述中的通信密钥配置装置900可以是云服务器或云服务器中的部件等。通信密钥配置装置900可以是独立的设备或者可以是较大设备的一部分。例如通信密钥配置装置900可以是:
(1)独立的集成电路IC,或芯片,或,芯片系统或子系统;
(2)可嵌入在其他设备内的模块;
(3)移动单元、车载设备云设备、人工智能设备等等。
对于通信密钥配置装置900可以是芯片或芯片系统的情况,可参见图10所示的芯片的结构示意图。图10所示的芯片包括处理器1001和接口1002。其中,处理器1001的数量可以是一个或多个,接口1002的数量可以是多个。
对于芯片用于实现上述方法实施例中证书密钥管理服务器的功能:
处理器1001用于执行图3至图5中任一附图所示的步骤S303、S304;或者执行图6中的步骤S603、S604;或者执行图7中的步骤S703、S704。
接口1002用于执行图3至图5中任一附图所示的步骤S302、S305、S306;或者执行图6中的步骤S602、S605;或者执行图7中的步骤S702、S705。
对于芯片用于实现上述方法实施例中第一终端的功能:
接口1002用于执行图3至图5中任一附图所示的通信密钥配置方法中步骤S301以及接收第二消息的操作;或者用于执行图6中的步骤S601以及接收第六消息,或者执行图7中的步骤S701以及接收第四消息。
对于芯片用于实现上述方法实施例中云服务器的功能:
接口1002用于执行图3至图5中任一附图所示的通信密钥配置方法中获得通信密钥的操作;或者数据加密方法中接收数据的密文的操作;
处理器1001用于执行数据解密方法中数据解密的相关操作。
可选的,该芯片还可以执行上述方法实施例中的相关实施方式,此处不再详述。
本领域技术人员还可以了解到本申请实施例列出的各种说明性逻辑块(illustrative logical block)和步骤(step)可以通过电子硬件、电脑软件,或两者的结合进行实现。这样的功能是通过硬件还是软件来实现取决于特定的应用和整个系统的设计要求。本领域技术人员可以对于每种特定的应用,可以使用各种方法实现所述的功能,但这种实现不应被理解为超出本申请实施例保护的范围。
本申请还提供一种通信密钥配置系统,该通信密钥配置系统可以包括上述三种实施例分别所述的三种通信密钥配置装置中的至少两种装置。例如,该通信密钥配置系统包括,一种通信密钥配置装置,该通信密钥配置装置可执行上述方法实施例中证书密钥管理服务器的相关操作;另一种通信密钥配置装置,该通信密钥配置装置可执行上述方法实施例中第一终端的相关操作。再例如,该通信密钥配置系统包括,一种通信密钥配置装置,该通信密钥配置装置可执行上述方法实施例中证书密钥管理服务器的相关操作;另一种通信密钥配置装置,该通信密钥配置装置可执行上述方法实施例中第一终端的相关操作;以及又一种通信密钥配置装置,该通信密钥配置装置可执行上述方法实施例中云服务器的相关操作。
本申请还提供一种通信密钥配置系统,该通信密钥配置系统可以包括证书密钥管理服务器、第一终端以及云服务器中的至少两种设备。例如,该通信密钥配置系统包括上述方法实施例中所述的证书密钥管理服务器;以及上述方法实施例中第一终端。再例如,该通信密钥配置系统包括上述方法实施例中证书密钥管理服务器、上述方法实施例中第一终端以及上述方法实施例中云服务器。
本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机可读存储介质被计算机执行时实现上述任一方法实施例的功能。
本申请还提供了一种计算机程序产品,该计算机程序产品被计算机执行时实现上述任一方法实施例的功能。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机程序。在计算机上加载和执行所述计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机程序可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机程序可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,高密度数字视频光盘(digital video disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (46)

  1. 一种通信密钥配置方法,其特征在于,包括:
    证书密钥管理服务器接收来自第一终端的第一消息,所述第一消息包含第一证书和第二证书;
    所述证书密钥管理服务器利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证;
    所述证书密钥管理服务器利用所述第二证书,对分配给所述第一终端的通信密钥进行加密,获得所述通信密钥的密文;
    所述证书密钥管理服务器向所述第一终端发送第二消息,所述第二消息包含所述通信密钥的密文。
  2. 根据权利要求1所述的方法,其特征在于,所述第一消息中还包括第一签名,
    所述证书密钥管理服务器利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证,包括:
    所述证书密钥管理服务器根据所述第一消息和所述第一证书中的第一公钥,校验所述第一签名;
    所述证书密钥管理服务器在所述第一签名校验通过时,确定所述第一终端具有所述第一证书对应的第一私钥,所述第一私钥用于指示所述第一终端具有利用所述第二证书请求通信密钥的身份凭证。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第二消息还包含第二签名;
    所述证书密钥管理服务器向所述第一终端发送第二消息之前,所述方法还包括:
    所述证书密钥管理服务器根据所述通信密钥的密文和自身证书对应的私钥,生成所述第二签名;
    所述第二签名用于指示所述第二消息来自所述证书密钥管理服务器。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述证书密钥管理服务器接收来自第一终端的第一消息之前,所述方法还包括:
    所述证书密钥管理服务器向所述第一终端发送第四消息,所述第四消息包括所述第二证书。
  5. 根据权利要求4所述的方法,其特征在于,所述证书密钥管理服务器向所述第一终端发送所述第四消息之前,所述方法还包括:
    所述证书密钥管理服务器接收来自第一终端的第三消息,所述第三消息包含所述第一证书和第二公钥;
    所述证书密钥管理服务器利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证;
    所述证书密钥管理服务器利用所述第二公钥,生成所述第二证书。
  6. 根据权利要求5所述的方法,其特征在于,所述第三消息中还包括第三签名;
    所述证书密钥管理服务器利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证,包括:
    所述证书密钥管理服务器根据所述第二公钥和所述第一证书中的第一公钥,校验所述第三签名;
    所述证书密钥管理服务器在所述第三签名校验通过时,确定所述第一终端具有所述第一证书对应的第一私钥;所述第一私钥用于指示所述第一终端具有利用所述第二证书请求通信密钥的身份凭证。
  7. 根据权利要求1至6任一项所述的方法,其特征在于,所述证书密钥管理服务器接收来自第一终端的第一消息之前,所述方法还包括:
    所述证书密钥管理服务器向所述第一终端发送第六消息,所述第六消息包括所述第一证书。
  8. 根据权利要求7所述的方法,其特征在于,所述证书密钥管理服务器向所述第一终端发送所述第六消息之前,所述方法还包括:
    所述证书密钥管理服务器接收来自第一终端的第五消息;所述第五消息包括设备证书和与所述第一证书对应的第一公钥;
    所述证书密钥管理服务器利用所述设备证书,验证所述第一终端具有请求所述第一证书的身份凭证;
    所述证书密钥管理服务器基于所述与所述第一证书对应的第一公钥生成所述第一证书。
  9. 根据权利要求8所述的方法,其特征在于,所述第五消息中还包括第四签名;
    所述证书密钥管理服务器利用所述设备证书,验证所述第一终端具有请求所述第一证书的身份凭证,包括:
    所述证书密钥管理服务器根据所述与所述第一证书对应的第一公钥和所述设备证书中的第三公钥,校验所述第四签名;
    所述证书密钥管理服务器在所述第四签名校验通过时,确定所述第一终端具有所述设备证书对应的第三私钥,所述第三私钥用于指示所述第一终端具有请求所述第一证书的身份凭证。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,所述方法还包括:
    所述证书密钥管理服务器通过安全通道,向云服务器传输所述分配给所述第一终端的通信密钥。
  11. 一种通信密钥配置方法,其特征在于,包括:
    第一终端向证书密钥管理服务器发送第一消息,所述第一消息包含第一证书和第二证书;其中,所述第一证书用于验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证;
    所述第一终端接收第二消息,所述第二消息包含通信密钥的密文,所述通信密钥的密文为经由所述第二证书对所述第一终端的通信密钥进行加密之后的密文;
    所述第一终端利用所述第二证书对应的第二私钥,解密所述通信密钥的密文,获得所述通信密钥。
  12. 根据权利要求11所述的方法,其特征在于,所述第二消息与所述第一终端具有利用所述第二证书请求通信密钥的身份凭证的验证结果相关联。
  13. 根据权利要求11或12所述的方法,其特征在于,所述第一消息中还包括第一签名,
    所述第一终端向证书密钥管理服务器发送第一消息之前,所述方法还包括:
    第一终端根据所述第一证书、所述第二证书和所述第一证书对应的第一私钥,生成所述第一签名;
    所述第一签名用于所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证的验证。
  14. 根据权利要求11至13任一项所述的方法,其特征在于,所述第二消息还包含第二签名;
    所述第一终端接收第二消息之后,所述方法还包括:
    所述第一终端利用所述证书密钥管理服务器的证书中的公钥,校验所述第二签名;
    所述第一终端在所述第二签名校验通过时,确定所述第二消息来自所述证书密钥管理服务器。
  15. 根据权利要求11至13任一项所述的方法,其特征在于,所述第一终端向证书密钥管理服务器发送第一消息之前,所述方法还包括:
    所述第一终端向所述证书密钥管理服务器请求所述第二证书。
  16. 根据权利要求15所述的方法,其特征在于,所述第一终端向所述证书密钥管理服务器请求所述第二证书,包括:
    所述第一终端向所述证书密钥管理服务器发送第三消息,所述第三消息包括所述第一证书和第二公钥;
    所述第一终端接收第四消息;所述第四消息中包括经由所述第二公钥生成的所述第二证书。
  17. 根据权利要求16所述的方法,其特征在于,所述第三消息中还包括第三签名;
    所述第一终端向所述证书密钥管理服务器发送第三消息之前,所述方法还包括:
    所述第一终端根据所述第二公钥和所述第一证书对应的第一私钥,生成所述第三签名;
    所述第三签名用于所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证的验证。
  18. 根据权利要求11至17任一项所述的方法,其特征在于,所述第一终端向证书密钥管理服务器发送第一消息之前,所述方法还包括:
    所述第一终端向所述证书密钥管理服务器请求所述第一证书。
  19. 根据权利要求18所述的方法,其特征在于,所述第一终端向所述证书密钥管理服务器请求所述第一证书,包括:
    所述第一终端向所述证书密钥管理服务器发送第五消息;所述第五消息包括设备证书和 与所述第一证书对应的第一公钥,所述设备证书用于所述第一终端具有请求所述第一证书的身份凭证的验证;
    所述第一终端接收第六消息;所述第六消息中包括经由所述第一公钥生成的所述第一证书。
  20. 根据权利要求19所述的方法,其特征在于,所述第五消息中还包括第四签名;
    所述第一终端向证书密钥管理服务器发送第五消息之前,所述方法还包括:
    所述第一终端根据所述与所述第一证书对应的第一公钥和所述设备证书对应的第三私钥,生成所述第四签名;
    所述第四签名用于所述第一终端具有请求所述第一证书的身份凭证的验证。
  21. 根据权利要求11至20任一项所述的方法,其特征在于,所述第一终端利用所述第二证书对应的第二私钥,解密所述通信密钥的密文,获得所述通信密钥之后,所述方法还包括:
    所述第一终端利用所述通信密钥对待传输数据进行加密,获得所述待传输数据的密文;
    所述第一终端将所述待传输数据的密文上传到云服务器。
  22. 一种通信密钥配置装置,其特征在于,包括:
    通信单元,用于接收来自第一终端的第一消息,所述第一消息包含第一证书和第二证书;
    处理单元,用于利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证;
    所述处理单元,还用于利用所述第二证书,对分配给所述第一终端的通信密钥进行加密,获得所述通信密钥的密文;
    所述通信单元,还用于向所述第一终端发送第二消息,所述第二消息包含所述通信密钥的密文。
  23. 根据权利要求22所述的装置,其特征在于,所述第一消息中还包括第一签名,
    所述处理单元利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证,具体为:
    根据所述第一消息和所述第一证书中的第一公钥,校验所述第一签名;
    在所述第一签名校验通过时,确定所述第一终端具有所述第一证书对应的第一私钥,所述第一私钥用于指示所述第一终端具有利用所述第二证书请求通信密钥的身份凭证。
  24. 根据权利要求22或23所述的装置,其特征在于,所述第二消息还包含第二签名;
    所述通信单元向所述第一终端发送第二消息之前,所述处理单元,还用于根据所述通信密钥的密文和自身证书对应的私钥,生成所述第二签名;
    所述第二签名用于指示所述第二消息来自所述证书密钥管理服务器。
  25. 根据权利要求22至24任一项所述的装置,其特征在于,
    所述通信单元,还用于向所述第一终端发送第四消息,所述第四消息包括所述第二证书。
  26. 根据权利要求25所述的装置,其特征在于,
    所述通信单元,还用于在向所述第一终端发送所述第四消息之前,接收来自第一终端的第三消息,所述第三消息包含所述第一证书和第二公钥;
    所述处理单元,还用于利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证;以及利用所述第二公钥,生成所述第二证书。
  27. 根据权利要求26所述的装置,其特征在于,所述第三消息中还包括第三签名;
    所述处理单元利用所述第一证书,验证所述第一终端具有利用所述第二证书请求通信密钥的身份凭证,具体为:
    根据所述第二公钥和所述第一证书中的第一公钥,校验所述第三签名;
    在所述第三签名校验通过时,确定所述第一终端具有所述第一证书对应的第一私钥;所述第一私钥用于指示所述第一终端具有利用所述第二证书请求通信密钥的身份凭证。
  28. 根据权利要求22至27任一项所述的装置,其特征在于,
    所述通信单元,还用于在接收来自第一终端的第一消息之前,向所述第一终端发送第六消息,所述第六消息包括所述第一证书。
  29. 根据权利要求28所述的装置,其特征在于,
    所述通信单元,还用于在向所述第一终端发送所述第六消息之前,接收来自第一终端的第五消息;所述第五消息包括设备证书和与所述第一证书对应的第一公钥;
    所述处理单元,还用于利用所述设备证书,验证所述第一终端具有请求所述第一证书的身份凭证;以及基于所述与所述第一证书对应的第一公钥生成所述第一证书。
  30. 根据权利要求29所述的装置,其特征在于,所述第五消息中还包括第四签名;
    所述处理单元,利用所述设备证书,验证所述第一终端具有请求所述第一证书的身份凭证,具体为:
    根据所述与所述第一证书对应的第一公钥和所述设备证书中的第三公钥,校验所述第四签名;
    在所述第四签名校验通过时,确定所述第一终端具有所述设备证书对应的第三私钥,所述第三私钥用于指示所述第一终端具有请求所述第一证书的身份凭证。
  31. 根据权利要求22至30任一项所述的装置,其特征在于,
    所述通信单元,还用于通过安全通道,向云服务器传输所述分配给所述第一终端的通信密钥。
  32. 一种通信密钥配置装置,其特征在于,包括:
    通信单元,用于向证书密钥管理服务器发送第一消息;所述第一消息包含第一证书和第二证书;其中,所述第一证书用于验证第一终端具有利用所述第二证书请求通信密钥的身份凭证;
    所述通信单元,还用于接收第二消息;所述第二消息包含通信密钥的密文,所述通信密钥的密文为经由所述第二证书对所述第一终端的通信密钥进行加密之后的密文;
    处理单元,利用所述第二证书对应的第二私钥,解密所述通信密钥的密文,获得所述通 信密钥。
  33. 根据权利要求32所述的装置,其特征在于,所述第二消息与所述第一终端具有利用所述第二证书请求通信密钥的身份凭证的验证结果相关联。
  34. 根据权利要求32或33所述的装置,其特征在于,所述第一消息中还包括第一签名,
    所述处理单元在所述通信单元向证书密钥管理服务器发送第一消息之前,还用于根据第一证书、第二证书和所述第一证书对应的第一私钥,生成所述第一签名;
    所述第一签名用于所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证的验证。
  35. 根据权利要求32至34任一项所述的装置,其特征在于,所述第二消息还包含第二签名;
    所述处理单元在所述通信单元接收第二消息之后,还用于利用所述证书密钥管理服务器的证书中的公钥,校验所述第二签名;以及在所述第二签名校验通过时,确定所述第二消息来自所述证书密钥管理服务器。
  36. 根据权利要求32至35任一项所述的装置,其特征在于,
    所述通信单元,还用于向所述证书密钥管理服务器请求所述第二证书。
  37. 根据权利要求36所述的装置,其特征在于,所述通信单元向所述证书密钥管理服务器请求所述第二证书,具体为:
    向所述证书密钥管理服务器发送第三消息,所述第三消息包括所述第一证书和第二公钥;
    接收第四消息;所述第四消息中包括经由所述第二公钥生成的所述第二证书。
  38. 根据权利要求37所述的装置,其特征在于,所述第三消息中还包括第三签名;
    所述处理单元在所述通信单元向所述证书密钥管理服务器发送第三消息之前,根据所述第二公钥和所述第一证书对应的第一私钥,生成所述第三签名;
    所述第三签名用于所述第一终端具有利用所述第二证书请求所述通信密钥的身份凭证的验证。
  39. 根据权利要求32至38任一项所述的装置,其特征在于,
    所述通信单元,还用于在向证书密钥管理服务器发送第一消息之前,向所述证书密钥管理服务器请求所述第一证书。
  40. 根据权利要求39所述的装置,其特征在于,所述通信单元向所述证书密钥管理服务器请求所述第一证书,具体为:
    向所述证书密钥管理服务器发送第五消息;所述第五消息包括设备证书和与所述第一证书对应的第一公钥,所述设备证书用于所述第一终端具有请求所述第一证书的身份凭证的验证;
    接收第六消息;所述第六消息中包括经由所述第一公钥生成的所述第一证书。
  41. 根据权利要求40所述的装置,其特征在于,所述第五消息中还包括第四签名;
    所述处理单元,还用于在所述通信单元向证书密钥管理服务器发送第五消息之前,根据所述与所述第一证书对应的第一公钥和所述设备证书对应的第三私钥,生成所述第四签名;
    所述第四签名用于所述第一终端具有请求所述第一证书的身份凭证的验证。
  42. 根据权利要求32至41任一项所述的装置,其特征在于,
    所述处理单元,还用于在利用所述第二证书对应的第二私钥,解密所述通信密钥的密文,获得所述通信密钥之后,利用所述通信密钥对待传输数据进行加密,获得所述待传输数据的密文;
    所述通信单元,还用于将所述待传输数据的密文上传到云服务器。
  43. 一种通信密钥配置装置,其特征在于,所述通信密钥配置装置包括至少一个处理器和通信接口,所述通信接口用于发送和/或接收数据,所述至少一个处理器用于调用至少一个存储器中存储的计算机程序,以使得所述通信密钥配置装置实现如权利要求1至10中任一项所述的方法,或者以使得所述通信密钥配置装置实现如权利要求11至21中任一项所述的方法。
  44. 一种通信密钥配置系统,其特征在于,包括证书密钥管理服务器、第一终端和云服务器,其中:
    所述证书密钥管理服务器包含如权利要求22至31中任一项所述的通信密钥配置装置;
    所述第一终端包含如权利要求32至42中任一项所述的通信密钥配置装置;
    所述云服务器,用于获取所述证书密钥管理服务器为所述第一终端分配的通信密钥。
  45. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当所述计算机程序在一个或多个处理器上运行时,实现如权利要求1至10中任一项所述的方法,或实现如权利要求11至21中任一项所述的方法。
  46. 一种计算机程序产品,其特征在于,包括计算机指令,当所述计算机指令在计算机上运行时,使得所述计算机执行如权利要求1至10任一项所述的方法,或如权利要求11至21任一项所述的方法。
PCT/CN2022/075864 2021-02-10 2022-02-10 通信密钥配置方法及装置 WO2022171177A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP22752337.0A EP4283955A1 (en) 2021-02-10 2022-02-10 Communication key configuration method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110184217.2 2021-02-10
CN202110184217.2A CN114915942A (zh) 2021-02-10 2021-02-10 通信密钥配置方法及装置

Publications (1)

Publication Number Publication Date
WO2022171177A1 true WO2022171177A1 (zh) 2022-08-18

Family

ID=82761260

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/075864 WO2022171177A1 (zh) 2021-02-10 2022-02-10 通信密钥配置方法及装置

Country Status (3)

Country Link
EP (1) EP4283955A1 (zh)
CN (1) CN114915942A (zh)
WO (1) WO2022171177A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116828457A (zh) * 2023-08-30 2023-09-29 四川轻化工大学 应用于酒窖中智能无线监测方法、系统和介质

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108924147A (zh) * 2018-07-17 2018-11-30 中国联合网络通信集团有限公司 通信终端数字证书签发的方法、服务器以及通信终端
CN109639427A (zh) * 2017-10-09 2019-04-16 华为技术有限公司 一种数据发送的方法及设备
JP2019161521A (ja) * 2018-03-15 2019-09-19 大日本印刷株式会社 車両鍵配信システムおよび汎用スキャンツール
CN110417799A (zh) * 2019-08-05 2019-11-05 斑马网络技术有限公司 车机中公钥证书的管理方法、装置、设备及存储介质
CN111200495A (zh) * 2018-11-20 2020-05-26 西安华为技术有限公司 一种车联网的证书处理方法、装置和系统
US20200195633A1 (en) * 2018-12-12 2020-06-18 Thunder Power New Energy Vehicle Development Company Limited Contactless car sharing security protocol
US20200220737A1 (en) * 2019-01-09 2020-07-09 Hyundai Motor Company Method for Collecting and Managing Event Data of a Vehicle
CN111917685A (zh) * 2019-05-07 2020-11-10 华为技术有限公司 一种申请数字证书的方法
CN112055330A (zh) * 2020-08-31 2020-12-08 郑州信大捷安信息技术股份有限公司 一种基于5g的v2x车联网安全通信系统及方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109639427A (zh) * 2017-10-09 2019-04-16 华为技术有限公司 一种数据发送的方法及设备
JP2019161521A (ja) * 2018-03-15 2019-09-19 大日本印刷株式会社 車両鍵配信システムおよび汎用スキャンツール
CN108924147A (zh) * 2018-07-17 2018-11-30 中国联合网络通信集团有限公司 通信终端数字证书签发的方法、服务器以及通信终端
CN111200495A (zh) * 2018-11-20 2020-05-26 西安华为技术有限公司 一种车联网的证书处理方法、装置和系统
US20200195633A1 (en) * 2018-12-12 2020-06-18 Thunder Power New Energy Vehicle Development Company Limited Contactless car sharing security protocol
US20200220737A1 (en) * 2019-01-09 2020-07-09 Hyundai Motor Company Method for Collecting and Managing Event Data of a Vehicle
CN111917685A (zh) * 2019-05-07 2020-11-10 华为技术有限公司 一种申请数字证书的方法
CN110417799A (zh) * 2019-08-05 2019-11-05 斑马网络技术有限公司 车机中公钥证书的管理方法、装置、设备及存储介质
CN112055330A (zh) * 2020-08-31 2020-12-08 郑州信大捷安信息技术股份有限公司 一种基于5g的v2x车联网安全通信系统及方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116828457A (zh) * 2023-08-30 2023-09-29 四川轻化工大学 应用于酒窖中智能无线监测方法、系统和介质
CN116828457B (zh) * 2023-08-30 2023-11-17 四川轻化工大学 应用于酒窖中智能无线监测方法、系统和介质

Also Published As

Publication number Publication date
CN114915942A (zh) 2022-08-16
EP4283955A1 (en) 2023-11-29

Similar Documents

Publication Publication Date Title
EP3642996B1 (en) Authorization key escrow
CN109428875B (zh) 基于服务化架构的发现方法及装置
CN107659406B (zh) 一种资源操作方法及装置
CN104094267B (zh) 安全共享来自源装置的媒体内容的方法、装置和系统
CN107317677B (zh) 密钥存储及设备身份认证方法、装置
CN112913189B (zh) 一种ota升级方法及装置
WO2022141574A1 (en) Key provisioning method and related products
WO2022160124A1 (zh) 一种服务授权管理方法及装置
WO2011107000A1 (zh) 对等网络中的资源控制方法、装置和系统
WO2019019853A1 (zh) 处理数据的方法、终端设备和网络设备
CN110677241A (zh) 一种量子网络虚拟化架构方法与装置
CN114547583A (zh) 身份认证系统、方法、装置、设备及计算机可读存储介质
CN111181944B (zh) 通信系统及信息发布方法、装置、介质、设备
KR101839048B1 (ko) 사물 인터넷 환경의 종단간 보안 플랫폼
CN114142995B (zh) 面向区块链中继通信网络的密钥安全分发方法及装置
WO2022171177A1 (zh) 通信密钥配置方法及装置
CN113141333B (zh) 入网设备的通信方法、设备、服务器、系统及存储介质
US20140181508A1 (en) Communication device and computer program product
CN113841360A (zh) 蝴蝶密钥扩展方案的实现
CN113206815A (zh) 用于加解密的方法、可编程交换机和计算机程序产品
KR101165350B1 (ko) 유비쿼터스 컴퓨팅 네트워크 환경에서 커뮤니티 컴퓨팅을 위한 디바이스 멤버 인증방법
US11856091B2 (en) Data distribution system, data processing device, and program
CN114500064A (zh) 一种通信安全验证方法、装置、存储介质及电子设备
CN114143038A (zh) 面向区块链中继通信网络的密钥安全分发方法及装置
US11171786B1 (en) Chained trusted platform modules (TPMs) as a secure bus for pre-placement of device capabilities

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022752337

Country of ref document: EP

Effective date: 20230821

NENP Non-entry into the national phase

Ref country code: DE