CN108777673A - 一种在区块链中进行双向身份认证方法 - Google Patents

一种在区块链中进行双向身份认证方法 Download PDF

Info

Publication number
CN108777673A
CN108777673A CN201810325798.5A CN201810325798A CN108777673A CN 108777673 A CN108777673 A CN 108777673A CN 201810325798 A CN201810325798 A CN 201810325798A CN 108777673 A CN108777673 A CN 108777673A
Authority
CN
China
Prior art keywords
terminal user
server
block chain
information
user
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
Application number
CN201810325798.5A
Other languages
English (en)
Other versions
CN108777673B (zh
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.)
Sunwave Communications Co Ltd
Original Assignee
Sunwave Communications 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 Sunwave Communications Co Ltd filed Critical Sunwave Communications Co Ltd
Priority to CN201810325798.5A priority Critical patent/CN108777673B/zh
Publication of CN108777673A publication Critical patent/CN108777673A/zh
Application granted granted Critical
Publication of CN108777673B publication Critical patent/CN108777673B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/3271Cryptographic 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 challenge-response
    • H04L9/3273Cryptographic 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 challenge-response for mutual authentication
    • 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/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
    • 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/3236Cryptographic 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/3239Cryptographic 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 non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明涉及一种在区块链中进行双向身份认证的方法,对需要进行数据交互的双方进行双向认证,并通过存在性证明的方法记录到区块链网络中。本发明属于区块链和隐私保护创新领域。本发明设计出的在区块链中的双向方法,可应用于在需要进行隐私保护的数据应用环境,同时实现方式简单,易于操作。

Description

一种在区块链中进行双向身份认证方法
技术领域
本发明涉及区块链技术领域及身份认证技术,主要是一种在区块链中进行双向身份认证方法。
背景技术
区块链是一种分布式账本技术,账本内的交易按照密码学签名和哈希算法保证不可篡改,且所有交易在账本中可追溯。在公有区块链中,用户的账户信息和交易内容都是公开的,仅仅通过“伪匿名”的方式保护用户隐私。但在数据作为资产的情况下,一方面用户并不希望所有的数据资源都开放给公共的网络环境,另一方面服务商业不希望数据在一次授权后就被其他用户无限次使用,因此有必要使用加密技术来保护数据隐私,同时又要保证授权的服务商能够查看数据,以保证大数据应用的正常使用。这就需要灵活的访问控制策略来实现对不同用户访问权限的控制。
发明内容
本发明的目的在于克服现有技术存在的不足,而提供一种在区块链中进行双向身份认证方法。
本发明的目的是针对现有互联网环境下,用户一旦提交数据,则无法再对数据进行管理的弊端,通过身份认证和数据加密的方法,在大数据环境下保护用户隐私,具体来说是通过区块链技术将用户与服务器之间的交互通过双向的身份认证进行保护。该方法适用于用户和服务商之间的数据交互环节形成身份识别并利于数据在公开的区块链网络上存储。
本发明的目的是通过如下技术方案来完成的。这种在区块链中进行双向认证的方法,将用户对服务器以及服务器对用户进行双向认证,并且将用户的认证信息保留在区块链中作为存在性证明,同时还保留了用户认证信息的转移的权利;具体包括如下步骤:
S1:用户注册:
步骤1:终端用户(U)通过加密信道向服务器(S)注册应用,向服务器(S)发送AU、K、Mix信息;其中,AU为终端用户(U)的数字交易地址,为终端用户(U)的标识,K为终端用户(U)和服务器(S)间交互信息加密的对称秘钥,Mix为注册日期信息以及终端用户(U)添加的其他说明信息;
步骤2:服务器(S)生成校验码CV=MSEx(hash(AU||K||Mix)),其中,MSEx()表示校验码截取前x位;“||”表示将前后两个字节流串接,并通过加密信道将CV发送给终端用户(U);
S2:打包交易信息到区块链网络上:
步骤3:终端用户(U)使用UID、CV、AU形成ID=hash(AU||CV||UID),并用私钥sU对ID签名,其中UID为终端用户(U)注册名或其他信息;使能将终端用户的CV不在区块链网络上以明文形式存在,并且通过签名证明该CV为终端用户(U)所拥有;
步骤4:打包一个区块链网络上的标准交易信息,将以上得到的ID以及签名嵌入到标准消息中;此时,交易的发起方和接收方均为AU,以保证需要的时候可以将该认证信息发送给其他用户;
S3:终端用户(U)向服务器(S)认证;
S4:终端用户(U)对服务器(S)认证。
作为优选,终端用户(U)向服务器(S)认证的具体流程为:终端用户(U)将自身的CV、AU发送给服务器(S),并保留此次验证时间为Tb,首先服务器(S)查找区块链网络中是否存在终端用户(U)签名的ID是否存在,即采用用户公钥pU验证ID的正确性,如证明存在,则进行下一步,否则退出验证;服务器(S)查找与之对应的堆成秘钥K、Mix信息,计算CV‘=MSEx(hash(AU||K||Mix)),比比较CV=CV’是否成立,若成立,则用户验证成功。
作为优选,终端用户(U)对服务器(S)认证:服务器(S)验证了终端用户(U)的合法性后,采用私钥sS对当前时间信息Tn和上述ID组成的信息ID||Tn进行签名,通过互联网发送给终端用户(U),终端用户采用服务器提供的公钥pS验证签名的真实性,若签名真实,则进行下一步,若不真实,则退出验证;同时比较给出的Tn>Tb是否成立,若成立,则证明该服务器为真实注册过的服务器(S),若不正确,则退出验证。
作为优选,在步骤2中,其中Hash函数hash()采用SHA-1、SHA-256、SHA-512、Whirlpool、RIPEMD-160算法。
作为优选,在步骤4中,要保证消息的合法性既不能违背标准消息格式,也要保证该交易的有效性,需要加上对区块链网络奖励的代币。
S3:终端用户(U)向服务器(S)认证。
本发明的有益效果为:依据上述方法可以在将终端用户(U)和服务器(S)之间的对称秘钥和公开秘钥进行交互,形成验证信息,并且在区块链网络上通过存在性证明该验证信息属于终端用户(U)。同时通过交易发送给终端用户(U)的方式保证了该存在证明可以被交易给其他用户。
附图说明
图1为双向认证的主要流程图。
图2为终端用户(U)和服务器(S)以及区块链网络之间的关系以及数据交互示意图。
具体实施方式
下面结合附图和具体实施例,进一步阐明本发明,应理解这些实施例仅用于说明本发明而不用于限制本发明的范围,在阅读了本发明之后,本领域技术人员对本发明的各种等价形式的修改均落后于本申请所附权利要求所限定的范围。
如图2所示,终端用户(U)与服务器(S)之间的隐私保护通过第三方的区块链网络来实现。在区块链网络上的每个用户至少设置一对公/私钥,其中终端用户(U)具有公私钥对pU/sU,服务端(S)具有公私钥对ps/ss。并通过以上公钥p通过约定的区块链网络形成交易数字地址A(p),其中A表示形成地址的算法,输入为公钥p,该地址在此区块链网络上具有唯一性。
在本发明实施例中,本发明提供了一种双向认证方法,并在区块链网络上形成存在性证明。如图1所示:
S1:用户注册:
步骤1:终端用户(U)通过加密信道向服务器(S)注册应用,向服务器(S)发送AU、K、Mix信息。其中,AU为终端用户(U)的数字交易地址,为终端用户(U)的标识,K为终端用户(U)和服务器(S)间交互信息加密的对称秘钥,Mix为注册日期信息以及终端用户(U)添加的其他说明信息。
步骤2:服务器(S)生成校验码CV=MSEx(hash(AU||K||Mix)),其中,Hash函数hash()可以采用SHA-1、SHA-256、SHA-512、Whirlpool、RIPEMD-160等算法,为了与区块链技术取得统一,推荐使用SHA-256算法;MSEx()表示校验码截取前x位;“||”表示将前后两个字节流串接。并通过加密信道将CV发送给终端用户(U)。
S2:打包交易信息到区块链网络上。
步骤3:终端用户(U)使用UID、CV、AU形成ID=hash(AU||CV||UID),并用私钥sU对ID签名。其中UID为终端用户(U)注册名或其他信息。
该步骤的目的是将终端用户的CV不在区块链网络上以明文形式存在,并且通过签名证明该CV为终端用户(U)所拥有。
步骤4:打包一个区块链网络上的标准交易信息,将以上得到的ID以及签名嵌入到标准消息中。此时,交易的发起方和接收方均为AU,以保证需要的时候可以将该认证信息发送给其他用户。在此过程中要保证消息的合法性既不能违背标准消息格式,也要保证该交易的有效性。因此需要加上对区块链网络奖励的代币(在此区块链上产生、流通的货币),例如,在已经成熟的比特币网络中,有一种标准的交易格式,该交易消息的输出部分操作码是OP_RETURN,作为打包该笔交易的矿工的奖励;若该笔交易没有被成功打包且过了存在的有效时间,则重新构造该交易信息,加大交易奖励,即加大给矿工的费用,来获得更大的被打包到区块的机会。
S3:终端用户(U)向服务器(S)认证。
终端用户(U)向服务器(S)认证的具体流程为:终端用户(U)将自身的CV、AU发送给服务器(S),并保留此次验证时间为Tb,首先服务器(S)查找区块链网络中是否存在终端用户(U)签名的ID是否存在,即采用用户公钥pU验证ID的正确性,如证明存在,则进行下一步,否则退出验证。
服务器(S)查找与之对应的堆成秘钥K、Mix等信息,计算CV‘=MSEx(hash(AU||K||Mix)),比比较CV=CV’是否成立,若成立,则用户验证成功。
S4:终端用户(U)对服务器(S)认证。
服务器(S)验证了终端用户(U)的合法性后,采用私钥sS对当前时间信息Tn和上述ID组成的信息ID||Tn进行签名,通过互联网发送给终端用户(U),终端用户采用服务器提供的公钥pS验证签名的真实性,若签名真实,则进行下一步,若不真实,则退出验证。同时比较给出的Tn>Tb是否成立,若成立,则证明该服务器为真实注册过的服务器(S),若不正确,则退出验证。
可以理解的是,对本领域技术人员来说,对本发明的技术方案及发明构思加以等同替换或改变都应属于本发明所附的权利要求的保护范围。

Claims (5)

1.一种在区块链中进行双向认证的方法,其特征在于:将用户对服务器以及服务器对用户进行双向认证,并且将用户的认证信息保留在区块链中作为存在性证明,同时还保留了用户认证信息的转移的权利;具体包括如下步骤:
S1:用户注册:
步骤1:终端用户(U)通过加密信道向服务器(S)注册应用,向服务器(S)发送AU、K、Mix信息;其中,AU为终端用户(U)的数字交易地址,为终端用户(U)的标识,K为终端用户(U)和服务器(S)间交互信息加密的对称秘钥,Mix为注册日期信息以及终端用户(U)添加的其他说明信息;
步骤2:服务器(S)生成校验码CV=MSEx(hash(AU||K||Mix)),其中,MSEx()表示校验码截取前x位;“||”表示将前后两个字节流串接,并通过加密信道将CV发送给终端用户(U);
S2:打包交易信息到区块链网络上:
步骤3:终端用户(U)使用UID、CV、AU形成ID=hash(AU||CV||UID),并用私钥sU对ID签名,其中UID为终端用户(U)注册名或其他信息;使能将终端用户的CV不在区块链网络上以明文形式存在,并且通过签名证明该CV为终端用户(U)所拥有;
步骤4:打包一个区块链网络上的标准交易信息,将以上得到的ID以及签名嵌入到标准消息中;此时,交易的发起方和接收方均为AU,以保证需要的时候可以将该认证信息发送给其他用户;
S3:终端用户(U)向服务器(S)认证;
S4:终端用户(U)对服务器(S)认证。
2.根据权利要求1所述的在区块链中进行双向认证的方法,其特征在于:终端用户(U)向服务器(S)认证的具体流程为:终端用户(U)将自身的CV、AU发送给服务器(S),并保留此次验证时间为Tb,首先服务器(S)查找区块链网络中是否存在终端用户(U)签名的ID是否存在,即采用用户公钥pU验证ID的正确性,如证明存在,则进行下一步,否则退出验证;服务器(S)查找与之对应的堆成秘钥K、Mix信息,计算CV‘=MSEx(hash(AU||K||Mix)),比比较CV=CV’是否成立,若成立,则用户验证成功。
3.根据权利要求1所述的在区块链中进行双向认证的方法,其特征在于:终端用户(U)对服务器(S)认证:服务器(S)验证了终端用户(U)的合法性后,采用私钥ss对当前时间信息Tn和上述ID组成的信息ID||Tn进行签名,通过互联网发送给终端用户(U),终端用户采用服务器提供的公钥ps验证签名的真实性,若签名真实,则进行下一步,若不真实,则退出验证;同时比较给出的Tn>Tb是否成立,若成立,则证明该服务器为真实注册过的服务器(S),若不正确,则退出验证。
4.根据权利要求1所述的在区块链中进行双向认证的方法,其特征在于:在步骤2中,其中Hash函数hash()采用SHA-1、SHA-256、SHA-512、Whirlpool、RIPEMD-160算法。
5.根据权利要求1所述的在区块链中进行双向认证的方法,其特征在于:在步骤4中,要保证消息的合法性既不能违背标准消息格式,也要保证该交易的有效性,需要加上对区块链网络奖励的代币。
CN201810325798.5A 2018-04-12 2018-04-12 一种在区块链中进行双向身份认证方法 Active CN108777673B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810325798.5A CN108777673B (zh) 2018-04-12 2018-04-12 一种在区块链中进行双向身份认证方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810325798.5A CN108777673B (zh) 2018-04-12 2018-04-12 一种在区块链中进行双向身份认证方法

Publications (2)

Publication Number Publication Date
CN108777673A true CN108777673A (zh) 2018-11-09
CN108777673B CN108777673B (zh) 2020-09-15

Family

ID=64033893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810325798.5A Active CN108777673B (zh) 2018-04-12 2018-04-12 一种在区块链中进行双向身份认证方法

Country Status (1)

Country Link
CN (1) CN108777673B (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670284A (zh) * 2019-02-20 2019-04-23 中国互联网络信息中心 基于区块链和dnssec的用户认证方法、系统、设备及介质
CN110046906A (zh) * 2019-04-18 2019-07-23 郑建建 一种mpos机与服务器的双向认证交易方法及系统
CN110236397A (zh) * 2019-07-23 2019-09-17 杭州后博科技有限公司 一种互动型移动咖啡机系统
CN110572392A (zh) * 2019-09-09 2019-12-13 河南戎磐网络科技有限公司 一种基于Hyperledger网络的身份认证方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778343A (zh) * 2016-12-12 2017-05-31 武汉优聘科技有限公司 一种基于区块链的涉及隐私数据的数据共享方法
CN107181765A (zh) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 基于区块链技术的网络数字身份认证方法
CN107330694A (zh) * 2017-07-03 2017-11-07 重庆小犀智能科技有限公司 基于区块链的版权交易系统以及交易方法
CN107547514A (zh) * 2017-07-17 2018-01-05 招商银行股份有限公司 身份认证方法、系统及计算机可读存储介质
CN107592292A (zh) * 2017-07-26 2018-01-16 阿里巴巴集团控股有限公司 一种区块链节点间通信方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778343A (zh) * 2016-12-12 2017-05-31 武汉优聘科技有限公司 一种基于区块链的涉及隐私数据的数据共享方法
CN107330694A (zh) * 2017-07-03 2017-11-07 重庆小犀智能科技有限公司 基于区块链的版权交易系统以及交易方法
CN107547514A (zh) * 2017-07-17 2018-01-05 招商银行股份有限公司 身份认证方法、系统及计算机可读存储介质
CN107181765A (zh) * 2017-07-25 2017-09-19 光载无限(北京)科技有限公司 基于区块链技术的网络数字身份认证方法
CN107592292A (zh) * 2017-07-26 2018-01-16 阿里巴巴集团控股有限公司 一种区块链节点间通信方法及装置

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109670284A (zh) * 2019-02-20 2019-04-23 中国互联网络信息中心 基于区块链和dnssec的用户认证方法、系统、设备及介质
CN110046906A (zh) * 2019-04-18 2019-07-23 郑建建 一种mpos机与服务器的双向认证交易方法及系统
CN110236397A (zh) * 2019-07-23 2019-09-17 杭州后博科技有限公司 一种互动型移动咖啡机系统
CN110572392A (zh) * 2019-09-09 2019-12-13 河南戎磐网络科技有限公司 一种基于Hyperledger网络的身份认证方法

Also Published As

Publication number Publication date
CN108777673B (zh) 2020-09-15

Similar Documents

Publication Publication Date Title
CN109785494B (zh) 基于区块链的可追踪的匿名电子投票方法
CN107181765A (zh) 基于区块链技术的网络数字身份认证方法
CN110046482A (zh) 身份核实方法及其系统
CN108092779A (zh) 一种实现电子签约的方法及装置
CN109325331A (zh) 基于区块链和可信计算平台的大数据采集交易系统
CN1831865B (zh) 一种基于cpk的电子银行安全认证系统和方法
CN109409122A (zh) 文件存储方法及其电子设备、存储介质
CN108494738A (zh) 一种可验证的后量子电子投票系统及其实现方法
CN109447647A (zh) 一种基于区块链的安全支付系统
CN107493273A (zh) 身份认证方法、系统及计算机可读存储介质
CN109472164A (zh) 合同数据的验证方法及其网络和电子设备
CN108768652A (zh) 一种可抗量子攻击的联盟区块链底层加密方法
CN108777673A (zh) 一种在区块链中进行双向身份认证方法
CN104468096B (zh) 基于密钥分散运算实现网络电子身份标识信息保护的方法
CN110290102A (zh) 基于应用的业务安全系统及方法
CN102769623B (zh) 基于数字证书和生物识别信息进行双重认证的方法
JP2005223924A (ja) ユニバーサルパーベイシブトランザクションフレームワークのためのオピニオン登録アプリケーション
WO2013072437A1 (en) Key protected nfc tag method and system, and a method for diversify coupon on a viral distribution chain by nfc
CN109614802A (zh) 抗量子计算的签章方法和签章系统
CN101610153A (zh) 基于椭圆曲线签名算法的电子签章认证方法
CN109560935A (zh) 基于公共非对称密钥池的抗量子计算的签章方法和签章系统
CN113111386A (zh) 一种区块链交易数据的隐私保护方法
Zhang A study on application of digital signature technology
Singh et al. Survey on techniques developed using digital signature: public key cryptography
Boontaetae et al. RDI: Real digital identity based on decentralized PKI

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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method of bidirectional identity authentication in blockchain

Effective date of registration: 20210223

Granted publication date: 20200915

Pledgee: Industrial and Commercial Bank of China Limited Hangzhou Qianjiang Branch

Pledgor: SUNWAVE COMMUNICATIONS Co.,Ltd.

Registration number: Y2021330000151

PE01 Entry into force of the registration of the contract for pledge of patent right