WO2014206171A1 - 一种公钥密码的处理方法、装置及系统 - Google Patents

一种公钥密码的处理方法、装置及系统 Download PDF

Info

Publication number
WO2014206171A1
WO2014206171A1 PCT/CN2014/078584 CN2014078584W WO2014206171A1 WO 2014206171 A1 WO2014206171 A1 WO 2014206171A1 CN 2014078584 W CN2014078584 W CN 2014078584W WO 2014206171 A1 WO2014206171 A1 WO 2014206171A1
Authority
WO
WIPO (PCT)
Prior art keywords
software
public key
generated
key
software package
Prior art date
Application number
PCT/CN2014/078584
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 WO2014206171A1 publication Critical patent/WO2014206171A1/zh

Links

Classifications

    • 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

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a public key cryptographic process, and more particularly to a secure key protection method, apparatus and system in a trusted environment.
  • RSA Public Key Cryptography
  • security sensitive data software or critical configuration data on the base station equipment
  • the idea is: the equipment vendor performs RSA integrity signature on the security sensitive data. Before using the security sensitive data, its integrity is checked. If the verification fails, it means that the data has been tampered with. The device cannot use this data.
  • the purpose of integrity protection of the security sensitive data on the base station device is to prevent it from being tampered with.
  • the public and private key pairs of the RSA digital signature are generated by the software publisher. , manage, and be responsible for the security of its storage; when publishing software or patches, use the private key SK (Secret Key, hereinafter referred to as private key) in the public key password to digitally sign the software package, including in the software distribution package.
  • Public key PK public key, hereinafter referred to as public key
  • signature file in the software package and public key password.
  • the inventor finds that there is a risk of leakage of the private key SK in the current software package data signature and key transfer method, and the software, the signature, and the public key PK on the device can be forged.
  • the risk of the package being tampered with is high and the security is low.
  • the embodiment of the invention provides a method, a device and a system for processing a public key cryptogram, which are used for securely storing and managing an RSA key on a device, thereby improving security.
  • the first aspect of the present invention provides a method for processing a public key cipher, which may include:
  • the software upgrade instruction carries a software package, a first public key generated by the software publisher, and a signature file generated by digitally signing the software package by using the first private key generated by the software publisher;
  • the processing method of the public key cryptography further includes:
  • the locally generated preset signature key pair is stored in a local one-time programmable device, and the preset signature key pair includes a second public key and the second private key.
  • the processing method of the public key cryptography further includes:
  • the software package of the loaded software is digitally verified using the second public key.
  • a second aspect of the present invention provides a device for processing a public key cryptogram, which may include: an obtaining module, configured to acquire a software upgrade indication, where the software upgrade instruction carries a software package, and a first public key generated by a software publisher a signature file generated by digitally signing the software package using the first private key generated by the software publisher;
  • a verification module configured to perform digital signature verification on the software package by using the first public key
  • the signing module is configured to digitally re-sign the digitally signed software package using the locally stored second private key, and store the generated signature data locally.
  • the processing apparatus of the public key cryptogram further includes: And a storage module, configured to store the locally generated preset signature key pair in a local one-time programmable device, where the preset signature key pair includes a second public key and a second private key.
  • the verification module is further configured to use the second public key pair when locally loading the software The package of the loaded software is digitally signed for verification.
  • a third aspect of the present invention provides a public key cryptographic processing apparatus, including an input device, an output device, and a processor, where the processor performs the following steps:
  • Obtaining a software upgrade instruction where the software upgrade instruction carries a software package, a first public key generated by the software publisher, and a signature file generated by digitally signing the software package by using the first private key generated by the software publisher;
  • the first public key performs digital signature verification on the software package;
  • the digitally verified software package is digitally signed again using the locally stored second private key, and the generated signature data is stored locally.
  • the processor is further configured to: store the locally generated preset signature key pair in a local one-time programmable device, the preset signature key The pair includes a second public key and a second private key.
  • the processor further performs the following steps: when the loading software is locally started, the second public key is used The key performs digital signature verification on the software package of the loaded software.
  • a fourth aspect of the present invention provides a public key cryptographic processing system, including: a software publisher, a network management system, and a public key cryptographic processing device;
  • the software publisher is configured to generate and manage a first public key and a first private key, digitally sign the software package using the first private key, generate a signature file, and digitally sign the software The package is released to the network management;
  • the network management system is configured to receive a software package issued by the software publisher, and send a software upgrade indication to the processing device of the public key cryptography, where the software upgrade instruction carries the software package issued by the software publisher, a first public key generated by the software publisher, and a signature file generated by digitally signing the software package by using the first private key generated by the software publisher;
  • the public key cryptographic processing device is configured to acquire a software upgrade indication sent by the network management, perform digital signature verification on the software package by using the first public key, and use a locally stored second private key pair The software package is digitally signed again, and the generated signature data is stored in the present Ground.
  • the method, device and system for processing a public key cipher provided by the embodiment of the present invention have the following advantages:
  • the local device verifies the software publisher from the software After the package is legal, the package is re-signed using the local RSA private key (second private key) and the signature file is stored locally.
  • the locally generated and stored RSA public-private key pair is stored in the one-time programmable device, which can effectively prevent the key from being leaked, and the attacker cannot forge the key.
  • the software package can be completely prevented. Being tampered with to improve security.
  • FIG. 1 is a schematic flowchart of a method for processing a public key cipher according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another method for processing a public key cipher according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of another apparatus for processing a public key cipher according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of processing of a public key cipher according to an embodiment of the present invention
  • the embodiment of the invention provides a method, a device and a system for processing a public key cryptogram, which are used for securely storing and managing an RSA key on a device, thereby improving security.
  • FIG. 1 is a schematic flowchart of a method for processing a public key cipher according to an embodiment of the present disclosure, where the method includes: 5101. Obtain a software upgrade instruction, where the software upgrade instruction carries a software package, a first public key generated by a software publisher, and a signature file generated by digitally signing a software package by using a first private key generated by a software publisher;
  • the execution body of the public key cryptography processing method may be a local device or other public key cryptographic processing device, and the local device or public key cryptographic processing device may be a mobile communication terminal (mobile phone) or a notebook. Computer or tablet computer, etc.
  • the embodiment of the present invention is directed to a software package signed by using the first public key verification software package, and digitally signed using the second private key.
  • the first public key is a public key in a public key crypto
  • the first private key is a private key in a public key crypto.
  • the first public key and The first private key is generated, managed, and responsible for the security of the storage by the software publisher.
  • the first public key and the first private key may also be referred to as an RSA digital signature key pair. , ie the RSA public-private key pair.
  • the second private key can be considered to be pre-stored in the local device, which is generated, managed, and responsible for the security of the storage.
  • a method for processing a public key cryptogram provided by an embodiment of the present invention generates and stores an RSA public-private key pair locally, and when the local device verifies that the software package from the software publisher is legal, the local RSA private is used.
  • the key (second private key) re-signs the software package and stores the signature file locally, and securely stores and manages the RSA key password on the device, thereby improving security.
  • the processing system of the public key cryptography includes a software publisher, a network management system, and a public key cryptographic processing device, wherein, in the application scenario, the processing device of the public key cryptography is a local device;
  • FIG. 2 is another schematic flowchart of a method for processing a public key cipher according to an embodiment of the present invention, where the method includes:
  • the local device generates a preset signature key pair, and the locally generated preset signature key pair is generated.
  • a one-time programmable device stored locally;
  • the local device can be a mobile communication terminal (mobile phone) or a notebook computer or a tablet computer or the like.
  • the preset signature key pair includes a second public key and a second private key, and the second public key and the second private key are generated, managed, and stored by the local device.
  • Security is responsible and can be considered to be pre-stored in the local device; the second public key and the second private key are also a pair of RSA public-private key pairs.
  • the second public key and the second private key are pre-stored in a local one-time programmable device (OTP), which is understandable, one-time
  • OTP one-time programmable device
  • the data cannot be changed once the data is written in the programming device, and the OTP memory is externally inaccessible within the hardware architecture based on the SoC (System on Chip) system, that is, the second public key and the Once the second private key is determined to be stored in the local device one-time programmable device, it is not changeable and externally inaccessible and is managed by the local device.
  • SoC System on Chip
  • a trusted environment refers to the ability to provide an environment in which sensitive functions are run and sensitive data is stored. Both are credible.
  • the software publisher generates and manages the first public key and the first private key, and digitally signs the software package by using the first private key to generate a signature file.
  • the software distribution package includes the software package itself (which may be a software installation package or some additional package carried), the first public key and the signature file.
  • the software publisher issues the digitally signed software package to the network administrator.
  • the digitally signed software package can be regarded as the software distribution package, and the network management device receives the software distribution package, and the software distribution package is released through the network management;
  • the network management sends a software upgrade indication to the local device.
  • the local device acquires a software upgrade indication sent by the network management.
  • the local device acquires a software package from a network management system through a Secure File Transfer Protocol (SFTP).
  • SFTP Secure File Transfer Protocol
  • the network management device sends a software upgrade response to the network management device; the software upgrade instruction may be configured to carry the software release package that is sent by the software publisher to the network management device; a first public key, a signature file generated by digitally signing the software package using the first private key generated by the software publisher;
  • the local device performs digital signature verification on the software package by using the first public key.
  • the local device After obtaining the software upgrade indication, the local device performs digital signature verification on the software package by using the first public key carried in the obtained software distribution package;
  • the local device uses the second private key stored locally to digitally sign the digitally verified software package again.
  • the local device After signing with the first public key verification software package, the local device retrieves and uses the second private key stored in step S201 to digitally re-sign the software package;
  • the local device saves the generated signature data to the local device.
  • the local device After the software package is digitally re-signed using the second private key, the local device stores the signature data generated by the digital signature locally, without having to save the RSA public key from the network management.
  • method for processing the public key cryptogram may further include:
  • the software package of the loaded software is digitally signed and verified using the locally stored second public key.
  • the RSA digital signature technology is specifically implemented. Specifically, for the embodiment of the present invention, the principle of the RSA digital signature technology may be: (1) First, generate an RSA digital signature key pair, where the private key is used for digital signature. The public key is used to verify the signature; that is, the software publisher generates and manages an RSA digital signature key pair (the first public key and the first private key), and the local device generates and manages another RSA digital signature key pair.
  • a method for processing a public key cipher provided by an embodiment of the present invention, by locally generating and storing an RSA public-private key pair (ie, a second public key and a second private key), when the local device verifies the After the software publisher's software package is legal, the software package is re-signed using the local RSA private key (second private key) and the signature file is stored locally. Further, the locally generated and stored RSA public-private key pair is stored in the one-time programmable device, which can effectively prevent the key from being leaked, and the attacker cannot forge the key. In the trusted environment, the software package can be completely prevented. Being tampered with to improve security.
  • the embodiment of the present invention further provides an apparatus and system for processing the public key cryptography.
  • the meaning of the noun is the same as that of the above public key cipher.
  • FIG. 3 is a schematic diagram of a public key cryptographic processing apparatus 300, which is applicable to the public key cryptographic processing method in the foregoing embodiment.
  • the obtaining module 301, the verifying module 302, and the signing module 303 it can be understood that the processing device 300 of the public key cryptography may be a local device, and the processing device of the local device or public key cryptography may be specifically a mobile communication terminal (mobile phone) ) or a notebook computer or tablet computer, etc.;
  • the obtaining module 301 is configured to obtain a software upgrade indication, where the software upgrade instruction carries a software package, a first public key generated by a software publisher, and a first private key pair software package generated by a software publisher. a signature file generated by digital signature;
  • the verification module 302 is configured to perform digital signature verification on the software package by using the first public key obtained by the obtaining module 301.
  • the signing module 303 is configured to digitally sign the software package using a locally stored second private key, and store the generated signature data locally.
  • the embodiment of the present invention is directed to a software package that is signed by using the first public key verification software package, and performs digital signature using the second private key.
  • the first public key is a public key in a public key crypto
  • the first private key is a private key in a public key crypto.
  • the first public key and The first private key is generated, managed, and responsible for the security of the storage by the software publisher.
  • the first public key and the first private key may also be referred to as an RSA digital signature key pair. , ie the RSA public-private key pair.
  • the second private key may be considered to be pre-stored on the local device, which is generated, managed, and responsible for the security of the storage.
  • a public key cryptographic processing apparatus provided by an embodiment of the present invention generates and stores an RSA public-private key pair locally, and when the local device verifies that the software package from the software publisher is legal, the local RSA private is used.
  • the key (second private key) re-signs the software package and stores the signature file locally, and securely stores and manages the RSA key password on the device, thereby improving security.
  • the processing device 300 of the public key cryptogram may further include a storage module, where the storage module is configured to store the locally generated preset signature key pair in a local one-time programmable device OTP, and the preset The signature key pair includes a second public key and a second private key.
  • a trusted environment refers to the ability to provide an environment in which the operation of sensitive functions and the storage of sensitive data are trusted.
  • the verification module 302 is further configured to perform digital signature verification on the software package of the loaded software by using the second public key when the loading software is locally started.
  • the processing application of the public key cipher in the embodiment of the present invention may be specifically: the network management device sends a software upgrade instruction to the processing device 300 of the public key cryptosystem; the processing device 300 of the public key cryptosystem sends back a software upgrade to the network management system.
  • the response is obtained by the network management device to the public key cryptographic processing device 300, the server IP address, the access account, and the access password.
  • the public key cryptographic processing device 300 initiates file transfer to the server where the software package is located according to the network management guide. Request, obtain Taking the software package information, the public key cryptographic processing device 300 unpacks the software package and parses the software upgrade package, the public key, and the signature file. Thereafter, the public key cryptographic processing device 300 performs software upgrade package integrity verification using the public key.
  • a public key cryptographic processing apparatus 300 provided by an embodiment of the present invention generates and stores an RSA public-private key pair (ie, a second public key and a second private key) locally, and is verified by the local device. After the software package from the software publisher is legal, the software package is re-signed using the local RSA private key (second private key) and the signature file is stored locally. Further, the locally generated and stored RSA public-private key pair is stored in the one-time programmable device, which can effectively prevent the key from being leaked, and the attacker cannot forge the key. In the trusted environment, the software package can be completely prevented. Being tampered with to improve security.
  • the embodiment of the present invention further provides a public key cryptographic processing device 400, which is applicable to the processing method of the public key cryptography in the above embodiment, and the public key cryptographic processing device 400 may be a local device;
  • 4 is a schematic structural diagram of a public key cryptographic processing apparatus 400 according to an embodiment of the present invention, where the public key cryptographic processing apparatus 400 includes an input device 401, an output device 403, and a processor 402, where The processor 402 performs the following steps: acquiring a software upgrade indication, where the software upgrade instruction carries a software package, a first public key generated by a software publisher, and a digital signature of the software package by using a first private key generated by a software publisher a generated signature file; digitally verifying the software package using the obtained first public key; digitally signing the software package using a locally stored second private key, and storing the generated signature data local.
  • the processor 402 may further perform the steps of: storing the locally generated preset signature key pair in a local one-time programmable device OTP, the preset signature key pair including the second Public key and second private key;
  • the processor 402 can also perform the following steps: When the loading software is locally started, the software package of the loaded software is digitally verified using the second public key.
  • a public key cryptographic processing device 400 provided by an embodiment of the present invention is
  • the RSA public-private key pair (ie, the second public key and the second private key) is generated and stored locally, and when the local device verifies that the software package from the software publisher is legal, the local RSA private key is used (second private) Key) Re-sign the package and store the signature file locally. Further, the locally generated and stored RSA public-private key pair is stored in the one-time programmable device, which can effectively prevent the key from being leaked, and the attacker cannot forge the key. In the trusted environment, the software package can be completely prevented. Being tampered with to improve security.
  • FIG. 5 is a schematic structural diagram of a public key cryptographic processing system 500 according to an embodiment of the present invention.
  • the system 500 includes software. a publishing device 503, a network management device 502, and a public key cryptographic processing device 501; the software publisher 503, configured to generate and manage a first public key and a first private key, using the first private key pair software package Digital signature, generate a signature file, and publish the digitally signed software package to the network management 502;
  • the network management unit 502 is configured to receive the software package issued by the software publisher 503, and send a software upgrade instruction to the processing device 501 of the public key cryptography, where the software upgrade instruction carries the software released by the software publisher 503. a package, a first public key generated by the software publisher 503, and a signature file generated by digitally signing the software package by using the first private key generated by the software publisher 503;
  • the public key cryptographic processing device 501 is configured to obtain a software upgrade indication sent by the network management system 502, perform digital signature verification on the software package by using the first public key, and use a locally stored second private key.
  • the software package is digitally signed, and the generated signature data is stored locally.
  • the public key cryptographic processing device 501 may be a processing device that uses the public key cryptography as shown in FIG. 3 or FIG. 4; in the embodiment of the present invention, the public key cryptographic processing device 501 It may be a local device, and the local device may be specifically a mobile communication terminal (mobile phone) or a notebook computer or a tablet computer or the like.
  • the processing system of the public key cryptography is described below with reference to the flow chart of the processing method of the public key cryptography shown in FIG. 2 in a specific application scenario.
  • 500 the simple analysis shows that, in the application scenario, the processing device 501 of the public key cryptography is a local device;
  • the local device generates a preset signature key pair, and the locally generated preset signature key pair a one-time programmable device stored locally; wherein the preset signature key pair includes a second public key and a second private key, and the second public key and the second private key are locally
  • the device generates, manages, and is responsible for the security of its storage, which can be considered to be pre-stored in the local device; the second public key and the second private key are also a pair of RSA public-private key pairs.
  • the second public key and the second private key are pre-stored in a local one-time programmable device OTP.
  • OTP a local one-time programmable device
  • the OTP memory is externally inaccessible within the chip-based system SoC hardware architecture, that is, the second public key and the second private key are determined to be stored in the local device once determined
  • the second public key and the second private key are determined to be stored in the local device once determined
  • they are not changeable and externally inaccessible and are managed by the local device. That is to say, in a trusted environment, storing the public-private key pair (the second public key and the second private key) in the OTP can effectively prevent the key from being leaked, and the attacker cannot forge the key. , effectively enhance security.
  • the software publisher 503 generates and manages the first public key and the first private key, and digitally signs the software package using the first private key to generate a signature file;
  • the software distribution package includes the software package itself (which may be a software installation package or some additional package carried), the first public key and the signature file.
  • the software publisher 503 then distributes the digitally signed software package to the network management system 502. It can be understood that the digitally signed software package can be regarded as the software distribution package, and the network management system 502 receives the software distribution package.
  • the software distribution package is distributed out through the network management system 502;
  • the network management unit 502 sends a software upgrade indication to the local device, where the local device receives the software upgrade indication sent by the network management unit 502.
  • the software upgrade indication may be considered to be carrying the software release.
  • the software 503 is released by the software 502, and the first public key generated by the software publisher 503 and the first private secret generated by the software publisher 503 are carried in the software upgrade instruction.
  • the local device performs digital signature verification on the software package using the first public key; After obtaining the software upgrade indication, the local device performs digital signature verification on the software package by using the first public key carried in the obtained software distribution package;
  • the local device digitally signs the digitally signed software package using the locally stored second private key and stores the generated signature data locally.
  • a public key cryptographic processing system 500 provided by an embodiment of the present invention generates and stores an RSA public-private key pair (ie, a second public key and a second private key) locally, and the local device verifies After the software package from the software publisher is legal, the software package is re-signed using the local RSA private key (second private key) and the signature file is stored locally. Further, the locally generated and stored RSA public-private key pair is stored in the one-time programmable device, which can effectively prevent the key from being leaked, and the attacker cannot forge the key. In the trusted environment, the software package can be completely prevented. Being tampered with to improve security.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated in In a unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
  • a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program code. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

本发明实施例公开了一种公钥密码的处理方法、装置及系统,用于在设备上安全地存储、管理RSA密钥,提高安全性。本发明实施例包括:获取软件升级指示,软件升级指示中携带软件包、软件发布方生成的第一公开密钥、利用软件发布方生成的第一私有密钥对软件包进行数字签名生成的签名文件;使用第一公开密钥对所述软件包进行数字签名验证;使用本地存储的第二私有密钥对经过数字签名验证后的软件包再次进行数字签名;将生成的签名数据存入本地。

Description

一种公钥密码的处理方法、 装置及系统 技术领域
本发明涉及通信技术领域, 尤其是涉及公钥密码的处理, 具体地是涉 及一种可信环境下安全的密钥保护方法、 装置及系统。
背景技术
如今, 无线网络架构扁平化、 移动网络全互连网协议 (IP, Internet Protocol )化、 基站设备形态小型化, 部署场地灵活化等趋势导致了基站 特别是小型基站受到越来越多的安全威胁。 对于部署在那些未受运营商管 控场地的基站,其安全威胁之一是:基站上的软件或关键配置数据被篡改, 让基站设备按照攻击者的意图工作。
为了防范攻击者对软件或关键配置数据的篡改, 需要对基站设备上的 软件或关键配置数据 (以下将这些软件或关键配置数据称为安全敏感数 据)进行 RSA (公开密钥密码体制)完整性保护, 其思路是: 设备商对安 全敏感数据进行 RSA完整性签名, 在使用这些安全敏感数据前, 先对其 完整性进行校验, 如果校验失败, 则意味着这些数据被篡改了, 则设备不 能使用这些数据。
对基站设备上的安全敏感数据进行完整性保护的目的是防止其被篡 改, 目前现有的一种软件包数据签名及密钥传递的方法中, RSA数字签名 的公私钥对由软件发布方生成、 管理, 并对其存储的安全性负责; 发布软 件或补丁时, 同时使用公钥密码中的私有密钥 SK ( Secret Key, 下文简称 私钥)对软件包进行数字签名, 软件发布包中包含: 软件包、 公钥密码中 的公开密钥 PK ( Public Key, 下文简称公钥) 、 签名文件; 当设备收到网 管的软件升级请求后, 如果对软件包的完整性验证成功, 则将公钥 PK加 密存储于本地; 后续如果设备上电 /重启, 则解密出本地的公钥 PK来验证 本地存储的软件包完整性。
发明人在实现本发明实施例的过程中发现目前的软件包数据签名及 密钥传递的方法中存在私钥 SK泄露的风险, 而且设备上的软件、 签名以 及公钥 PK均可以被伪造, 也就是软件包被篡改的风险很高, 安全性低。 发明内容
本发明实施例提供了一种公钥密码的处理方法、 装置及系统, 用于在 设备上安全地存储、 管理 RSA密钥, 提高安全性。
有鉴于此, 本发明第一方面提供一种公钥密码的处理方法, 其中, 可 包括:
获取软件升级指示, 所述软件升级指示中携带软件包、 软件发布方生 成的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数 字签名生成的签名文件;
使用所述第一公开密钥对所述软件包进行数字签名验证;
使用本地存储的第二私有密钥对经过数字签名验证后的软件包再次 进行数字签名;
将生成的签名数据存入本地。
在第一方面的第一种可能的实现方式中, 所述公钥密码的处理方法还 包括:
将本地生成的预置签名密钥对存储于本地的一次性可编程器件, 所述 预置签名密钥对包括第二公开密钥和所述第二私有密钥。
结合第一方面或第一方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述公钥密码的处理方法还包括:
在本地启动加载软件时, 使用所述第二公开密钥对加载的软件的软件 包进行数字签名验证。
本发明第二方面提供一种公钥密码的处理装置, 其中, 可包括: 获取模块,用于获取软件升级指示,所述软件升级指示中携带软件包、 软件发布方生成的第一公开密钥、 利用软件发布方生成的第一私有密钥对 软件包进行数字签名生成的签名文件;
验证模块, 用于使用所述第一公开密钥对所述软件包进行数字签名验 证;
签名模块, 用于使用本地存储的第二私有密钥对经过数字签名验证后 的软件包再次进行数字签名, 并将生成的签名数据存入本地。
在第二方面的第一种可能的实现方式中, 所述公钥密码的处理装置还 包括: 存储模块, 用于将本地生成的预置签名密钥对存储于本地的一次性可 编程器件, 所述预置签名密钥对包括第二公开密钥和第二私有密钥。
结合第二方面或第二方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述验证模块还用于在本地启动加载软件时, 使用所述第二 公开密钥对加载的软件的软件包进行数字签名验证。
本发明第三方面提供一种公钥密码的处理装置,其中, 包括输入装置、 输出装置和处理器, 所述处理器执行如下步骤:
获取软件升级指示, 所述软件升级指示中携带软件包、 软件发布方生 成的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数 字签名生成的签名文件; 使用所述第一公开密钥对所述软件包进行数字签 名验证; 使用本地存储的第二私有密钥对经过数字签名验证后的软件包再 次进行数字签名, 并将生成的签名数据存入本地。
在第三方面的第一种可能的实现方式中, 所述处理器还执行如下步 骤: 将本地生成的预置签名密钥对存储于本地的一次性可编程器件, 所述 预置签名密钥对包括第二公开密钥和第二私有密钥。
结合第三方面或第三方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述处理器还执行如下步骤: 在本地启动加载软件时, 使用 所述第二公开密钥对加载的软件的软件包进行数字签名验证。
本发明第四方面提供一种公钥密码的处理系统, 其中, 包括软件发布 方、 网管和公钥密码的处理装置;
所述软件发布方, 用于生成并管理第一公开密钥和第一私有密钥, 使 用所述第一私有密钥对软件包进行数字签名, 生成签名文件, 并将经过数 字签名后的软件包发布至网管;
所述网管, 用于接收所述软件发布方发布的软件包, 向所述公钥密码 的处理装置发送软件升级指示, 所述软件升级指示中携带所述软件发布方 发布的软件包、 所述软件发布方生成的第一公开密钥、 利用所述软件发布 方生成的第一私有密钥对软件包进行数字签名生成的签名文件;
所述公钥密码的处理装置, 用于获取所述网管发送的软件升级指示, 使用所述第一公开密钥对所述软件包进行数字签名验证, 使用本地存储的 第二私有密钥对所述软件包再次进行数字签名, 将生成的签名数据存入本 地。
从以上技术方案可以看出, 本发明实施例提供的公钥密码的处理方 法、 装置及系统, 具有以下优点: 通过在本地生成和存储 RSA公私钥对, 当本地设备验证了来自软件发布方的软件包合法后, 使用本地的 RSA私 钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地。 进一 步地, 将本地生成和存储 RSA公私钥对存储在一次性可编程器件, 能够 有效地防止密钥泄露, 同时攻击者也无法对密钥进行伪造,在可信环境下, 能够彻底防范软件包被篡改, 提高安全性。 附图说明 为了更清楚地说明本发明实施例的技术方案, 下面将对实施例描述所 需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动 的前提下, 还可以根据这些附图获得其他的附图。
图 1为本发明实施例提供的一种公钥密码的处理方法的流程示意图; 图 2为本发明实施例提供的公钥密码的处理方法的另一流程示意图; 图 3为本发明实施例提供的一种公钥密码的处理装置的结构示意图; 图 4为本发明实施例提供的公钥密码的处理装置的另一结构示意图; 图 5为本发明实施例提供的一种公钥密码的处理系统的结构示意图。 具体实施方式
本发明实施例提供了一种公钥密码的处理方法、 装置及系统, 用于在 设备上安全地存储、 管理 RSA密钥, 提高安全性。
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其它实施例, 都属于本发明保护的 范围。
以下分别进行详细说明。
请参考图 1 , 图 1为本发明实施例提供的一种公钥密码的处理方法的 流程示意图, 其中, 所述方法包括: 5101、 获取软件升级指示, 所述软件升级指示中携带软件包、 软件发 布方生成的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包 进行数字签名生成的签名文件;
可以理解的是, 所述公钥密码的处理方法的执行主体可以是本地设备 或其他公钥密码的处理装置, 所述本地设备或公钥密码的处理装置可以是 移动通信终端 (手机) 或笔记本计算机或平板计算机等。
5102、 使用所述第一公开密钥对所述软件包进行数字签名验证;
S 103、使用本地存储的第二私有密钥对经过数字签名验证后的软件包 再次进行数字签名;
可以理解的是, 本发明实施例是针对经过使用所述第一公开密钥验证 软件包签名后的软件包, 使用所述第二私有密钥进行数字签名。
S104、 将生成的签名数据存入本地。
其中, 所述第一公开密钥是公钥密码中的公开密钥, 所述第一私有密 钥是公钥密码中的私有密钥; 本发明实施例中, 所述第一公开密钥和所述 第一私有密钥由软件发布方生成、 管理, 并对其存储的安全性负责, 所述 第一公开密钥和所述第一私有密钥也可以称之为 RSA数字签名密钥对, 即 RSA公私钥对。 而所述第二私有密钥可以认为是在预先存储在本地设 备的, 其由本地设备生成、 管理, 并对其存储的安全性负责。
由上述可知, 本发明实施例提供的一种公钥密码的处理方法, 通过在 本地生成和存储 RSA公私钥对, 当本地设备验证了来自软件发布方的软 件包合法后, 使用本地的 RSA私钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地, 在设备上安全地存储、 管理 RSA密钥密码, 从而提高安全性。
为了方便理解和描述本发明技术方案, 以下结合公钥密码的处理系 统, 以一具体应用场景对公钥密码的处理方法进行分析说明。 可以理解的 是, 所述公钥密码的处理系统包括软件发布方、 网管和公钥密码的处理装 置, 其中, 在该应用场景下, 所述公钥密码的处理装置为本地设备;
请参考图 2 , 图 2为本发明实施例提供的公钥密码的处理方法的另一 流程示意图, 其中, 所述方法包括:
S201、 本地设备生成预置签名密钥对, 将本地生成的预置签名密钥对 存储于本地的一次性可编程器件;
可以理解的是, 所述本地设备可以是移动通信终端 (手机)或笔记本 计算机或平板计算机等。
其中, 所述预置签名密钥对包括第二公开密钥和第二私有密钥, 所述 第二公开密钥和所述第二私有密钥由本地设备生成、 管理, 并对其存储的 安全性负责, 可以认为是在预先存储在本地设备的; 所述第二公开密钥和 所述第二私有密钥也是一对 RSA公私钥对。
另外, 在本发明实施例中, 所述第二公开密钥和所述第二私有密钥预 先存储于本地的一次性可编程器件 ( OTP, One Time Programmable ) , 可以理解的是, 一次性可编程器件中一旦数据被写入则不可更改, 且该 OTP存储器在基于芯片级系统( SoC, System on Chip )硬件架构内, 外部 不可访问, 也就是说, 所述第二公开密钥和所述第二私有密钥一旦被确定 存储于本地设备一次性可编程器件中, 就不可更改且外部不可访问, 由本 地设备进行管理。
可以理解的是, 在可信环境下, 将公私钥对(第二公开密钥和所述第 二私有密钥)存储在 OTP能够有效地防止密钥泄露, 同时攻击者也无法 对密钥进行伪造 ,有效加强安全性,其中,按照第三代合作伙伴计划( 3GPP , 3rd Generation Partnership Project ) 33.320定义, 可信环境是指能够提供这 样的环境, 该环境下敏感功能的运行和敏感数据的存储均是可信的。
S202、 软件发布方生成并管理第一公开密钥和第一私有密钥, 使用所 述第一私有密钥对软件包进行数字签名, 生成签名文件;
可以理解的是, 当软件发布方发布软件或补丁时, 会使用其自身管理 的第一私有密钥对软件包进行数字签名, 生成签名文件;
另需要说明的是, 这个软件发布包中包含了软件包本身 (可以是软件 安装包或携带的一些附加程序包) 、 所述第一公开密钥和所述签名文件。
5203、 软件发布方将经过数字签名后的软件包发布至网管;
可以理解的是, 这个经过数字签名后的软件包可以认为是所述软件发 布包, 网管接收所述软件发布包,所述软件发布包经过所述网管向外发布;
5204、 网管向本地设备发送软件升级指示; 在本发明实施例中, 所述本地设备获取所述网管发送的软件升级指 示, 通常地, 所述本地设备向网管通过安全文件传送协议( SFTP, Secure File Transfer Protoco ) 获取软件包, 并向所述网管回送软件升级应答; 所 述软件升级指示可以认为是携带了所述软件发布方经过网管向外发布的 软件发布包; 具体地, 所述软件升级指示中携带软件包、 软件发布方生成 的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数字 签名生成的签名文件;
5206、本地设备使用所述第一公开密钥对所述软件包进行数字签名验 证;
所述本地设备获取所述软件升级指示后, 使用获取到的软件发布包中 携带的第一公开密钥对所述软件包进行数字签名验证;
5207、本地设备使用本地存储的第二私有密钥对经过数字签名验证后 的软件包再次进行数字签名;
在使用所述第一公开密钥验证软件包签名后, 本地设备调取并使用步 骤 S201中存储的第二私有密钥, 对软件包重新进行数字签名;
5208、 本地设备将生成的签名数据存入本地;
在使用第二私有密钥对软件包重新进行数字签名后, 本地设备将进行 数字签名生成的签名数据存入本地, 而无须保存来自网管的 RSA公钥。
进一步地, 所述公钥密码的处理方法还可以包括:
在本地启动加载软件时, 使用本地存储的第二公开密钥对加载的软件 的软件包进行数字签名验证。
可以理解的是, 无论是由软件发布方生成管理的第一公开密钥和第一 私有密钥, 还是由本地设备生成管理的第二公开密钥和第二私有密钥, 其 应用可以参照现有 RSA数字签名技术进行具体实现; 具体地, 针对本发 明实施例, 其 RSA数字签名技术原理可以是: (1 ) 首先生成 RSA数字 签名密钥对, 其中, 私用密钥用于数字签名, 公有密钥用于对签名进行验 证; 即软件发布方生成并管理一 RSA数字签名密钥对 (第一公开密钥和 第一私有密钥) , 本地设备生成管理另一 RSA数字签名密钥对 (第二公 开密钥和第二私有密钥) , 其中, 本地设备生成的 RSA数字签名密钥对 存储在 OTP中, 不可更改且外部不可访问; (2 ) 当本地设备上的软件需 要更新时, 设备使用第一公开密钥进行签名验证, 其后使用第二私有密钥 重新进行签名; (3 ) 当设备启动加载软件时, 使用所述第二公开密钥进 行签名验证, 如果验证通过则说明该软件包可信, 相反, 如果验证不通过 则说明该软件包不可信。
由上述可知, 本发明实施例提供的一种公钥密码的处理方法, 通过在 本地生成和存储 RSA公私钥对 (即第二公开密钥和第二私有密钥) , 当 本地设备验证了来自软件发布方的软件包合法后, 使用本地的 RSA私钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地。 进一步 地, 将本地生成和存储 RSA公私钥对存储在一次性可编程器件, 能够有 效地防止密钥泄露, 同时攻击者也无法对密钥进行伪造, 在可信环境下, 能够彻底防范软件包被篡改, 提高安全性。
为便于更好的实施本发明实施例提供的公钥密码的处理方法, 本发明 实施例还提供一种基于上述公钥密码的处理方法的装置和系统。 其中名词 的含义与上述公钥密码的处理方法中相同, 具体实现细节可以参考方法实 施例中的说明。
请参考图 3 , 图 3为本发明实施例提供的一种公钥密码的处理装置 300 , 适用于上述实施例中的公钥密码的处理方法, 其中, 所述公钥密码 的处理装置 300包括获取模块 301、 验证模块 302和签名模块 303 , 可以 理解的是, 所述公钥密码的处理装置 300可以是本地设备, 所述本地设备 或公钥密码的处理装置可以具体为移动通信终端(手机)或笔记本计算机 或平板计算机等;
其中, 所述获取模块 301 , 用于获取软件升级指示, 所述软件升级指 示中携带软件包、 软件发布方生成的第一公开密钥、 利用软件发布方生成 的第一私有密钥对软件包进行数字签名生成的签名文件;
所述验证模块 302 , 用于使用所述获取模块 301获取到的第一公开密 钥对所述软件包进行数字签名验证;
所述签名模块 303, 用于使用本地存储的第二私有密钥对所述软件包 进行数字签名, 并将生成的签名数据存入本地。
可以理解的是, 本发明实施例是针对经过使用所述第一公开密钥验证 软件包签名后的软件包, 使用所述第二私有密钥进行数字签名; 另外, 所述第一公开密钥是公钥密码中的公开密钥, 所述第一私有密 钥是公钥密码中的私有密钥; 本发明实施例中, 所述第一公开密钥和所述 第一私有密钥由软件发布方生成、 管理, 并对其存储的安全性负责, 所述 第一公开密钥和所述第一私有密钥也可以称之为 RSA数字签名密钥对, 即 RSA公私钥对。 而所述第二私有密钥可以认为是在预先存储在本地设 备的, 其由本地设备生成、 管理, 并对其存储的安全性负责。
由上述可知, 本发明实施例提供的一种公钥密码的处理装置, 通过在 本地生成和存储 RSA公私钥对, 当本地设备验证了来自软件发布方的软 件包合法后, 使用本地的 RSA私钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地, 在设备上安全地存储、 管理 RSA密钥密码, 从而提高安全性。
进一步地, 所述公钥密码的处理装置 300还可以包括存储模块, 所述 存储模块, 用于将本地生成的预置签名密钥对存储于本地的一次性可编程 器件 OTP, 所述预置签名密钥对包括第二公开密钥和第二私有密钥。
可以理解的是, 一次性可编程器件中一旦数据被写入则不可更改, 也 就是说, 所述第二公开密钥和所述第二私有密钥一旦被确定存储于本地设 备一次性可编程器件 OTP中, 就不可更改且外部不可访问, 由本地设备 进行管理。 也就是说, 在可信环境下, 将公私钥对(第二公开密钥和所述 第二私有密钥)存储在 OTP能够有效地防止密钥泄露, 同时攻击者也无 法对密钥进行伪造, 有效加强安全性, 其中, 按照 3GPP33.320定义, 可 信环境是指能够提供这样的环境, 该环境下敏感功能的运行和敏感数据的 存储均是可信的。
再进一步地, 在该实施方式中, 所述验证模块 302还可以用于在本地 启动加载软件时, 使用所述第二公开密钥对加载的软件的软件包进行数字 签名验证。
也就是说, 本发明实施例中公钥密码的处理应用可以具体为: 网管向 所述公钥密码的处理装置 300下发软件升级指示; 所述公钥密码的处理装 置 300向网管回送软件升级应答; 网管向公钥密码的处理装置 300下软件 包获取方式、 软件包所驻留服务器 IP、 访问账户、 访问口令; 公钥密码的 处理装置 300按照网管的指引向软件包所在服务器发起文件传输请求, 获 取软件包信息, 所述公钥密码的处理装置 300解开软件包, 解析出软件升 级包、 公钥、 签名文件。 其后, 所述公钥密码的处理装置 300利用公钥进 行软件升级包完整性验证。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 描述的公钥密码的处理装置、 该装置中模块单元的具体工作过程, 可以参 考前述方法实施例中的对应过程, 在此不再赘述。
由上述可知, 本发明实施例提供的一种公钥密码的处理装置 300 , 通 过在本地生成和存储 RSA公私钥对(即第二公开密钥和第二私有密钥) , 当本地设备验证了来自软件发布方的软件包合法后, 使用本地的 RSA私 钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地。 进一 步地, 将本地生成和存储 RSA公私钥对存储在一次性可编程器件, 能够 有效地防止密钥泄露, 同时攻击者也无法对密钥进行伪造,在可信环境下, 能够彻底防范软件包被篡改, 提高安全性。
优选地, 本发明实施例还提供一种公钥密码的处理装置 400 , 适用于 上述实施例中的公钥密码的处理方法, 所述公钥密码的处理装置 400可以 是本地设备; 请参考图 4 , 图 4为本发明实施例提供的公钥密码的处理装 置 400的结构示意图, 其中, 所述公钥密码的处理装置 400包括输入装置 401、 输出装置 403、 处理器 402 , 其中, 所述处理器 402执行如下步骤: 获取软件升级指示, 所述软件升级指示中携带软件包、 软件发布方生成的 第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数字签 名生成的签名文件; 使用获取到的第一公开密钥对所述软件包进行数字签 名验证; 使用本地存储的第二私有密钥对所述软件包进行数字签名, 并将 生成的签名数据存入本地。
在某些实施方式中, 所述处理器 402还可以执行如下步骤: 将本地生 成的预置签名密钥对存储于本地的一次性可编程器件 OTP,所述预置签名 密钥对包括第二公开密钥和第二私有密钥;
在某些实施方式中, 所述处理器 402还可以执行如下步骤: 在本地启 动加载软件时, 使用所述第二公开密钥对加载的软件的软件包进行数字签 名验证。
由上述可知, 本发明实施例提供的一种公钥密码的处理装置 400 , 通 过在本地生成和存储 RSA公私钥对(即第二公开密钥和第二私有密钥) , 当本地设备验证了来自软件发布方的软件包合法后, 使用本地的 RSA私 钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地。 进一 步地, 将本地生成和存储 RSA公私钥对存储在一次性可编程器件, 能够 有效地防止密钥泄露, 同时攻击者也无法对密钥进行伪造,在可信环境下, 能够彻底防范软件包被篡改, 提高安全性。
优选地, 本发明实施例还提供一种公钥密码的处理系统 500 , 请参考 图 5 ,图 5为本发明实施例提供的公钥密码的处理系统 500的结构示意图, 所述系统 500包括软件发布方 503、 网管 502和公钥密码的处理装置 501 ; 所述软件发布方 503 ,用于生成并管理第一公开密钥和第一私有密钥, 使用所述第一私有密钥对软件包进行数字签名, 生成签名文件, 并将经过 数字签名后的软件包发布至网管 502;
所述网管 502 , 用于接收所述软件发布方 503发布的软件包, 向所述 公钥密码的处理装置 501发送软件升级指示, 所述软件升级指示中携带所 述软件发布方 503发布的软件包、 所述软件发布方 503生成的第一公开密 钥、 利用所述软件发布方 503生成的第一私有密钥对软件包进行数字签名 生成的签名文件;
所述公钥密码的处理装置 501 , 用于获取所述网管 502发送的软件升 级指示, 使用所述第一公开密钥对所述软件包进行数字签名验证, 使用本 地存储的第二私有密钥对所述软件包进行数字签名, 将生成的签名数据存 入本地。
可以理解的是, 所述公钥密码的处理装置 501可以是釆用如图 3或如 图 4所提供的公钥密码的处理装置; 本发明实施例中, 所述公钥密码的处 理装置 501可以是本地设备, 所述本地设备可以具体为移动通信终端 (手 机) 或笔记本计算机或平板计算机等。
为了更好地理解本公钥密码的处理系统 500的工作流程和原理, 以下 以一具体应用场景,结合参考图 2所示的公钥密码的处理方法的流程示意, 对公钥密码的处理系统 500进行简单分析说明, 在该应用场景下, 所述公 钥密码的处理装置 501为本地设备;
首先, 本地设备生成预置签名密钥对, 将本地生成的预置签名密钥对 存储于本地的一次性可编程器件; 其中, 所述预置签名密钥对包括第二公 开密钥和第二私有密钥, 所述第二公开密钥和所述第二私有密钥由本地设 备生成、 管理, 并对其存储的安全性负责, 可以认为是在预先存储在本地 设备的; 所述第二公开密钥和所述第二私有密钥也是一对 RSA公私钥对。
另外, 在本发明实施例中, 所述第二公开密钥和所述第二私有密钥预 先存储于本地的一次性可编程器件 OTP , 可以理解的是, 一次性可编程器 件中一旦数据被写入则不可更改,且该 OTP存储器在基于芯片级系统 SoC 硬件架构内, 外部不可访问, 也就是说, 所述第二公开密钥和所述第二私 有密钥一旦被确定存储于本地设备一次性可编程器件中, 就不可更改且外 部不可访问, 由本地设备进行管理。 也就是说, 在可信环境下, 将公私钥 对 (第二公开密钥和所述第二私有密钥)存储在 OTP能够有效地防止密 钥泄露, 同时攻击者也无法对密钥进行伪造, 有效加强安全性。
接着, 软件发布方 503生成并管理第一公开密钥和第一私有密钥, 使 用所述第一私有密钥对软件包进行数字签名, 生成签名文件;
可以理解的是, 当软件发布方 503发布软件或补丁时, 会使用其自身 管理的第一私有密钥对软件包进行数字签名, 生成签名文件;
另需要说明的是, 这个软件发布包中包含了软件包本身 (可以是软件 安装包或携带的一些附加程序包) 、 所述第一公开密钥和所述签名文件。
其后, 软件发布方 503将经过数字签名后的软件包发布至网管 502; 可以理解的是, 这个经过数字签名后的软件包可以认为是所述软件发 布包, 网管 502接收所述软件发布包, 所述软件发布包经过所述网管 502 向外发布;
接着, 所述网管 502向本地设备发送软件升级指示, 所述本地设备接 收所述网管 502发送的软件升级指示; 在本发明实施例中, 所述软件升级 指示可以认为是携带了所述软件发布方 503经过所述网管 502向外发布的 软件发布包; 其中, 所述软件升级指示中携带软件包、 软件发布方 503生 成的第一公开密钥、 利用软件发布方 503生成的第一私有密钥对软件包进 行数字签名生成的签名文件;
然后, 本地设备使用所述第一公开密钥对所述软件包进行数字签名验 证; 所述本地设备获取软件升级指示后, 使用获取到的软件发布包中携带 的第一公开密钥对所述软件包进行数字签名验证;
最后, 本地设备使用本地存储的第二私有密钥对经过数字签名验证后 的软件包再次进行数字签名, 并将生成的签名数据存入本地。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 描述的公钥密码的处理系统 500的具体工作过程, 可以参考前述方法实施 例中的对应过程, 在此不再赘述。
由上述可知, 本发明实施例提供的一种公钥密码的处理系统 500 , 通 过在本地生成和存储 RSA公私钥对(即第二公开密钥和第二私有密钥) , 当本地设备验证了来自软件发布方的软件包合法后, 使用本地的 RSA私 钥 (第二私有密钥)对软件包重新签名, 并将签名文件存储于本地。 进一 步地, 将本地生成和存储 RSA公私钥对存储在一次性可编程器件, 能够 有效地防止密钥泄露, 同时攻击者也无法对密钥进行伪造,在可信环境下, 能够彻底防范软件包被篡改, 提高安全性。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简洁, 上述 描述的系统, 装置和单元的具体工作过程, 可以参考前述方法实施例中的 对应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装置 和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅 是示意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实 现时可以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成 到另一个系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论 的相互之间的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单 元的间接耦合或通信连接, 可以是电性, 机械或其它的形式。 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地 方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的 部分或者全部单元来实现本实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以釆用硬件的形式实现, 也可以釆用软 件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品 销售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理 解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技 术方案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品 存储在一个存储介质中, 包括若干指令用以使得一台计算机设备(可以是 个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法 的全部或部分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储 器( ROM, Read-Only Memory )、 随机存取存储器( RAM, Random Access Memory ) 、 磁碟或者光盘等各种可以存储程序代码的介质。
以上对本发明所提供的一种公钥密码的处理方法、 装置及系统进行了 详细介绍, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具 体实施方式及应用范围上均会有改变之处, 综上所述, 本说明书内容不应 理解为对本发明的限制。

Claims

权 利 要 求 书
1、 一种公钥密码的处理方法, 其特征在于, 包括:
获取软件升级指示, 所述软件升级指示中携带软件包、 软件发布方生 成的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数 字签名生成的签名文件;
使用所述第一公开密钥对所述软件包进行数字签名验证;
使用本地存储的第二私有密钥对经过数字签名验证后的软件包再次 进行数字签名;
将生成的签名数据存入本地。
2、 根据权利要求 1所述的处理方法, 其特征在于, 所述方法还包括: 将本地生成的预置签名密钥对存储于本地的一次性可编程器件, 所述 预置签名密钥对包括第二公开密钥和所述第二私有密钥。
3、 根据权利要求 1或 2所述的处理方法, 其特征在于, 所述方法还 包括:
在本地启动加载软件时, 使用所述第二公开密钥对加载的软件的软件 包进行数字签名验证。
4、 一种公钥密码的处理装置, 其特征在于, 包括:
获取模块,用于获取软件升级指示,所述软件升级指示中携带软件包、 软件发布方生成的第一公开密钥、 利用软件发布方生成的第一私有密钥对 软件包进行数字签名生成的签名文件;
验证模块, 用于使用所述第一公开密钥对所述软件包进行数字签名验 证;
签名模块, 用于使用本地存储的第二私有密钥对经过数字签名验证后 的软件包再次进行数字签名, 并将生成的签名数据存入本地。
5、 根据权利要求 4所述的处理装置, 其特征在于, 所述处理装置还 包括:
存储模块, 用于将本地生成的预置签名密钥对存储于本地的一次性可 编程器件, 所述预置签名密钥对包括第二公开密钥和第二私有密钥。
6、 根据权利要求 4或 5所述的处理装置, 其特征在于, 所述验证模 块还用于在本地启动加载软件时, 使用所述第二公开密钥对加载的软件的 软件包进行数字签名验证。
7、 一种公钥密码的处理装置, 其特征在于, 包括输入装置、 输出装 置和处理器, 所述处理器执行如下步骤:
获取软件升级指示, 所述软件升级指示中携带软件包、 软件发布方生 成的第一公开密钥、 利用软件发布方生成的第一私有密钥对软件包进行数 字签名生成的签名文件; 使用所述第一公开密钥对所述软件包进行数字签 名验证; 使用本地存储的第二私有密钥对经过数字签名验证后的软件包再 次进行数字签名, 并将生成的签名数据存入本地。
8、 根据权利要求 7所述的处理装置, 其特征在于, 所述处理器还执 行如下步骤: 将本地生成的预置签名密钥对存储于本地的一次性可编程器 件, 所述预置签名密钥对包括第二公开密钥和第二私有密钥。
9、 根据权利要求 7或 8所述的处理装置, 其特征在于, 所述处理器 还执行如下步骤: 在本地启动加载软件时, 使用所述第二公开密钥对加载 的软件的软件包进行数字签名验证。
10、 一种公钥密码的处理系统, 其特征在于, 包括软件发布方、 网管 和公钥密码的处理装置;
所述软件发布方, 用于生成并管理第一公开密钥和第一私有密钥, 使 用所述第一私有密钥对软件包进行数字签名, 生成签名文件, 并将经过数 字签名后的软件包发布至网管;
所述网管, 用于接收所述软件发布方发布的软件包, 向所述公钥密码 的处理装置发送软件升级指示, 所述软件升级指示中携带所述软件发布方 发布的软件包、 所述软件发布方生成的第一公开密钥、 利用所述软件发布 方生成的第一私有密钥对软件包进行数字签名生成的签名文件;
所述公钥密码的处理装置, 用于获取所述网管发送的软件升级指示, 使用所述第一公开密钥对所述软件包进行数字签名验证, 使用本地存储的 第二私有密钥对所述软件包再次进行数字签名, 将生成的签名数据存入本 地。
PCT/CN2014/078584 2013-06-24 2014-05-28 一种公钥密码的处理方法、装置及系统 WO2014206171A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2013102543417A CN103354496A (zh) 2013-06-24 2013-06-24 一种公钥密码的处理方法、装置及系统
CN201310254341.7 2013-06-24

Publications (1)

Publication Number Publication Date
WO2014206171A1 true WO2014206171A1 (zh) 2014-12-31

Family

ID=49310812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078584 WO2014206171A1 (zh) 2013-06-24 2014-05-28 一种公钥密码的处理方法、装置及系统

Country Status (2)

Country Link
CN (1) CN103354496A (zh)
WO (1) WO2014206171A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016109955A1 (zh) * 2015-01-07 2016-07-14 华为技术有限公司 一种软件校验方法和装置
EP3343424A4 (en) * 2015-09-16 2018-08-15 Huawei Technologies Co., Ltd. Control board secure start method, and software package upgrade method and device

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103354496A (zh) * 2013-06-24 2013-10-16 华为技术有限公司 一种公钥密码的处理方法、装置及系统
KR20150084221A (ko) * 2014-01-13 2015-07-22 삼성전자주식회사 어플리케이션 패키지의 재서명 장치, 방법 및 상기 어플리케이션 패키지를 실행하는 단말장치
WO2016015207A1 (zh) * 2014-07-28 2016-02-04 华为技术有限公司 一种信息安全验证方法及设备
CN109842488A (zh) * 2017-11-28 2019-06-04 中天安泰(北京)信息技术有限公司 用于物理芯片内的密钥生成组件
US11372977B2 (en) * 2018-11-12 2022-06-28 Thirdwayv, Inc. Secure over-the-air firmware upgrade
CN111382397B (zh) * 2020-02-26 2023-03-24 浙江大华技术股份有限公司 升级软件包配置方法、软件升级方法、设备及存储装置
CN115277112A (zh) * 2022-07-07 2022-11-01 海南视联通信技术有限公司 数据处理方法、装置、电子设备及存储介质
CN116880884B (zh) * 2023-09-08 2023-11-24 鼎铉商用密码测评技术(深圳)有限公司 电子设备的更新方法、更新设备以及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866870A (zh) * 2006-02-23 2006-11-22 华为技术有限公司 基于设备管理协议的软件合法性验证系统及验证方法
CN102833745A (zh) * 2012-07-17 2012-12-19 华为技术有限公司 一种软件安全升级的方法、通信设备和通信系统
CN102955700A (zh) * 2011-08-18 2013-03-06 腾讯科技(深圳)有限公司 软件升级系统及方法
CN103354496A (zh) * 2013-06-24 2013-10-16 华为技术有限公司 一种公钥密码的处理方法、装置及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101281495A (zh) * 2007-04-02 2008-10-08 北京华旗资讯数码科技有限公司 利用移动存储装置对文件加密的方法
JP5404030B2 (ja) * 2008-12-26 2014-01-29 デジタルア−ツ株式会社 電子ファイル送信方法
CN101448286B (zh) * 2008-12-26 2011-02-16 成都卫士通信息产业股份有限公司 一种移动数字电视用户漫游授权方法
CN101784051B (zh) * 2009-01-21 2012-11-21 华为技术有限公司 一种平台完整性验证的方法、网络设备和网络系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1866870A (zh) * 2006-02-23 2006-11-22 华为技术有限公司 基于设备管理协议的软件合法性验证系统及验证方法
CN102955700A (zh) * 2011-08-18 2013-03-06 腾讯科技(深圳)有限公司 软件升级系统及方法
CN102833745A (zh) * 2012-07-17 2012-12-19 华为技术有限公司 一种软件安全升级的方法、通信设备和通信系统
CN103354496A (zh) * 2013-06-24 2013-10-16 华为技术有限公司 一种公钥密码的处理方法、装置及系统

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016109955A1 (zh) * 2015-01-07 2016-07-14 华为技术有限公司 一种软件校验方法和装置
US10796001B2 (en) 2015-01-07 2020-10-06 Huawei Technologies Co., Ltd. Software verification method and apparatus
EP3343424A4 (en) * 2015-09-16 2018-08-15 Huawei Technologies Co., Ltd. Control board secure start method, and software package upgrade method and device

Also Published As

Publication number Publication date
CN103354496A (zh) 2013-10-16

Similar Documents

Publication Publication Date Title
WO2014206171A1 (zh) 一种公钥密码的处理方法、装置及系统
CN106656476B (zh) 一种密码保护方法、装置及计算机可读存储介质
US11265319B2 (en) Method and system for associating a unique device identifier with a potential security threat
CN106063183B (zh) 用于云辅助密码学的方法和装置
US8953790B2 (en) Secure generation of a device root key in the field
CN106416121B (zh) 用于签名产生和加密/解密的共模rsa密钥对
WO2018050081A1 (zh) 设备身份认证的方法、装置、电子设备及存储介质
EP2743855B1 (en) Secure configuration of mobile application
TWI454935B (zh) 自非本端儲存器安全地啟動及組態一子系統
WO2019218919A1 (zh) 区块链场景下的私钥管理方法、装置及系统
CN110050437B (zh) 分布式证书注册的装置和方法
CN103138939B (zh) 云存储模式下基于可信平台模块的密钥使用次数管理方法
CN107251481A (zh) 利用匿名密钥系统进行可信平台模块认证和证明
US10601590B1 (en) Secure secrets in hardware security module for use by protected function in trusted execution environment
US9331995B2 (en) Secure configuration of mobile application
KR101729960B1 (ko) 신뢰 보안 플랫폼 모듈을 이용한 보안 애플리케이션 인증 및 관리 방법 및 장치
CN103503366A (zh) 管理针对认证设备的数据
CN110362990A (zh) 应用安装的安全处理方法、装置及系统
CN107294710B (zh) 一种vTPM2.0的密钥迁移方法及装置
EP2547135A2 (en) Apparatus and method for preventing copying of terminal unique information in portable terminal
CN105320535A (zh) 一种安装包的校验方法、客户端、服务器及系统
CN111241492A (zh) 一种产品多租户安全授信方法、系统及电子设备
CN106411520B (zh) 一种虚拟资源数据的处理方法、装置及系统
CN109361681A (zh) 国密证书认证方法、装置及设备
EP3720042B1 (en) Method and device for determining trust state of tpm, and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14818101

Country of ref document: EP

Kind code of ref document: A1