CN110719162A - 一种基于sm2算法保障银行自助终端系统安全的方法 - Google Patents
一种基于sm2算法保障银行自助终端系统安全的方法 Download PDFInfo
- Publication number
- CN110719162A CN110719162A CN201910832069.3A CN201910832069A CN110719162A CN 110719162 A CN110719162 A CN 110719162A CN 201910832069 A CN201910832069 A CN 201910832069A CN 110719162 A CN110719162 A CN 110719162A
- Authority
- CN
- China
- Prior art keywords
- terminal
- algorithm
- public key
- vendorpublickey
- bank
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/0825—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
-
- G—PHYSICS
- G07—CHECKING-DEVICES
- G07F—COIN-FREED OR LIKE APPARATUS
- G07F19/00—Complete banking systems; Coded card-freed arrangements adapted for dispensing or receiving monies or the like and posting such transactions to existing accounts, e.g. automatic teller machines
- G07F19/20—Automatic teller machines [ATMs]
- G07F19/209—Monitoring, auditing or diagnose of functioning of ATMs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/06—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
- H04L9/0643—Hash functions, e.g. MD5, SHA, HMAC or f9 MAC
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/14—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using a plurality of keys or algorithms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3226—Cryptographic 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 using a predetermined code, e.g. password, passphrase or PIN
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3236—Cryptographic 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 using cryptographic hash functions
- H04L9/3242—Cryptographic 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 using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Power Engineering (AREA)
- Finance (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种基于SM2算法保障银行自助终端系统安全的方法,设计了装机码申请流程和机端公钥传输加密流程,使银行后台可以验证设备终端公钥导出及服务端公钥导入的是否合法;主要防止伪装终端欺骗和国际攻击波及伤害;本发明基于SM2算法,响应了国家密码局推广国密算法的号召,有着极大的政策优势,使我国银行终端区别于国际设备,提高安全性,预防国际攻击波及;同时本发明所使用的SM2算法,同样也可切换成RSA算法,具备更多的配置灵活性。
Description
技术领域
本发明涉及一种基于SM2算法保障银行自助终端系统安全的方法,属于银行自助设备技术领域。
背景技术
现有的自助柜员机应用系统中,密码键盘和银行后台85%使用的均是对称加密密钥体系,另有15%左右基于wosa标准的RSA算法,相较对称加密算法安全性有较大的提升,但是机端公钥和服务端公钥以明文进行传输,且没有双向校验的过程。
基于对称加密密钥体系设计的交易系统,主密钥属于明文传输,容易从日志和串口数据等进行破获;基于wosa标准的RSA算法,相较传统对称加密算法安全性有较大的提升,但是机端公钥和服务端公钥以明文进行传输,且是已开放标准接口及加解密流程,容易被黑客获取破解,并进行伪装终端欺骗。
基于wosa标准的RSA算法,国际通用接口,从国家战略角度,容易被别国黑客针对,也让容易被攻击波及,一旦国际上某个银行网点被攻破,那么同样一套程序也能破解国内应用wosa标准的RSA算法的银行,很容易被波及受灾。
发明内容
针对上述存在的技术问题,本发明的目的是:提出了一种基于SM2算法保障银行自助终端系统安全的方法,极大降低伪装终端的风险,通过加密机端公钥传输过程,保证机端公钥传输的安全性。
本发明的技术解决方案是这样实现的:一种基于SM2算法保障银行自助终端系统安全的方法,包括如下步骤,
1)申请装机码MachineCodeKey:网点人员根据机构号BranchNo,设备号DeviceNo申请装机码,银行后台Service(服务端)校验其合法性,并下发装机码;
2)将服务端公钥ServerPublicKey导入终端:此终端校验ServerPublicKey长度合法性,然后保存至密码键盘;
3)终端公钥VendorPublicKey加密传输:
a.将装机码MachineCodeKey(16Byte)依据SM4算法导入键盘,得到MachineCodeKCV(16字节);
b.密码键盘生成16Byte随机数RandomData;
c.装机码MachineCodeKey和随机数RandomData异或合成HMACKEY,并依据SM4算法导入键盘;
d.密码键盘依据SM2生产机端公私钥对,并将终端公钥VendorPublicKey(64Byte)从密码键盘中导出;
e.使用服务端公钥ServerPublicKey依据SM2算法对随机数RandomData进行加密,得到随机数密文EncRandom(128Byte);
f.使用HMACKEY对终端公钥VendorPublicKey依据SM4算法进行mac计算,得到HMAC(16Byte);
g.生成终端公钥VendorPublicKey的密文数;
h.据:“MachineCodeKCV”+“EncRandom”+“VendorPublicKey”+“HMAC”,以‘;’分隔,导出给银行后台服务端;
4)应用端校验服务端公钥合法性:
a.根据装机码MachineCodeKCV校验装机码传输正确性,根据VendorPublicKey长度验证终端公钥数据长度是否合法;
b.使用ServerPrivateKey将EncRandom还原,得到设备端生成的随机数Random;
c.使用Random和MachineCode异或成HMACKEY,对VendorPublicKey做mac校验得到HMAC,来验证VendorPublicKey的数据是否被篡改;
d.导入合法的VendorPublicKey(校验服务端公钥完成);
e.使用VendorPublicKey依据SM2算法加密后续交易需要使用的SM4算法的主密钥mkey,得到Encmkey;下发给设备端;
5)终端校验终端公钥传输合法性:
a.校验EncmKey长度的合法性;
b.使用VendorPrivateKey依据SM2算法解密Encmkey,得到mkey,成功解密,说明银行后台服务端收到的机端公钥合法,即终端校验终端公钥传输合法性完成;
c.将mkey依据SM4算法导入密码键盘中得到mkeyKCV,上送银行后台服务端;
6)服务端校验mkey传输正确性:根据mkeyKCV判断mkey传输正确性,如果正确,说明机端的公私钥对加解密正常,至此终端装机完毕。
由于上述技术方案的运用,本发明与现有技术相比具有下列优点:
本发明的一种基于SM2算法保障银行自助终端系统安全的方法,设计了装机码申请流程和机端公钥传输加密流程,使银行后台可以验证设备终端公钥导出及服务端公钥导入的是否合法;主要防止伪装终端欺骗和国际攻击波及伤害;本发明基于SM2算法,响应了国家密码局推广国密算法的号召,有着极大的政策优势,使我国银行终端区别于国际设备,提高安全性,预防国际攻击波及;同时本发明所使用的SM2算法,同样也可切换成RSA算法,具备更多的配置灵活性。
具体实施方式
下面来说明本发明。
本发明所述的一种基于SM2算法保障银行自助终端系统安全的方法,银行系统在应用非对称密钥加密体系时,银行后台Service(服务端)会有一对公私钥,我们这里命名为:ServerPublicKey和ServerPrivateKey,设备终端有一对公私钥,我们命名为VendorPublicKey和VendorPrivateKey,银行后台和终端会互相交换自己的公钥,交换之后,银行后台将需要传递给终端的信息使用VendorPublicKey进行加密,后台接收到后,使用VendorPrivateKey进行解密,即可获得信息;终端需要给银行发送信息反之亦然;
本技术是基于SM2算法来进行开发。属于非对称密钥加密体系,为了防止伪造终端,我们设计了申请装机码环节,机端公钥传输加密环节,以及校验服务端公钥,机端公钥环节,保障银行终端安全可靠;具体包括如下步骤,
1)申请装机码MachineCodeKey:网点人员根据机构号BranchNo,
设备号DeviceNo申请装机码,银行后台Service(服务端)校验其合法性,并下发装机码;
2)将服务端公钥ServerPublicKey导入终端:此终端校验ServerPublicKey长度合法性,然后保存至密码键盘;
3)终端公钥VendorPublicKey加密传输:
a.将装机码MachineCodeKey(16Byte)依据SM4算法导入键盘,得到MachineCodeKCV(16字节);
b.密码键盘生成16Byte随机数RandomData;
c.装机码MachineCodeKey和随机数RandomData异或合成HMACKEY,并依据SM4算法导入键盘;
d.密码键盘依据SM2生产机端公私钥对,并将终端公钥VendorPublicKey(64Byte)从密码键盘中导出;
e.使用服务端公钥ServerPublicKey依据SM2算法对随机数RandomData进行加密,得到随机数密文EncRandom(128Byte);
f.使用HMACKEY对终端公钥VendorPublicKey依据SM4算法进行mac计算,得到HMAC(16Byte);
g.生成终端公钥VendorPublicKey的密文数;
h.据:“MachineCodeKCV”+“EncRandom”+“VendorPublicKey”+“HMAC”,以‘;’分隔,导出给银行后台服务端;
4)应用端校验服务端公钥合法性:
a.根据装机码MachineCodeKCV校验装机码传输正确性,根据VendorPublicKey长度验证终端公钥数据长度是否合法;
b.使用ServerPrivateKey将EncRandom还原,得到设备端生成的随机数Random;
c.使用Random和MachineCode异或成HMACKEY,对VendorPublicKey做mac校验得到HMAC,来验证VendorPublicKey的数据是否被篡改;
d.导入合法的VendorPublicKey(校验服务端公钥完成);
e.使用VendorPublicKey依据SM2算法加密后续交易需要使用的SM4算法的主密钥mkey,得到Encmkey;下发给设备端;
5)终端校验终端公钥传输合法性:
a.校验EncmKey长度的合法性;
b.使用VendorPrivateKey依据SM2算法解密Encmkey,得到mkey,成功解密,说明银行后台服务端收到的机端公钥合法,即终端校验终端公钥传输合法性完成;
c.将mkey依据SM4算法导入密码键盘中得到mkeyKCV,上送银行后台服务端;
6)服务端校验mkey传输正确性:根据mkeyKCV判断mkey传输正确性,如果正确,说明机端的公私钥对加解密正常,至此终端装机完毕。
本发明的一种基于SM2算法保障银行自助终端系统安全的方法,设计了装机码申请流程和机端公钥传输加密流程,使银行后台可以验证设备终端公钥导出及服务端公钥导入的是否合法;主要防止伪装终端欺骗和国际攻击波及伤害;本发明基于SM2算法,响应了国家密码局推广国密算法的号召,有着极大的政策优势,使我国银行终端区别于国际设备,提高安全性,预防国际攻击波及;同时本发明所使用的SM2算法,同样也可切换成RSA算法,具备更多的配置灵活性。
上述实施例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本发明的内容并加以实施,并不能以此限制本发明的保护范围,凡根据本发明精神实质所作的等效变化或修饰,都应涵盖在本发明的保护范围内。
Claims (1)
1.一种基于SM2算法保障银行自助终端系统安全的方法,其特征在于:包括如下步骤,
1)申请装机码MachineCodeKey:网点人员根据机构号BranchNo,设备号DeviceNo申请装机码,银行后台Service(服务端)校验其合法性,并下发装机码;
2)将服务端公钥ServerPublicKey导入终端:此终端校验ServerPublicKey长度合法性,然后保存至密码键盘;
3)终端公钥VendorPublicKey加密传输:
a.将装机码MachineCodeKey(16Byte)依据SM4算法导入键盘,得到MachineCodeKCV(16字节);
b.密码键盘生成16Byte随机数RandomData;
c.装机码MachineCodeKey和随机数RandomData异或合成HMACKEY,并依据SM4算法导入键盘;
d.密码键盘依据SM2生产机端公私钥对,并将终端公钥VendorPublicKey(64Byte)从密码键盘中导出;
e.使用服务端公钥ServerPublicKey依据SM2算法对随机数RandomData进行加密,得到随机数密文EncRandom(128Byte);
f.使用HMACKEY对终端公钥VendorPublicKey依据SM4算法进行mac计算,得到HMAC(16Byte);
g.生成终端公钥VendorPublicKey的密文数;
h.据:“MachineCodeKCV”+“EncRandom”+“VendorPublicKey”+“HMAC”,以‘;’分隔,导出给银行后台服务端;
4)应用端校验服务端公钥合法性:
a.根据装机码MachineCodeKCV校验装机码传输正确性,根据VendorPublicKey长度验证终端公钥数据长度是否合法;
b.使用ServerPrivateKey将EncRandom还原,得到设备端生成的随机数Random;
c.使用Random和MachineCode异或成HMACKEY,对VendorPublicKey做mac校验得到HMAC,来验证VendorPublicKey的数据是否被篡改;
d.导入合法的VendorPublicKey(校验服务端公钥完成);
e.使用VendorPublicKey依据SM2算法加密后续交易需要使用的SM4算法的主密钥mkey,得到Encmkey;下发给设备端;
5)终端校验终端公钥传输合法性:
a.校验EncmKey长度的合法性;
b.使用VendorPrivateKey依据SM2算法解密Encmkey,得到mkey,成功解密,说明银行后台服务端收到的机端公钥合法,即终端校验终端公钥传输合法性完成;
c.将mkey依据SM4算法导入密码键盘中得到mkeyKCV,上送银行后台服务端;
6)服务端校验mkey传输正确性:根据mkeyKCV判断mkey传输正确性,如果正确,说明机端的公私钥对加解密正常,至此终端装机完毕。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910832069.3A CN110719162B (zh) | 2019-09-04 | 2019-09-04 | 一种基于sm2算法保障银行自助终端系统安全的方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910832069.3A CN110719162B (zh) | 2019-09-04 | 2019-09-04 | 一种基于sm2算法保障银行自助终端系统安全的方法 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110719162A true CN110719162A (zh) | 2020-01-21 |
CN110719162B CN110719162B (zh) | 2022-08-09 |
Family
ID=69209635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910832069.3A Active CN110719162B (zh) | 2019-09-04 | 2019-09-04 | 一种基于sm2算法保障银行自助终端系统安全的方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110719162B (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140095886A1 (en) * | 2012-09-28 | 2014-04-03 | William T. Futral | Methods, systems and apparatus to self authorize platform code |
CN106817369A (zh) * | 2017-01-05 | 2017-06-09 | 深圳市证通电子股份有限公司 | 数据安全交互方法和系统 |
CN107896147A (zh) * | 2017-12-07 | 2018-04-10 | 福建联迪商用设备有限公司 | 一种基于国密算法协商临时会话密钥的方法及其系统 |
CN108111311A (zh) * | 2017-12-25 | 2018-06-01 | 福建升腾资讯有限公司 | 一种基于国密算法实现银行柜面电子签字的方法 |
CN109802834A (zh) * | 2017-11-16 | 2019-05-24 | 航天信息股份有限公司 | 一种对业务层数据进行加密、解密的方法及系统 |
-
2019
- 2019-09-04 CN CN201910832069.3A patent/CN110719162B/zh active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140095886A1 (en) * | 2012-09-28 | 2014-04-03 | William T. Futral | Methods, systems and apparatus to self authorize platform code |
CN106817369A (zh) * | 2017-01-05 | 2017-06-09 | 深圳市证通电子股份有限公司 | 数据安全交互方法和系统 |
CN109802834A (zh) * | 2017-11-16 | 2019-05-24 | 航天信息股份有限公司 | 一种对业务层数据进行加密、解密的方法及系统 |
CN107896147A (zh) * | 2017-12-07 | 2018-04-10 | 福建联迪商用设备有限公司 | 一种基于国密算法协商临时会话密钥的方法及其系统 |
CN108111311A (zh) * | 2017-12-25 | 2018-06-01 | 福建升腾资讯有限公司 | 一种基于国密算法实现银行柜面电子签字的方法 |
Also Published As
Publication number | Publication date |
---|---|
CN110719162B (zh) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020087805A1 (zh) | 基于双密值和混沌加密的可信测控网络认证方法 | |
CN107786550B (zh) | 一种自助设备的安全通信方法、安全通信系统及自助设备 | |
CN101662469B (zh) | 基于USBKey网上银行交易信息认证的方法和系统 | |
CN102664739A (zh) | 一种基于安全证书的pki实现方法 | |
CN109194656A (zh) | 一种配电无线终端安全接入的方法 | |
CN103338215A (zh) | 基于国密算法建立tls通道的方法 | |
CN102075522A (zh) | 一种结合数字证书和动态密码的安全认证与交易方法 | |
CN107135070A (zh) | Rsa密钥对和证书的注入方法、架构及系统 | |
CN101582896A (zh) | 第三方网络认证系统及其认证方法 | |
CN112118106B (zh) | 一种基于标识密码的轻量级端到端安全通信认证方法 | |
CN105162808A (zh) | 一种基于国密算法的安全登录方法 | |
CN111654510B (zh) | 一种带有国密加密功能的签批终端及签批数据传输方法 | |
CN103701787A (zh) | 一种基于公开密钥算法实现的用户名口令认证方法 | |
CN107104795A (zh) | Rsa密钥对和证书的注入方法、架构及系统 | |
CN105099705A (zh) | 一种基于usb协议的安全通信方法及其系统 | |
CN103916363A (zh) | 加密机的通讯安全管理方法和系统 | |
CN111435390A (zh) | 一种配电终端运维工具安全防护方法 | |
CN110891065A (zh) | 一种基于Token的用户身份辅助加密的方法 | |
CN112713995A (zh) | 一种用于物联网终端的动态通信密钥分发方法及装置 | |
CN108551391B (zh) | 一种基于USB-key的认证方法 | |
CN110519222A (zh) | 基于一次性非对称密钥对和密钥卡的外网接入身份认证方法和系统 | |
CN105933117A (zh) | 一种基于tpm秘钥安全存储的数据加解密装置和方法 | |
CN112020037A (zh) | 一种适用于轨道交通的国产通信加密方法 | |
CN111224784B (zh) | 一种基于硬件可信根的角色分离的分布式认证授权方法 | |
CN100589384C (zh) | 一种用户终端接入软交换系统的安全交互方法 |
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 | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Hu Yan Inventor after: Mei Yao Inventor after: Wang Jinpeng Inventor before: Hu Yan Inventor before: Mei Yao Inventor before: Wang Jinpeng |
|
GR01 | Patent grant | ||
GR01 | Patent grant |