WO2024120051A1 - 软件程序的权限控制方法及设备 - Google Patents

软件程序的权限控制方法及设备 Download PDF

Info

Publication number
WO2024120051A1
WO2024120051A1 PCT/CN2023/127463 CN2023127463W WO2024120051A1 WO 2024120051 A1 WO2024120051 A1 WO 2024120051A1 CN 2023127463 W CN2023127463 W CN 2023127463W WO 2024120051 A1 WO2024120051 A1 WO 2024120051A1
Authority
WO
WIPO (PCT)
Prior art keywords
key information
key
private key
information
encrypted
Prior art date
Application number
PCT/CN2023/127463
Other languages
English (en)
French (fr)
Inventor
李晨
郑建伟
Original Assignee
亿咖通(湖北)技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 亿咖通(湖北)技术有限公司 filed Critical 亿咖通(湖北)技术有限公司
Publication of WO2024120051A1 publication Critical patent/WO2024120051A1/zh

Links

Definitions

  • the present application relates to the field of computer technology, and in particular to a method and device for controlling permissions of a software program.
  • the original version of the software is first obtained, and then the original software is encrypted, signed, and other operations are performed to protect the security of the original software.
  • the present application provides a method and device for controlling the permissions of a software program, so as to avoid the situation in which the original software is encrypted and protected during the integration of the vehicle system, while authorization verification and access permission designation for the original software cannot be performed.
  • the present application provides a method for controlling permissions of a software program, the method being applied to an implementation device, the method comprising:
  • the key information is used to decrypt the encrypted software program, and the encrypted key information is obtained by the first participant device encrypting the key information using the first public key information sent by the second participant device;
  • the private key issuance request includes the second public key information, so that the second participant device uses the second public key information to encrypt the first private key information; wherein the first public key in the first public key information and the first private key in the first private key information are an asymmetric key pair; the second public key in the second public key information and the second private key in the second private key information are an asymmetric key pair;
  • Receive the encrypted first private key information sent by the second participant device use the second private key information to decrypt the encrypted first private key information to obtain the first private key information; use the first private key information to decrypt the encrypted key information to obtain the key information, and use the key information to decrypt the encrypted software program and then run the software program.
  • the implementer device After the implementer device receives the encrypted software program and the encrypted key information sent by the first participant device, the implementer device receives a private key issuance request sent by the implementer device, the private key issuance request includes the second public key information, and uses the second public key information to encrypt the first private key information to obtain the encrypted first private key information; wherein the key information is used to decrypt the encrypted software program, and the encrypted key information is obtained after the first participant device encrypts the key information using the first public key information sent by the second participant device;
  • the encrypted first private key information is sent to the implementation party's device, so that the implementation party's device uses the second private key information to decrypt the encrypted first private key information and obtains the first private key information, so that the implementation party's device uses the first private key information to decrypt the encrypted key information and obtains the key information, so that the implementation party's device uses the key information to decrypt the encrypted software program and then runs the software program, wherein the first public key in the first public key information and the first private key in the first private key information are an asymmetric key pair; the second public key in the second public key information and the second private key in the second private key information are an asymmetric key pair.
  • the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the computer program, the method described in the first aspect and/or the second aspect is implemented.
  • FIG1 is a schematic diagram of a flowchart of a method for controlling permissions of a software program provided in an embodiment of the present application
  • FIG2 is a flow chart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • FIG3 is a flowchart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the structure of a control device provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG6 is a flow chart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • FIG7 is a flow chart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • FIG8 is a flow chart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • FIG9 is a flow chart of another method for controlling permissions of a software program provided in an embodiment of the present application.
  • the original version of the software is first obtained, and then the original software is encrypted, signed, and other operations are performed to protect the security of the original software.
  • the embodiment of the present application provides a permission control for a software program, aiming to avoid the situation that the related technology cannot perform authorization verification and designation of access rights for the original software while encrypting and protecting the original software during the integration of the vehicle system.
  • the technical concept of the present application is: the second participant device sends the first public key information to the first participant device, and the first participant device uses the first public key information to encrypt the key information to obtain the encrypted key information; the first participant device sends the encrypted software program and the encrypted key information to the implementation party device; the key information is used to decrypt the encrypted software program; the implementation party device generates and sends a private key issuance request to the second participant device, and the private key issuance request includes the second public key information, and the second participant device uses the second public key information to encrypt the first private key information; the second participant device sends the encrypted first private key information to the implementation party device, and uses the second private key information to decrypt the encrypted first private key information to obtain the first private key information; and uses the first private key information to decrypt
  • the method of the present application first controls the first participant device through the second participant device to encrypt the obtained original version of the software, and the first participant device sends the encrypted file to the implementation party device.
  • the implementation party device sends the software key through a trusted online and deploys the key in a secure storage form.
  • the original software can be encrypted and protected, and the authorization verification and access rights of the original software can be specified.
  • FIG. 1 is a flow chart of a method for controlling permissions of a software program provided in an embodiment of the present application. As shown in FIG. 1 , the method includes:
  • the second participant device sends first public key information to the first participant device.
  • the execution subject of this embodiment can be an electronic device, or a terminal device, or a permission control processing device or device of a software program, or other devices or equipment that can execute this embodiment, and there is no limitation on this.
  • the execution subject is introduced as an electronic device.
  • the second participant device is responsible for generating an asymmetric key pair Kpri (asymmetric private key) & Kpub (asymmetric public key), namely the first public key and the first private key, and is also responsible for requesting the visa server to generate a public key certificate Certpub.
  • the second participant device sends the first public key information to the first participant device through interface communication or data bus communication.
  • the second participant device and the first participant device have the right to access the original unencrypted software.
  • the first public key information includes the first public key and the first public key certificate.
  • the first private key information includes the first private key and the first public key certificate.
  • the first public key in the first public key information and the first private key in the first private key information are an asymmetric key pair.
  • the first participant device uses the first public key information to encrypt the key information to obtain the encrypted key information.
  • the first participant device is a device that directly obtains the original unencrypted software, and is responsible for encrypting the key information using the first public key information and obtaining the encrypted key information.
  • the key information is used to decrypt the encrypted software program; the key information includes a symmetric encryption key and an authentication key, the symmetric encryption key is used to encrypt the software program, and the authentication key is used to generate a message authentication code.
  • the software program included in the software can be one or more. Considering the security of the original unencrypted software during operation, the first participant device is used to protect the original unencrypted software.
  • S103 The first participant device sends the encrypted software program and encrypted key information to the implementer device.
  • the implementer device is responsible for compiling and packaging the encrypted software program and the encrypted key information.
  • the first participant device sends the encrypted software program and the encrypted key information to the implementer device through interface communication or data bus communication to complete the integration of the system software.
  • S104 The implementer's device generates a private key issuance request.
  • the implementer device in an environment where the second participant device is controlled, establishes a communication connection through a client of the second participant device within the implementer device, and sends a private key issuance instruction to the second participant device.
  • the corresponding device in the implementation party device that is connected to the second participant device requests the corresponding device in the implementation party device that is connected to the first participant device to generate a temporary encryption public key and a temporary encryption private key. That is, the second public key and the second private key.
  • the second public key information includes the second public key
  • the second private key information includes the second private key.
  • the implementer device first reads the software authorization status of the device from the One Time Program (OTP) memory. If the OTP data records that the device is not authorized to use the software, the implementer device returns an error and terminates the subsequent process. If the OTP data records that the device is authorized, the implementer device continues the subsequent process, that is, generates a temporary encryption public key and a temporary encryption private key.
  • OTP One Time Program
  • the second participant device may be a server, and the client of the second participant device within the implementer device may be an application device connected to the server.
  • S105 The implementer device sends a private key issuance request to the second participant device.
  • the private key issuance request includes the second public key information, so that the second participant device can use the second public key information to encrypt the first private key information.
  • the second participant device uses the second public key information to encrypt the first private key information to obtain the encrypted first private key information.
  • the second participant device sends the encrypted first private key information to the implementer device.
  • the second participant device sends the encrypted first private key information, i.e., the key file, to the corresponding device inside the implementer device that has a connection relationship with the second participant device in a trusted controlled environment.
  • the encrypted first private key information i.e., the key file
  • the implementer device uses the second private key information to decrypt the encrypted first private key information to obtain the first private key information; and uses the first private key information to decrypt the encrypted key information to obtain the key information, and uses the key information to decrypt the encrypted software program and then runs the software program.
  • the encrypted first private key information is decrypted using the second private key information to obtain the first private key information
  • the encrypted key information is decrypted using the first private key information to obtain the key information
  • the encrypted software program is decrypted using the key information to run the software program.
  • the second participant device sends the first public key information to the first participant device, and the first participant device uses the first public key information to encrypt the key information to obtain the encrypted key information;
  • the first participant device sends the encrypted software program and the encrypted key information to the implementation party device;
  • the key information is used to decrypt the encrypted software program;
  • the implementation party device generates and sends a private key issuance request to the second participant device, the private key issuance request includes the second public key information, and the second participant device uses the second public key information to encrypt the first private key information;
  • the second participant device sends the encrypted first private key information to the implementation party device, and uses the second private key information to decrypt the encrypted first private key information to obtain the first private key information; and uses the first private key information to decrypt the encrypted key information to obtain the key information, and uses the key information to decrypt the encrypted software program and then run the software program.
  • the method of the present application first controls the first participant device through the second participant device to encrypt the obtained original version of the software, and the first participant device sends the encrypted file to the implementation party device.
  • the implementation party device sends the software key through a trusted online and deploys the key in a secure storage form.
  • the original software can be encrypted and protected, and the authorization verification and access rights of the original software can be specified.
  • FIG. 2 is a flow chart of another method for controlling the permissions of a software program provided in an embodiment of the present application. As shown in FIG. 2 , the method includes:
  • the second participant device sends first public key information to the first participant device.
  • the first participant device uses the first public key information to encrypt the key information to obtain the encrypted key information.
  • S203 The first participant device sends the encrypted software program and encrypted key information to the implementer device.
  • S204 The implementer device sends the original identity information of the implementer device to the second participant device.
  • the client of the second participant device within the implementer device collects the original identity information of the client in a controllable environment, wherein the original identity information includes the device ID and the bound vehicle ID.
  • the second participant device generates authentication identity information based on the original identity information.
  • the second participant device generates the authentication identity information of the client according to the original identity information, wherein the authentication identity information is used for the two-way authentication and encryption network connection establishment process in the key distribution stage.
  • step S205 further includes the following steps:
  • the second participant device generates a third private key, a third public key and a third public key certificate according to the original identity information.
  • the second participant device generates an asymmetric key pair Kpri-conn and Kpub-conn uniquely bound to the client based on the original identity information, and requests the visa server to sign the public key to generate a public key certificate Certpub-conn.
  • the second participant device also forms a key file with the private key Kpri-conn and the public key certificate Certpub-conn (chain) in PKCS#12 format.
  • the corresponding device inside the implementer's device that is connected to the second participant's device writes the private key Kpri-conn and the certificate Certpub-conn (chain) into a secure storage area in a trusted controlled environment, and restricts the export of the private key Kpri-conn.
  • the second participant device sends the third private key and the third public key certificate as authentication identity information to the implementer device.
  • the second participant device sends the third private key and the third public key certificate as authentication identity information to the implementation device through a data bus or interface communication in a trusted controlled environment.
  • the second participant device sends authentication identity information to the implementer device.
  • the second participant device communicates with the client of the second participant device within the implementer device through a data bus or interface, and sends authentication identity information to the client of the second participant device within the implementer device.
  • S207 The implementer device generates a connection request according to the locally stored authentication identity information.
  • the implementation party device generates a connection request according to the client unique key Kpri-conn and certificate Certpub-conn of the second participant device inside the implementation party device in the locally stored authentication identity information.
  • the implementation device in an environment where the second participant device is controlled, the implementation device establishes a communication connection through a client of the second participant device within the implementation device, and sends a connection request to the second participant device.
  • S209 The second participant device establishes a connection with the implementer device after identity authentication.
  • the second participant device authenticates the implementation party device through a client of the second participant device belonging thereto according to the authentication identity information, and establishes a two-way authenticated encrypted network connection with the implementation party device.
  • steps S201 to S209 can be any position before step S210, and this embodiment does not limit it.
  • S210 The implementer device generates a private key issuance request.
  • This step may refer to step S104 in FIG. 1 , and will not be described in detail.
  • the implementer device sends a private key issuance request to the second participant device.
  • This step may refer to step S105 in FIG. 1 , and will not be described in detail.
  • the second participant device uses the second public key information to encrypt the first private key information to obtain the encrypted first private key information.
  • This step may refer to step S106 in FIG. 1 , and will not be described in detail.
  • the second participant device sends the encrypted first private key information to the implementer device.
  • This step may refer to step S107 in FIG. 1 , and will not be described in detail.
  • the implementer device uses the second private key information to decrypt the encrypted first private key information to obtain the first private key information; and uses the first private key information to decrypt the encrypted key information to obtain the key information, and uses the key information to decrypt the encrypted software program and then run the software program.
  • This step may refer to step S108 in FIG. 1 , and will not be described in detail.
  • the second participant device first controls the first participant device to encrypt the obtained original version of the software, and the first participant device sends the encrypted file to the implementation device.
  • the implementation device implements the second participant device and the implementation device through the device unique key deployment stage and the software decryption key issuance stage to achieve two-way authentication and encryption.
  • FIG3 is a flow chart of another method for controlling the permissions of a software program provided in an embodiment of the present application. As shown in FIG3 , the method includes:
  • the second participant device sends first public key information to the first participant device.
  • This step may refer to step S101 in FIG. 1 , and will not be described in detail.
  • S302 Use the first public key information to encrypt the key information to obtain the encrypted key information.
  • This step may refer to step S102 in FIG. 1 , and will not be described in detail.
  • S303 The first participant device sends the encrypted software program and encrypted key information to the implementer device.
  • This step may refer to step S103 in FIG. 1 , and will not be described in detail.
  • S304 The implementer's device generates a private key issuance request.
  • This step may refer to step S104 in FIG. 1 , and will not be described in detail.
  • S305 The implementer device sends a private key issuance request to the second participant device.
  • This step may refer to step S105 in FIG. 1 , and will not be described in detail.
  • the second participant device uses the second public key information to encrypt the first private key information to obtain the encrypted first private key information.
  • This step may refer to step S106 in FIG. 1 , and will not be described in detail.
  • S307 The second participant device sends the encrypted first private key information to the implementer device.
  • This step may refer to step S107 in FIG. 1 , and will not be described in detail.
  • the implementer device uses the second private key information to decrypt the encrypted first private key information to obtain the first private key information.
  • S309 The implementer device uses the first password to decode the encrypted key file to obtain the key file.
  • the implementation party device uses a password that meets the security strength requirement, namely, a first password, to decode the encrypted key file to obtain the key file, wherein the key file includes a first private key and a first public key certificate.
  • S310 The implementer device verifies the first private key using the first public key certificate, and stores the first private key in a secure area after the verification is successful.
  • the implementer device verifies the consistency of the first public key certificate and the first private key, and after the verification is passed, stores the private key Kpri in a secure storage area that restricts access by other programs or corresponding devices in the implementer device that have a connection relationship with the first participant device.
  • access to the secure storage area requires confirmation of identity information first, and only after the identity information is verified can data in the secure area be obtained.
  • the implementer device extracts the first private key from the secure area, and uses the first private key to decrypt the encrypted key information to obtain the key information.
  • the implementer device When the implementer device needs to decrypt the software program, the implementer device reads the software authorization status of the device from the OTP memory. If the OTP data records that the device is not authorized to use the software, the implementer device returns an error and terminates the subsequent process. If the OTP data records that the device is authorized, the implementer's device continues the subsequent process of decrypting the software program.
  • the implementation party device reads the encrypted first private key, that is, the decryption private key Kpri, from the secure storage area, and uses the decryption private key Kpri to decrypt the symmetric key Kenc and the authentication key Kmac to obtain the decrypted symmetric key Kenc and the authentication key Kmac.
  • the key information includes: the symmetric key and the authentication key.
  • S312 The implementer device uses the symmetric key to decrypt the software program and obtain a software message authentication code of the software program.
  • the implementer device uses the decrypted symmetric key Kenc to decrypt the software program and obtain a software message authentication code of the software program.
  • S313 The implementer's device uses the authentication key to verify the software message authentication code, and runs the software program after the verification is passed.
  • the implementation party device uses the authentication key Kmac to verify the consistency of the software message authentication code. After the verification is passed, the decrypted software program is sent to the corresponding device inside the implementation party device that is connected to the second participant device, and the software is used to carry out subsequent business.
  • the second participant device first controls the first participant device to encrypt the acquired original version of the software, and the first participant device sends the encrypted file to the implementation party device.
  • the implementation party device implements the two-way authentication and encrypted network connection between the second participant device and the implementation party device through the device unique key deployment stage and the software decryption key distribution stage, and distributes the software key online through a trusted method, and deploys the key in a secure storage form.
  • the original software can be encrypted and protected, and the original software can be authorized and authorized to be used. After the designated software access right holder obtains the permission, the software can be used to carry out subsequent business.
  • FIG4 is a schematic diagram of the structure of a control device provided in an embodiment of the present application. As shown in FIG4 , the device 400 includes:
  • the acquisition module 401 is configured to receive the encrypted software program and the encrypted key information sent by the first participant device; the key information is used to decrypt the encrypted software program, and the encrypted key information is obtained by the first participant device encrypting the key information using the first public key information sent by the second participant device;
  • the processing module 402 is configured to generate and send a private key issuance request to the second participant device, wherein the private key issuance request includes the second public key information, so that the second participant device uses the second public key information to encrypt the first private key information; wherein the first public key in the first public key information and the first private key in the first private key information are an asymmetric key pair; the second public key in the second public key information and the second private key in the second private key information are an asymmetric key pair;
  • the processing module 402 is also configured to receive the encrypted first private key information sent by the second participant device, use the second private key information to decrypt the encrypted first private key information to obtain the first private key information; and use the first private key information to decrypt the encrypted key information to obtain the key information, and use the key information to decrypt the encrypted software program and then run the software program.
  • the processing module 402 is configured to generate a connection request according to the locally stored authentication identity information, and send the connection request to the second participant device, so that the second participant device establishes a connection with the implementation party device after identity authentication.
  • the processing module 402 is configured to send the original identity information of the implementer device to the second participant device, so that the second participant device generates authentication identity information according to the original identity information, and sends the authentication identity information to the implementer device.
  • processing module 402 is further configured to:
  • the first private key is extracted from the security area, and the encrypted key information is decrypted using the first private key to obtain the key information.
  • processing module 402 is further configured to:
  • the device of this embodiment can execute the technical solution in the above method. Its specific implementation process and technical principles are the same and will not be repeated here.
  • FIG5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • the electronic device 500 includes: a memory 501 and a processor 502;
  • the memory 501 is configured to store computer instructions executable by the processor
  • the processor 502 implements each step of the method in the above embodiment when executing the computer instruction. For details, please refer to the relevant description in the above method embodiment.
  • the memory 501 can be independent or integrated with the processor 502.
  • the detection device further includes a bus configured to connect the memory 501 and the processor 502.
  • An embodiment of the present application also provides a non-temporary computer-readable storage medium, in which computer-executable instructions are stored.
  • the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method provided in the above embodiment.
  • An embodiment of the present application also provides a computer program product, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.
  • Figure 6 is a flowchart of another method for controlling the permissions of a software program provided by an embodiment of the present application. As shown in Figure 6, the method includes: S601, a second participant device generates a first public key information and a first private key, wherein the first public key information includes a first public key and a first public key file.
  • the second participant device uses the locally generated first password to encrypt the first private key and the first public key certificate, generates a key file and saves it locally.
  • the second participant device sends the first public key information to the first participant device, that is, the second participant device sends the first public key and the first public key certificate to the first participant device.
  • the first participant device uses the first public key certificate to verify the first public key. After the verification is passed, the first public key is used to encrypt the key information to obtain the encrypted key information, where the key information includes a symmetric key and an authentication key.
  • S605-S610 are the same as S103-S108 in FIG. 1 , and are not described again here.
  • the private key issuance request includes second public key information.
  • the key information is used to decrypt the encrypted software program module, and the encrypted key information is obtained by encrypting the key information by the first participant device using the first public key information sent by the second participant device.
  • the first public key in the first public key information and the first private key in the first private key information are an asymmetric key pair;
  • the second public key in the second public key information and the second private key in the second private key information are an asymmetric key pair.
  • FIG7 is a flow chart of another method for controlling the permissions of a software program provided in an embodiment of the present application. As shown in FIG7 , the method includes:
  • S701-S705 are the same as S601-S605 and will not be described again here.
  • S706 The implementer device sends the original identity information of the implementer device to the second participant device.
  • the second participant device receives the original identity information sent by the implementer device, and generates authentication identity information based on the original identity information.
  • the second participant device sends the authentication identity information to the implementation party device.
  • S709 The implementer device generates a connection request according to the locally stored authentication identity information.
  • S710 The implementer device sends a connection request to the second participant device.
  • the second participant device establishes a connection with the implementer device after identity authentication.
  • S712-S716 are the same as S606-S610 and will not be described again here.
  • FIG8 is a flow chart of another method for controlling the permissions of a software program provided in an embodiment of the present application. As shown in FIG8 , the method includes:
  • S801-S806 are the same as S701-S706 and will not be described again here.
  • the second participant device generates a third private key, a third public key and a third public key certificate according to the original identity information.
  • the second participant device sends the third private key and the third public key certificate as authentication identity information to the implementer device.
  • S809-S816 are the same as S709-S716 and will not be described again here.
  • FIG9 is a flow chart of another method for controlling the permissions of a software program provided in an embodiment of the present application. As shown in FIG9 , the method includes:
  • S901-S903 are the same as S101-S103 and will not be described again here.
  • the second sending device sends a key issuing instruction to the implementing device.
  • the implementer device After confirming the software program authorization, the implementer device generates a private key issuance request and sends the private key issuance request to the second participant device.
  • S906-S909 are the same as S105-S108 and will not be described again here.

Landscapes

  • Storage Device Security (AREA)

Abstract

本申请提供一种软件程序的权限控制方法及设备,该方法包括:实施方设备接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息;密钥信息用于解密经过加密后的软件程序;实施方设备生成私钥下发请求,并向第二参与方设备发送私钥下发请求;实施方设备接收第二参与方设备发送的加密后的第一私钥信息,使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息,使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。

Description

软件程序的权限控制方法及设备
本申请要求在2022年12月8日提交中国专利局、申请号为202211573788.6的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本申请涉及计算机技术领域,例如涉及一种软件程序的权限控制方法及设备。
背景技术
随着软件定义汽车趋势的不断加强以及车载软件复杂度的不断提高,软件信息安全及软件知识产权保护的重要性越来越受到行业的关注;比如,源代码、可执行文件或库文件等。在软件包对外发布和使用的过程中,往往需要采用各种技术手段对其进行数据加密、完整性校验、使用者鉴权等,以确保软件敏感数据不被泄露、篡改或非法使用。
相关技术中,在车机***集成过程中,首先获得原始版本软件,再对原始软件进行加密、签名等操作以对原始软件进行安全保护。
然而相关技术中,在车机***集成过程中,对原始软件进行加密保护的同时,无法对原始软件使用授权验证和访问权限的指定。
发明内容
本申请提供一种软件程序的权限控制方法及设备,用以避免相关技术在车机***集成过程中,对原始软件进行加密保护的同时,无法对原始软件使用授权验证和访问权限的指定的情况。
第一方面,本申请提供一种软件程序的权限控制方法,方法应用于实施方设备,方法包括:
接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息;密钥信息用于解密经过加密后的软件程序,加密后的密钥信息是第一参与方设备使用第二参与方设备发送的第一公钥信息对密钥信息进行加密后获得的;
生成私钥下发请求,并向第二参与方设备发送私钥下发请求,其中,私钥下发请求中包括第二公钥信息,以使第二参与方设备使用第二公钥信息对第一私钥信息进行加密;其中,第一公钥信息中的第一公钥和第一私钥信息中的第一私钥为非对称密钥对;第二公钥信息中的第二公钥和第二私钥信息中的第二私钥为非对称密钥对;
接收第二参与方设备发送的加密后的第一私钥信息,使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。
第二方面,本申请提供一种软件程序的权限控制方法,方法应用于第二参与方设备,方 法包括:
在实施方设备接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息之后,接收实施方设备发送的私钥下发请求,私钥下发请求包括第二公钥信息,并使用第二公钥信息对第一私钥信息进行加密,获得加密后的第一私钥信息;其中,密钥信息用于解密经过加密后的软件程序,加密后的密钥信息是第一参与方设备使用第二参与方设备发送的第一公钥信息对密钥信息进行加密后获得的;
向实施方设备发送加密后的第一私钥信息,以使实施方设备使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息,以使实施方设备使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,以使实施方设备使用密钥信息对加密后的软件程序进行解密后运行软件程序,其中,第一公钥信息中的第一公钥和第一私钥信息中的第一私钥为非对称密钥对;第二公钥信息中的第二公钥和第二私钥信息中的第二私钥为非对称密钥对。
第三方面,本申请提供一种电子设备,包括存储器、处理器,所述存储器中存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现第一方面或/和第二方面所述的方法。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1为本申请实施例提供的一种软件程序的权限控制方法的流程示意图;
图2为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图;
图3为本申请实施例提供的再一种软件程序的权限控制方法的流程示意图;
图4为本申请实施例提供的一种控制装置的结构示意图;
图5为本申请实施例提供的一种电子设备的结构示意图;
图6为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图;
图7为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图;
图8为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图;
图9为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。
随着软件定义汽车趋势的不断加强以及车载软件复杂度的不断提高,软件信息安全及软件知识产权保护的重要性越来越受到行业的关注;比如,源代码、可执行文件或库文件等。 在软件包对外发布和使用的过程中,往往需要采用各种技术手段对其进行数据加密、完整性校验、使用者鉴权等,以确保软件敏感数据不被泄露、篡改或非法使用。
相关技术中,在车机***集成过程中,首先获得原始版本软件,再对原始软件进行加密、签名等操作以对原始软件进行安全保护。
然而相关技术中,对原始软件进行加密保护的同时,无法对原始软件使用授权验证和访问权限的指定。
本申请实施例提供一种软件程序的权限控制,旨在避免相关技术在车机***集成过程中,对原始软件进行加密保护的同时,无法对原始软件使用授权验证和访问权限的指定的情况。本申请的技术构思是:第二参与方设备向第一参与方设备发送第一公钥信息,第一参与方设备使用第一公钥信息对密钥信息进行加密后获得的加密后的密钥信息;第一参与方设备向实施方设备发送加密后的软件程序以及加密后的密钥信息;密钥信息用于解密经过加密后的软件程序;实施方设备生成并向第二参与方设备发送私钥下发请求,私钥下发请求中包括第二公钥信息,第二参与方设备使用第二公钥信息对第一私钥信息进行加密;第二参与方设备向实施方设备发送加密后的第一私钥信息,并使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。本申请的方法,首先通过第二参与方设备控制第一参与方设备对获取到的原始版本软件进行加密,第一参与方设备将加密后的文件发送给实施方设备,实施方设备并通过可信在线下发软件的密钥,且进行部署密钥安全存储的形式,可以在车机***集成过程中,对原始软件进行加密保护的同时,对原始软件使用授权验证和访问权限的指定。
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。下面将结合附图,对本申请的实施例进行描述。
图1为本申请实施例提供的一种软件程序的权限控制方法的流程示意图,如图1所示,该方法包括:
S101、第二参与方设备向第一参与方设备发送第一公钥信息。
示例性地,本实施例的执行主体可以为电子设备、或者终端设备、或者软件程序的权限控制处理装置或设备、或者其他可以执行本实施例的装置或设备,对此不做限制。本实施例中以执行主体为电子设备进行介绍。
首先,第二参与方设备作为软件非对称加密密钥的生成和管理方,负责生成非对称密钥对Kpri(非对称私钥)&Kpub(非对称公钥),即第一公钥和第一私钥,同时负责请求签证服务器生成公钥证书Certpub。第二参与方设备并通过接口通信或者数据总线通信向第一参与方设备发送第一公钥信息。其中,第二参与方设备和第一参与方设备有权限访问原始未加密软件。其中,第一公钥信息包括第一公钥和第一公钥证书。第一私钥信息包括第一私钥和第一公钥证书。第一公钥信息中第一公钥和第一私钥信息中第一私钥为非对称密钥对。
S102、第一参与方设备使用第一公钥信息对密钥信息进行加密,获得加密后的密钥信息。
示例性地,第一参与方设备作为直接获得原始未加密软件的一设备,负责使用第一公钥信息对密钥信息进行加密,并获得加密后的密钥信息。其中,密钥信息是用于解密经过加密后的软件程序;密钥信息包括对称加密密钥和认证密钥,对称加密密钥用于加密软件程序,认证密钥用于生成消息认证码。软件包括的软件程序可以是一个,也可以是多个。由于考虑到原始未加密软件在运行过程中的安全性,第一参与方设备是用来给原始未加密软件进行保护。
S103、第一参与方设备向实施方设备发送加密后的软件程序以及加密后的密钥信息。
示例性地,实施方设备负责加密后的软件程序以及加密后的密钥信息的编译和打包。第一参与方设备通过接口通信或者数据总线通信向实施方设备发送的加密后的软件程序以及加密后的密钥信息。完成***软件的集成。
考虑到原始软件的安全性,不是所有***的拥有者会获得软件的权限,实施方设备内部有多个功能模块,包括设备唯一密钥部署阶段和软件解密密钥下发阶段,用以指定软件的权限;比如,只有被授权的人才能获得软件的权限。
S104、实施方设备生成私钥下发请求。
示例性地,在第二参与方设备受控的环境中,实施方设备通过其内部所属第二参与方设备的客户端进行通信连接,并向第二参与方设备发送私钥下发指令。
示例性地,实施方设备内部与第二参与方设备有连接关系的所属对应设备收到第二参与方设备的密钥下发指令之后,并向实施方设备内部与第一参与方设备有连接关系的所属对应设备请求生成临时加密公钥和临时加密私钥。也就是第二公钥和第二私钥。第二公钥信息包括第二公钥,第二私钥信息包括第二私钥。
实施方设备首先从一次性可编程(One Time Program,OTP)存储器读取该设备的软件授权状态。若OTP数据记录该设备未被授权使用该软件,则实施方设备返回错误并终止后续流程。若OTP数据记录该设备已被授权,则实施方设备继续后续流程,也就是生成临时加密公钥和临时加密私钥。
比如,第二参与方设备可以是一个服务器,实施方设备内部所属第二参与方设备的客户端可以是服务器所连接的应用设备。
S105、实施方设备向第二参与方设备发送私钥下发请求。
私钥下发请求包括第二公钥信息,使第二参与方设备可使用第二公钥信息对第一私钥信息加密。
S106、第二参与方设备使用第二公钥信息对第一私钥信息进行加密,获得加密后的第一私钥信息。
S107、第二参与方设备向实施方设备发送加密后的第一私钥信息。
示例性地,第二参与方设备在可信的受控环境中,将加密后的第一私钥信息即密钥文件下发至实施方设备内部与第二参与方设备有连接关系的所属对应设备。
S108、实施方设备使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后,运行软件程序。
示例性地,使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息,并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。
本申请实施例中,第二参与方设备向第一参与方设备发送第一公钥信息,第一参与方设备使用第一公钥信息对密钥信息进行加密后获得的加密后的密钥信息;第一参与方设备向实施方设备发送加密后的软件程序以及加密后的密钥信息;密钥信息用于解密经过加密后的软件程序;实施方设备生成并向第二参与方设备发送私钥下发请求,私钥下发请求中包括第二公钥信息,第二参与方设备使用第二公钥信息对第一私钥信息进行加密;第二参与方设备向实施方设备发送加密后的第一私钥信息,并使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。本申请的方法,首先通过第二参与方设备控制第一参与方设备对获取到的原始版本软件进行加密,第一参与方设备并将加密后的文件发送给实施方设备,实施方设备并通过可信在线下发软件的密钥,且进行部署密钥安全存储的形式,可以在车机***集成过程中,对原始软件进行加密保护的同时,对原始软件使用授权验证和访问权限的指定。
图2为本申请实施例提供的另一种软件程序的权限控制方法的流程示意图,如图2所示,该方法包括:
S201、第二参与方设备向第一参与方设备发送第一公钥信息。
S202、第一参与方设备使用第一公钥信息对密钥信息进行加密,获得加密后的密钥信息。
S203、第一参与方设备向实施方设备发送的加密后的软件程序以及加密后的密钥信息。
S204、实施方设备向第二参与方设备发送实施方设备的原始身份信息。
示例性地,实施方设备内部所属第二参与方设备的客户端在可控的环境下,采集客户端的原始身份信息,其中,原始身份信息包括设备ID和绑定车辆ID。
S205、第二参与方设备根据原始身份信息生成认证身份信息。
示例性地,第二参与方设备根据原始身份信息生成客户端的认证身份信息。其中,认证身份信息用于密钥下发阶段的双向认证和加密网络连接建立过程。
其中,步骤S205还包括以下步骤:
S2051、第二参与方设备根据原始身份信息生成第三私钥、第三公钥以及第三公钥证书。
示例性地,第二参与方设备根据原始身份信息生成客户端唯一绑定的非对称密钥对Kpri-conn和Kpub-conn,同时请求签证服务器签名公钥以生成公钥证书Certpub-conn。第二参与方设备还将私钥Kpri-conn与公钥证书Certpub-conn(链)按照PKCS#12格式组成密钥文件。
实施方设备内部与第二参与方设备有连接关系的所属对应设备在可信受控环境下将私钥Kpri-conn和证书Certpub-conn(链)写入安全存储区域,并限制私钥Kpri-conn的导出。
S2052、第二参与方设备将第三私钥和第三公钥证书作为认证身份信息发送至实施方设备。
示例性地,第二参与方设备在可信的的受控环境下,通过数据总线或者接口通信将第三私钥和第三公钥证书作为认证身份信息发送至实施方设备。
S206、第二参与方设备向实施方设备发送认证身份信息。
示例性地,在第二参与方设备受控的环境中,第二参与方设备通过数据总线或者接口与实施方设备内部所属第二参与方设备的客户端进行通信连接,并向实施方设备内部所属第二参与方设备的客户端发送认证身份信息。
S207、实施方设备根据本地存储的认证身份信息生成连接请求。
示例性地,实施方设备根据本地存储的认证身份信息中的实施方设备内部所属第二参与方设备的客户端唯一密钥Kpri-conn和证书Certpub-conn,生成连接请求。
S208、实施方设备向第二参与方设备发送连接请求。
示例性地,在第二参与方设备受控的环境中,实施方设备通过其内部所属第二参与方设备的客户端进行通信连接,并向第二参与方设备发送连接请求。
S209、第二参与方设备进行身份验证后与实施方设备建立连接。
示例性地,第二参与方设备根据认证身份信息对实施方设备通过其内部所属第二参与方设备的客户端进行身份验证,与实施方设备建立双向认证的加密网络连接。
其中,步骤S201至S209可以是步骤S210之前的任一位置,此实施例不做限定。
S210、实施方设备生成私钥下发请求。
本步骤可以参见图1中的步骤S104,不再赘述。
S211、实施方设备向第二参与方设备发送私钥下发请求。
本步骤可以参见图1中的步骤S105,不再赘述。
S212、第二参与方设备使用第二公钥信息对第一私钥信息进行加密,获得加密后的第一私钥信息。
本步骤可以参见图1中的步骤S106,不再赘述。
S213、第二参与方设备向实施方设备发送加密后的第一私钥信息。
本步骤可以参见图1中的步骤S107,不再赘述。
S214、实施方设备使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。
本步骤可以参见图1中的步骤S108,不再赘述。
本申请实施例中,首先通过第二参与方设备控制第一参与方设备对获取到的原始版本软件进行加密,第一参与方设备并将加密后的文件发送给实施方设备,实施方设备通过设备唯一密钥部署阶段和软件解密密钥下发阶段,实现第二参与方设备和实施方设备双向认证和加 密网络连接,并通过可信在线下发软件的密钥,且进行部署密钥安全存储的形式,可以在车机***集成过程中,对原始软件进行加密保护的同时,对原始软件使用授权验证和访问权限的指定。
图3为本申请实施例提供的再一种软件程序的权限控制方法的流程示意图,如图3所示,该方法包括:
S301、第二参与方设备向第一参与方设备发送第一公钥信息。
本步骤可以参见图1中的步骤S101,不再赘述。
S302、使用第一公钥信息对密钥信息进行加密,获得加密后的密钥信息。
本步骤可以参见图1中的步骤S102,不再赘述。
S303、第一参与方设备向实施方设备发送的加密后的软件程序以及加密后的密钥信息。
本步骤可以参见图1中的步骤S103,不再赘述。
S304、实施方设备生成私钥下发请求。
本步骤可以参见图1中的步骤S104,不再赘述。
S305、实施方设备向第二参与方设备发送私钥下发请求。
本步骤可以参见图1中的步骤S105,不再赘述。
S306、第二参与方设备使用第二公钥信息对第一私钥信息进行加密,获得加密后的第一私钥信息。
本步骤可以参见图1中的步骤S106,不再赘述。
S307、第二参与方设备向实施方设备发送加密后的第一私钥信息。
本步骤可以参见图1中的步骤S107,不再赘述。
S308、实施方设备使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息。
S309、实施方设备使用第一密码对加密后的密钥文件进行解码,获得密钥文件。
示例性地,实施方设备使用符合安全强度要求的密码即第一密码对加密后的密钥文件进行解码,获得密钥文件。其中,密钥文件包括第一私钥和第一公钥证书。
S310、实施方设备使用第一公钥证书对第一私钥进行验证,在验证通过后将第一私钥存储到安全区域。
示例性地,实施方设备对第一公钥证书和第一私钥进行一致性的验证,在验证通过后将私钥Kpri存储到限制其他程序或实施方设备内部与第一参与方设备有连接关系的所属对应设备访问的安全存储区域。其中,对于安全存储区域的访问需要先确认身份信息,在身份信息验证通过之后,才能获取安全区域的数据。
S311、实施方设备从安全区域提取第一私钥,并使用第一私钥对加密后的密钥信息进行解密,获得密钥信息。
在实施方设备需要***程序时,实施方设备从OTP存储器读取该设备的软件授权状态。若OTP数据记录该设备未被授权使用该软件,则实施方设备返回错误并终止后续流程。 若OTP数据记录该设备已被授权,则实施方设备继续后续流程***程序的过程。
示例性地,实施方设备从安全存储区域读取加密后的第一私钥,也即解密私钥Kpri。并使用解密私钥Kpri对对称密钥Kenc和认证密钥Kmac进行解密,获得解密后的对称密钥Kenc和认证密钥Kmac。其中,密钥信息包括:对称密钥和认证密钥。
S312、实施方设备使用对称密钥对软件程序进行解密,并获得软件程序的软件消息认证码。
示例性地,实施方设备使用解密后的对称密钥Kenc对软件程序进行解密,并获得软件程序的软件消息认证码。
S313、实施方设备使用认证密钥对软件消息认证码进行验证,在验证通过后运行软件程序。
示例性地,实施方设备使用认证密钥Kmac验证软件消息认证码的一致性,在验证通过后,将解密后的软件程序发送给实施方设备内部与第二参与方设备有连接关系的所属对应设备,并使用该软件开展后续业务。
本申请实施例中,首先通过第二参与方设备控制第一参与方设备对获取到的原始版本软件进行加密,第一参与方设备并将加密后的文件发送给实施方设备,实施方设备通过设备唯一密钥部署阶段和软件解密密钥下发阶段,实现第二参与方设备和实施方设备双向认证和加密网络连接,并通过可信在线下发软件的密钥,且进行部署密钥安全存储的形式,可以在车机***集成过程中,对原始软件进行加密保护的同时,对原始软件使用授权验证和访问权限的指定。当指定软件访问权限人获得权限之后,使用该软件开展后续业务。
图4为本申请实施例提供的一种控制装置的结构示意图,如图4所示,该装置400包括:
获取模块401,设置为接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息;密钥信息用于解密经过加密后的软件程序,加密后的密钥信息是第一参与方设备使用第二参与方设备发送的第一公钥信息对密钥信息进行加密后获得的;
处理模块402,设置为生成并向第二参与方设备发送私钥下发请求,私钥下发请求中包括第二公钥信息,使第二参与方设备使用第二公钥信息对第一私钥信息进行加密;其中,第一公钥信息中第一公钥和第一私钥信息中第一私钥为非对称密钥对;第二公钥信息中第二公钥和第二私钥信息中第二私钥为非对称密钥对;
处理模块402,还设置为接收第二参与方设备发送的加密后的第一私钥信息,使用第二私钥信息对加密后的第一私钥信息进行解密,获得第一私钥信息;并使用第一私钥信息对加密后的密钥信息进行解密,获得密钥信息,并使用密钥信息对加密后的软件程序进行解密后运行软件程序。
在一个实施例中:
处理模块402,设置为根据本地存储的认证身份信息生成连接请求,并向第二参与方设备发送连接请求,使第二参与方设备在进行身份验证后与实施方设备建立连接。
在一个实施例中:
处理模块402,设置为向第二参与方设备发送实施方设备的原始身份信息,使第二参与方设备根据原始身份信息生成认证身份信息,并将认证身份信息发送至实施方设备。
在一个实施例中,处理模块402,还设置为:
使用第一密码对加密后的密钥文件进行解码,获得密钥文件;
使用第一公钥证书对第一私钥进行验证,在验证通过后将第一私钥存储到安全区域;
从安全区域提取第一私钥,并使用第一私钥对加密后的密钥信息进行解密,获得密钥信息。
在一个实施例中,处理模块402,还设置为:
使用对称密钥对软件程序进行解密,并获得软件程序的软件消息认证码;
使用认证密钥对软件消息认证码进行验证,在验证通过后运行软件程序。
本实施例的装置,可以执行上述方法中的技术方案,其具体实现过程和技术原理相同,此处不再赘述。
图5为本申请实施例提供的一种电子设备的结构示意图,如图5所示,电子设备500包括:存储器501和处理器502;
其中,存储器501设置为存储处理器可执行的计算机指令;
处理器502在执行计算机指令时实现上述实施例中方法中的各个步骤。具体可以参见前述方法实施例中的相关描述。
例如,上述存储器501既可以是独立的,也可以跟处理器502集成在一起。当存储器501独立设置时,该检测设备还包括总线,设置为连接存储器501和处理器502。
本申请实施例还提供了一种非临时性计算机可读存储介质,计算机可读存储介质中存储有计算机执行指令,当该存储介质中的指令由电子设备的处理器执行时,使得电子设备能够执行上述实施例提供的方法。
本申请实施例还提供了一种计算机程序产品,计算机程序产品包括:计算机程序,计算机程序存储在可读存储介质中,电子设备的至少一个处理器可以从可读存储介质读取计算机程序,至少一个处理器执行计算机程序使得电子设备执行上述任一实施例提供的方案。
图6是本申请一实施例提供的另一种软件程序的权限控制方法的流程示意图。如图6所示,该方法包括:S601、第二参与方设备生成第一公钥信息和第一私钥,其中,第一公钥信息包括第一公钥和第一公钥文件。
S602、第二参与方设备使用本地生成的第一密码对第一私钥和第一公钥证书进行加密,生成密钥文件后本地保存。
S603、第二参与方设备向第一参与方设备发送第一公钥信息,即第二参与方设备向第一参与方设备发送第一公钥和第一公钥证书。
S604、第一参与方设备使用第一公钥证书验证第一公钥,在验证通过后使用第一公钥对密钥信息进行加密,获得加密后的密钥信息,其中,密钥信息包括对称密钥和认证密钥。
S605-S610与图1中的S103-S108相同,此处不再赘述。
其中,所述私钥下发请求包括第二公钥信息。所述密钥信息用于解密经过加密后的软件程序程序模块,所述加密后的密钥信息是所述第一参与方设备使用第二参与方设备发送的第一公钥信息对所述密钥信息进行加密后获得的。
其中,第一公钥信息中的第一公钥和第一私钥信息中的第一私钥为非对称密钥对;第二公钥信息中的第二公钥和第二私钥信息中的第二私钥为非对称密钥对。
图7是本申请一实施例提供的另一种软件程序的权限控制方法的流程示意图。如图7所示,该方法包括:
S701-S705与S601-S605相同,此处不再赘述。
S706、实施方设备向第二参与方设备发送实施方设备的原始身份信息。
S707、第二参与方设备接收实施方设备发送的原始身份信息,根据原始身份信息生成认证身份信息。
S708、第二参与方设备将认证身份信息发送至所述实施方设备。
S709、实施方设备根据本地存储的认证身份信息生成连接请求。
S710、实施方设备向第二参与方设备发送连接请求。
S711、第二参与方设备进行身份验证后与实施方设备建立连接。
S712-S716与S606-S610相同,此处不再赘述。
图8是本申请一实施例提供的另一种软件程序的权限控制方法的流程示意图。如图8所示,该方法包括:
S801-S806与S701-S706相同,在此不再赘述。
S807、第二参与方设备根据原始身份信息生成第三私钥、第三公钥以及第三公钥证书。
S808、第二参与方设备将第三私钥和第三公钥证书作为认证身份信息发送至实施方设备。
S809-S816与S709-S716相同,在此不再赘述。
图9是本申请一实施例提供的另一种软件程序的权限控制方法的流程示意图。如图9所示,该方法包括:
S901-S903与S101-S103相同,在此不再赘述。
S904、第二发送方设备向实施方设备发送密钥下发指令。
S905、实施方设备在确定软件程序授权后生成私钥下发请求,并向第二参与方设备发送私钥下发请求。
S906-S909与S105-S108相同,在此不再赘述。

Claims (11)

  1. 一种软件程序的权限控制方法,所述方法应用于实施方设备,所述方法包括:
    接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息;所述密钥信息用于解密经过加密后的软件程序,所述加密后的密钥信息是所述第一参与方设备使用第二参与方设备发送的第一公钥信息对所述密钥信息进行加密后获得的;
    生成私钥下发请求,并向所述第二参与方设备发送所述私钥下发请求,其中,所述私钥下发请求中包括第二公钥信息,以使所述第二参与方设备使用所述第二公钥信息对第一私钥信息进行加密;其中,所述第一公钥信息中的第一公钥和所述第一私钥信息中的第一私钥为非对称密钥对;所述第二公钥信息中的第二公钥和第二私钥信息中的第二私钥为非对称密钥对;
    接收所述第二参与方设备发送的加密后的第一私钥信息,使用所述第二私钥信息对加密后的第一私钥信息进行解密,获得所述第一私钥信息;使用所述第一私钥信息对加密后的密钥信息进行解密,获得所述密钥信息,并使用所述密钥信息对所述加密后的软件程序进行解密后运行所述软件程序。
  2. 根据权利要求1所述的权限控制方法,在所述生成私钥下发请求,并向所述第二参与方设备发送所述私钥下发请求之前,所述方法还包括:
    根据本地存储的认证身份信息生成连接请求,并向所述第二参与方设备发送所述连接请求,以使所述第二参与方设备在进行身份验证后与所述实施方设备建立连接。
  3. 根据权利要求2所述的权限控制方法,在所述根据本地存储的身份信息生成连接请求,并向所述第二参与方设备发送所述连接请求之前,所述方法还包括:
    向所述第二参与方设备发送所述实施方设备的原始身份信息,以使所述第二参与方设备根据所述原始身份信息生成所述认证身份信息,并将所述认证身份信息发送至所述实施方设备。
  4. 根据权利要求1所述的权限控制方法,其中,所述第一私钥信息包括第一密码和加密后的密钥文件;密钥文件包括所述第一私钥和第一公钥证书;
    所述使用所述第一私钥信息对加密后的密钥信息进行解密,获得所述密钥信息,包括:
    使用所述第一密码对所述加密后的密钥文件进行解码,获得所述密钥文件;
    使用所述第一公钥证书对所述第一私钥进行验证,在验证通过后将所述第一私钥存储到安全区域;
    从所述安全区域提取所述第一私钥,并使用所述第一私钥对加密后的密钥信息进行解密,获得所述密钥信息。
  5. 根据权利要求1所述的权限控制方法,其中,所述密钥信息包括:对称密钥和认证密钥;
    所述使用所述密钥信息对所述加密后的软件程序进行解密后运行所述软件程序,包括:
    使用所述对称密钥对所述软件程序进行解密,并获得所述软件程序的软件消息认证码;
    使用所述认证密钥对所述软件消息认证码进行验证,在验证通过后运行所述软件程序。
  6. 一种软件程序的权限控制方法,所述方法应用于第二参与方设备,所述方法包括:
    在实施方设备接收第一参与方设备发送的加密后的软件程序以及加密后的密钥信息之后,接收所述实施方设备发送的私钥下发请求,所述私钥下发请求包括第二公钥信息,并使用所述第二公钥信息对第一私钥信息进行加密,获得加密后的第一私钥信息;其中,所述密钥信息用于解密经过加密后的软件程序,所述加密后的密钥信息是所述第一参与方设备使用第二参与方设备发送的第一公钥信息对所述密钥信息进行加密后获得的;
    向所述实施方设备发送加密后的第一私钥信息,以使所述实施方设备使用第二私钥信息对加密后的第一私钥信息进行解密,获得所述第一私钥信息,以使所述实施方设备使用所述第一私钥信息对加密后的密钥信息进行解密,获得所述密钥信息,以使所述实施方设备使用所述密钥信息对所述加密后的软件程序进行解密后运行所述软件程序;
    其中,所述第一公钥信息中的第一公钥和所述第一私钥信息中的第一私钥为非对称密钥对;所述第二公钥信息中的第二公钥和所述第二私钥信息中的第二私钥为非对称密钥对。
  7. 根据权利要求6所述的权限控制方法,还包括:
    生成所述第一公钥信息和第一私钥,其中,所述第一公钥信息包括第一公钥以及第一公钥证书;
    使用本地生成的第一密码对所述第一私钥和所述第一公钥证书进行加密,生成密钥文件后本地保存;
    向所述第一参与方设备发送所述第一公钥信息,以使所述第一参与方设备使用所述第一公钥证书验证所述第一公钥,在验证通过后使用所述第一公钥对密钥信息进行加密,获得加密后的密钥信息,其中,所述密钥信息包括对称密钥和认证密钥。
  8. 根据权利要求7所述的权限控制方法,还包括:
    接收所述实施方设备发送的原始身份信息,根据所述原始身份信息生成认证身份信息,并将所述认证身份信息发送至所述实施方设备。
  9. 根据权利要求8所述的权限控制方法,其中,所述根据所述原始身份信息生成认证身份信息,包括:
    根据所述原始身份信息生成第三私钥、第三公钥以及第三公钥证书;
    将所述第三私钥和所述第三公钥证书作为所述认证身份信息发送至所述实施方设备。
  10. 根据权利要求6所述的权限控制方法,还包括:
    向所述实施方设备发送密钥下发指令,以使所述实施方设备在确定所述软件程序授权后生成私钥下发请求并向所述第二参与方设备发送所述私钥下发请求。
  11. 一种电子设备,包括:处理器,以及与所述处理器通信连接的存储器;
    所述存储器存储计算机执行指令;
    所述处理器执行所述存储器存储的计算机执行指令,以实现如权利要求1至5中任一项,或6至10中任意一项所述的方法。
PCT/CN2023/127463 2022-12-08 2023-10-30 软件程序的权限控制方法及设备 WO2024120051A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211573788.6 2022-12-08
CN202211573788.6A CN116028896A (zh) 2022-12-08 2022-12-08 软件程序的权限控制方法及设备

Publications (1)

Publication Number Publication Date
WO2024120051A1 true WO2024120051A1 (zh) 2024-06-13

Family

ID=86071381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/127463 WO2024120051A1 (zh) 2022-12-08 2023-10-30 软件程序的权限控制方法及设备

Country Status (2)

Country Link
CN (1) CN116028896A (zh)
WO (1) WO2024120051A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028896A (zh) * 2022-12-08 2023-04-28 亿咖通(湖北)技术有限公司 软件程序的权限控制方法及设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936588A (zh) * 2017-04-13 2017-07-07 北京深思数盾科技股份有限公司 一种硬件控制锁的托管方法、装置及***
CN110071940A (zh) * 2019-05-06 2019-07-30 深圳市网心科技有限公司 软件包加解密方法、服务器、用户设备及存储介质
CN114389802A (zh) * 2021-12-10 2022-04-22 北京巨龟科技有限责任公司 一种信息解密的方法、装置、电子设备及可读存储介质
CN115174071A (zh) * 2022-07-15 2022-10-11 中车青岛四方机车车辆股份有限公司 面向列车车载软件远程升级场景的安全传输方法和***
CN116028896A (zh) * 2022-12-08 2023-04-28 亿咖通(湖北)技术有限公司 软件程序的权限控制方法及设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106936588A (zh) * 2017-04-13 2017-07-07 北京深思数盾科技股份有限公司 一种硬件控制锁的托管方法、装置及***
CN110071940A (zh) * 2019-05-06 2019-07-30 深圳市网心科技有限公司 软件包加解密方法、服务器、用户设备及存储介质
CN114389802A (zh) * 2021-12-10 2022-04-22 北京巨龟科技有限责任公司 一种信息解密的方法、装置、电子设备及可读存储介质
CN115174071A (zh) * 2022-07-15 2022-10-11 中车青岛四方机车车辆股份有限公司 面向列车车载软件远程升级场景的安全传输方法和***
CN116028896A (zh) * 2022-12-08 2023-04-28 亿咖通(湖北)技术有限公司 软件程序的权限控制方法及设备

Also Published As

Publication number Publication date
CN116028896A (zh) 2023-04-28

Similar Documents

Publication Publication Date Title
JP3613929B2 (ja) アクセス資格認証装置および方法
JP3613936B2 (ja) アクセス資格認証装置
JP4562464B2 (ja) 情報処理装置
JP3614057B2 (ja) アクセス資格認証方法および装置ならびに証明用補助情報作成方法および装置
JP4764639B2 (ja) ファイルの暗号化・復号化プログラム、プログラム格納媒体
CN102271037B (zh) 基于在线密钥的密钥保护装置
US20010056533A1 (en) Secure and open computer platform
US8806206B2 (en) Cooperation method and system of hardware secure units, and application device
JPH11225142A (ja) 認証装置および方法
JP3580333B2 (ja) 暗号認証機能の装備方法
JP2007013433A (ja) 暗号化データを送受信する方法及び情報処理システム
WO2024120051A1 (zh) 软件程序的权限控制方法及设备
CN103186723B (zh) 数字内容安全协作的方法和***
JP3597704B2 (ja) Icカードおよび記録媒体
JPH10336172A (ja) 電子認証用公開鍵の管理方法
JPH1124916A (ja) ソフトウェアライセンス管理装置および方法
JP2008234143A (ja) バイオメトリクスを使用した本人限定メール開封システムおよびその方法ならびにそのためのプログラム
JP2014022920A (ja) 電子署名システム、電子署名方法および電子署名プログラム
JP2003110544A (ja) 暗復号装置及び方法
CN114885326A (zh) 一种银行移动作业安全防护方法、装置和存储介质
US20130014286A1 (en) Method and system for making edrm-protected data objects available
JP2008529339A (ja) 商用又は個人用コンテンツに対するdrmシステム内のコンテンツの不正配信を阻止する方法
JP4018376B2 (ja) 制御装置、制御方法、及び、制御プログラムを記憶した媒体
WO2023199619A1 (ja) リモート署名システム及び耐タンパ装置
JP7230287B1 (ja) リモート署名システム及びリモート署名方法