CN112817608A - 一种可信计算工控机的程序包安装方法 - Google Patents

一种可信计算工控机的程序包安装方法 Download PDF

Info

Publication number
CN112817608A
CN112817608A CN202110036446.XA CN202110036446A CN112817608A CN 112817608 A CN112817608 A CN 112817608A CN 202110036446 A CN202110036446 A CN 202110036446A CN 112817608 A CN112817608 A CN 112817608A
Authority
CN
China
Prior art keywords
trusted
certificate
personal computer
program package
industrial personal
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110036446.XA
Other languages
English (en)
Inventor
叶婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Jiean Information Technology Co ltd
Original Assignee
Nanjing Jiean Information Technology Co ltd
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 Nanjing Jiean Information Technology Co ltd filed Critical Nanjing Jiean Information Technology Co ltd
Priority to CN202110036446.XA priority Critical patent/CN112817608A/zh
Publication of CN112817608A publication Critical patent/CN112817608A/zh
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/51Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems at application loading time, e.g. accepting, rejecting, starting or inhibiting executable software based on integrity or source reliability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开一种可信计算工控机的程序包安装方法,包括以下步骤:(1)获得程序开发商提供的程序包;(2)可信权威机构使用私钥对程序包进行签名,生成签名数据;(3)将签名数据和程序包一起打包成带签名的数据包;(4)将可信权威机构签名的私钥对应的公钥在CA证书授权中心制作证书,获得CA根证书和可信权威机构签名证书;(5)将CA根证书和可信权威机构签名证书导入可信计算工控机的TPCM可信平台控制模块;(6)在可信计算工控机上安装程序包。本发明确保可信计算工控机安装的程序包是可信的程序包,避免被恶意修改、非授权许可等程序的安装。

Description

一种可信计算工控机的程序包安装方法
技术领域
本发明涉及一种程序包安装方法,尤其涉及一种可信计算工控机的程序包安装方法。
背景技术
目前工控机上软件程序包的安装或者升级方法,一般采用将程序包传输到工控机上,直接执行安装包或者拷贝文件到相应目录进行安装或者升级。此安装、升级方法缺乏对安装包和升级文件的安全性、合法性、完整性进行校验,如果文件携带病毒或者文件已经被恶意修改都无法发现,给工控机的安全可靠运行带来威胁。
为解决软件程序包安装、升级的安全问题,部分领域采用了对文件进行校验的方案。比如在安装软件时用软件包发布的MD5值进行校验,或用文件包携带的证书进行校验。但是这些方法仍然存在安全隐患或者漏洞,譬如伪造者可以在发布伪造软件程序包时同时伪造MD5值或者伪造虚假证书,在使用了伪造过的MD5或虚假证书对文件进行校验时,还是无法保证软件程序的安全性、合法性、完整性。
目前常用的工控机软件程序安装和升级技术,存在安装、升级过程缺乏对安装包和升级文件的安全性、合法性、完整性进行校验的问题。如果文件携带病毒或者文件已经被恶意修改都无法被发现,给工控机的安全可靠运行带来威胁。
发明内容
发明目的:本发明旨在解决现有技术的上述不足,提供一种可信计算工控机的程序包安装方法,解决安装或升级过程缺乏对安装包和升级文件的安全性、合法性、完整性进行校验的问题。
技术方案:本发明所述的可信计算工控机的程序包安装方法,包括以下步骤:
(1)获得程序开发商提供的程序包;
(2)可信权威机构使用私钥对程序包签名,生成签名数据;
(3)将签名数据和程序包一起打包成带签名的数据包;
(4)获得采用与私钥对应的公钥制作的CA根证书和可信权威机构签名证书;
(5)将CA根证书和可信权威机构签名证书导入可信计算工控机;
(6)在可信计算工控机上安装程序包。
步骤(6)包括以下步骤:
(61)采用CA根证书验证可信权威机构签名证书;
(62)如果验证通过,则执行步骤(63),如果验证失败,则执行步骤(66);
(63)使用可信权威机构签名证书对数据包签名验证;
(64)如果验证通过,则执行步骤(65),如果验证失败,则执行步骤(66);
(65)安装程序包;
(66)禁止程序包安装。
所述可信权威机构是程序检验机构或程序使用用户。
所述签名的数据包和可信权威机构签名证书分开,避免程序包签名数据和证书被同时替换。
所述CA根证书和可信权威机构签名证书在CA证书授权中心制作。
所述CA根证书和可信权威机构签名证书存储在可信计算工控机的保密存储区,无法更换或者伪造公钥,保证程序包的完整性和真实性。
有益效果:与现有技术相比,本发明的显著优点为确保可信计算工控机安装的程序包是可信的程序包,避免被恶意修改、非授权许可等程序的安装。
附图说明
图1为本发明方法流程图;
图2为本发明的程序安装流程图。
具体实施方式
下面结合附图对本发明的技术方案作进一步说明。
由图1和图2可知,本发明所述的可信计算工控机的程序包安装方法,包括以下步骤:
(1)获得程序开发商提供的程序包。程序包为“software.exe”、“software.bin”、“software.tar.gz”等。
(2)可信权威机构使用私钥对程序包进行签名,生成签名数据。可信权威机构可以是程序检验机构,譬如是电力领域的中国电力科学研究院;也可以是程序使用的用户,譬如电力领域的国家电网公司或南方电网公司。可信权威机构采用国密算法SM3计算程序包文件DATA1的hash值DATA2,然后再用国密算法SM2的私钥sm2_private.key对hash值DATA2进行签名得到签名数据DATA3。
(3)将签名数据和程序包一起打包成带签名的数据包。即将步骤(2)的签名数据DATA3追加到程序包数据DATA1后,得到带签名的数据包DATA4,即DATA4=DATA1+DATA3。
(4)将可信权威机构签名的私钥对应的公钥在CA证书授权中心制作证书,获得CA根证书和可信权威机构签名证书。
将可信权威机构签名的私钥sm2_private.key对应的公钥sm2_public.key,在CA证书授权中心申请制作证书。CA证书授权中心可以是电力领域的国家电网公司或南方电网公司指定或认可的CA中心。最后获得CA根证书ca_sm2.cer和可信权威机构签名证书verification_sm2.cer。
(5)将CA根证书ca_sm2.cer和可信权威机构签名证书verification_sm2.cer导入可信计算工控机的TPCM可信平台控制模块,所述可信计算工控机为以后需要安装或升级程序包的工控机。
(6)在可信计算工控机上安装程序包。具体包括以下步骤:
(61)在可信计算工控机上,采用CA根证书验证可信权威机构签名证书。即使用步骤(5)的ca_sm2.cer和国秘算法SM2对verification_sm2.cer的有效性进行校验。
(62)如果验证通过,则执行步骤(63),如果验证失败,则执行步骤(66)。
(63)将带安装升级的程序包传输到上述可信工控机上,TPCM可信平台控制模块中的可信权威机构签名证书对程序包签名验证。
在可信工控机上安装程序包时,会自动触发TPCM可信平台控制模块对程序包的校验。TPCM可信平台控制模块自动查找程序包是否有签名数据DATA3。如果没有签名数据DATA3,则直接执行步骤(66);如果有签名数据DATA3,则使用步骤(5)verification_sm2.cer证书对程序包数据DATA1和签名数据DATA3进行验证。
(64)如果验证通过,则执行步骤(65),如果验证失败,则执行步骤(66)。
(65)安装程序包。按照安装程序的提示,一步步完成程序的安装。
(66)禁止程序包安装。签名失败的原因可能是数据包已经被篡改、数据包没有可信经权威机构过签名等。
与将证书打包到程序包里的其它实现方法不同,本发明的验签公钥证书在可信TPCM的保密存储区,无法更换或者伪造公钥,因此可以保证程序包的完整性和真实性。而且本发明中签名数据和可信权威机构签名证书分开,证书数据不在程序包中,避免程序包签名数据和证书被同时替换。

Claims (6)

1.一种可信计算工控机的程序包安装方法,其特征在于:包括以下步骤:
(1)获得程序开发商提供的程序包;
(2)可信权威机构使用私钥对程序包签名,生成签名数据;
(3)将签名数据和程序包一起打包成带签名的数据包;
(4)获得采用与私钥对应的公钥制作的CA根证书和可信权威机构签名证书;
(5)将CA根证书和可信权威机构签名证书导入可信计算工控机;
(6)在可信计算工控机上安装程序包。
2.根据权利要求1所述的可信计算工控机的程序包安装方法,其特征在于:步骤(6)包括以下步骤:
(61)采用CA根证书验证可信权威机构签名证书;
(62)如果验证通过,则执行步骤(63),如果验证失败,则执行步骤(66);
(63)使用可信权威机构签名证书对数据包签名验证;
(64)如果验证通过,则执行步骤(65),如果验证失败,则执行步骤(66);
(65)安装程序包;
(66)禁止程序包安装。
3.根据权利要求1所述的可信计算工控机的程序包安装方法,其特征在于:所述可信权威机构是程序检验机构或程序使用用户。
4.根据权利要求1所述的可信计算工控机的程序包安装方法,其特征在于:所述签名的数据包和可信权威机构签名证书分开。
5.根据权利要求1所述的可信计算工控机的程序包安装方法,其特征在于:所述CA根证书和可信权威机构签名证书在CA证书授权中心制作。
6.根据权利要求1所述的可信计算工控机的程序包安装方法,其特征在于:所述CA根证书和可信权威机构签名证书存储在可信计算工控机的保密存储区。
CN202110036446.XA 2021-01-12 2021-01-12 一种可信计算工控机的程序包安装方法 Pending CN112817608A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110036446.XA CN112817608A (zh) 2021-01-12 2021-01-12 一种可信计算工控机的程序包安装方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110036446.XA CN112817608A (zh) 2021-01-12 2021-01-12 一种可信计算工控机的程序包安装方法

Publications (1)

Publication Number Publication Date
CN112817608A true CN112817608A (zh) 2021-05-18

Family

ID=75868868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110036446.XA Pending CN112817608A (zh) 2021-01-12 2021-01-12 一种可信计算工控机的程序包安装方法

Country Status (1)

Country Link
CN (1) CN112817608A (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292746A (zh) * 2022-07-28 2022-11-04 南京国电南自电网自动化有限公司 一种应用程序可信编译及运行方法
CN116361773A (zh) * 2023-03-28 2023-06-30 南京捷安信息科技有限公司 一种可信白名单特权清单的设计方法、系统及存储介质

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115292746A (zh) * 2022-07-28 2022-11-04 南京国电南自电网自动化有限公司 一种应用程序可信编译及运行方法
CN116361773A (zh) * 2023-03-28 2023-06-30 南京捷安信息科技有限公司 一种可信白名单特权清单的设计方法、系统及存储介质
CN116361773B (zh) * 2023-03-28 2024-03-08 南京捷安信息科技有限公司 一种可信白名单特权清单的设计方法、系统及存储介质

Similar Documents

Publication Publication Date Title
CN107463806B (zh) 一种Android应用程序安装包的签名和验签方法
CN108399329B (zh) 一种提高可信应用程序安全的方法
US9276752B2 (en) System and method for secure software update
EP2634960B1 (en) Method and apparatus for incremental code signing
CN104156638B (zh) 一种面向安卓系统软件的扩展签名的实现方法
CN105787357B (zh) 一种基于安卓系统apk下载方法及其系统
CN103530534B (zh) 一种基于签名验证的Android程序ROOT授权方法
US20170262656A1 (en) Method and device for providing verifying application integrity
CN106230598A (zh) 移动终端第三方应用安全认证方法和装置
CN106355081A (zh) 一种安卓程序启动校验方法和装置
EP3026560A1 (en) Method and device for providing verifying application integrity
CN107729746B (zh) 一种基于数字签名的已安装应用程序防篡改方法及系统
CN102663320A (zh) 终端识别开发者及划分不同权限开发者的方法
CN112817608A (zh) 一种可信计算工控机的程序包安装方法
CN109922076B (zh) 一种软锁许可过程中的安全通信方法和授权平台
CN104915591A (zh) 一种数据处理方法及电子设备
US20170262658A1 (en) Method and device for providing verifying application integrity
US20090125985A1 (en) Verifying electronic control unit code
CN106612183B (zh) 国产操作系统下应用软件的交叉数字签名方法及系统
CN104680061A (zh) 一种Android环境下应用程序启动中代码签名验证的方法和系统
CN108496323B (zh) 一种证书导入方法及终端
CN112507328A (zh) 一种文件签名方法、计算设备及存储介质
JP2014048800A (ja) 認証システムおよび認証方法
JP2017011491A (ja) 認証システム
CN113055181A (zh) Ota文件安全处理方法、装置及系统

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination