CN111711607B - 一种基于区块链的流式微服务可信加载与验证方法 - Google Patents

一种基于区块链的流式微服务可信加载与验证方法 Download PDF

Info

Publication number
CN111711607B
CN111711607B CN202010430763.5A CN202010430763A CN111711607B CN 111711607 B CN111711607 B CN 111711607B CN 202010430763 A CN202010430763 A CN 202010430763A CN 111711607 B CN111711607 B CN 111711607B
Authority
CN
China
Prior art keywords
service
user
micro
block chain
service provider
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.)
Active
Application number
CN202010430763.5A
Other languages
English (en)
Other versions
CN111711607A (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.)
Xian University of Technology
Original Assignee
Xian University of Technology
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 Xian University of Technology filed Critical Xian University of Technology
Priority to CN202010430763.5A priority Critical patent/CN111711607B/zh
Publication of CN111711607A publication Critical patent/CN111711607A/zh
Application granted granted Critical
Publication of CN111711607B publication Critical patent/CN111711607B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • 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
    • 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/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/168Implementing security features at a particular protocol layer above the transport layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • 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/321Cryptographic 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 a third party or a trusted authority
    • H04L9/3213Cryptographic 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 a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • 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/3226Cryptographic 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
    • 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
    • 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
    • H04L9/3249Cryptographic 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 using RSA or related signature schemes, e.g. Rabin scheme
    • 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
    • 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/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

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)
  • Storage Device Security (AREA)

Abstract

本发明公开了一种基于区块链的流式微服务可信加载与验证方法,具体为:首先服务提供方在区块链网络提交注册申请,获得用户注册证书生成的Token,并发送给用户;区块链网络验证Token的有效性,将有效Token上传至区块链网络;服务提供方将微服务与微服务关系图存入区块链网络;用户向区块链网络请求微服务,区块链网络基于图搜索算法遍历微服务关系图中的元数据,向用户返回其指定服务提供方的地址;最后用户通过HTTP协议向指定服务提供方请求微服务,区块链网络验证用户请求微服务的合理性,并向用户发送响应信息。解决了现有技术中存在的网络服务计算模型在复杂IoT应用场景下的网络安全风险问题。

Description

一种基于区块链的流式微服务可信加载与验证方法
技术领域
本发明属于微服务技术领域,具体涉及一种基于区块链的流式微服务可信加载与验证方法。
背景技术
随着互联网时代的到来,轻量级移动终端设备的***性增长,对设备之间的实时响应要求越来越高。BaaS(Block Stream as a Service)是一种更加安全、灵活和动态平衡的模型。在这种新的云服务模型中,不再是使应用程序完全运行在数据中心或者是将整个应用程序从应用程序商店下载客户端,而是将应用程序划分为微服务。此外,再将一些微服务运行在服务器端,同时对需要在设备本地运行的块进行流处理。用户通过网络获取所需的服务,在享受完服务之后,就可以将其抛弃,再从网络上获取新的服务。
然而,这样的新兴网络服务计算模型在复杂的IoT应用场景下也面临着一定的网络安全风险,主要存在以下3种不安全场景:(1)用户可能存在恶意行为,用户向服务提供方请求的服务是不合理甚至是不存在的;(2)服务提供方可能存在恶意行为,服务提供方被恶意欺骗后向用户提供不正确的服务;(3)服务传输过程中可能存在恶意行为,服务提供方向用户传输服务时,在网络上遭受攻击,用户收到的服务被恶意替换或篡改。
区块链技术起源于2008年发布的比特币***,因其具有去中心化、开放性、防篡改性、匿名性、可追溯性而受到社会各界的广泛关注。区块链本质上是一个去中心化的分布式账本和数据库。按照区块链的开放程度可划分为公有链、联盟链。公有链往往是作为区块***的底层支撑,任何人都可以参与进来,典型代表就是比特币(BTC)、以太坊(ETH)、EOS等。联盟链只对特定的组织团体开放,即仅限联盟成员参与,共识过程受到预选节点控制,而且节点只有通过授权后才能加入或退出。将区块链技术引入以提升网络服务计算模型的安全性,是非常有意义的。
发明内容
本发明的目的是提供一种基于区块链的流式微服务可信加载与验证方法,解决了现有技术中存在的网络服务计算模型在复杂IoT应用场景下的网络安全风险问题。
本发明所采用的技术方案是,一种基于区块链的流式微服务可信加载与验证方法,具体按照以下步骤实施:
步骤1,服务提供方在区块链网络提交注册申请,获得用户注册证书生成的Token,并发送给用户;
步骤2,区块链网络验证Token的有效性,将有效Token上传至区块链网络;
步骤3,服务提供方将微服务与微服务关系图存入区块链网络;
步骤4,用户向区块链网络请求微服务,区块链网络基于图搜索算法遍历微服务关系图中的元数据,向用户返回其指定服务提供方的地址;
步骤5,用户通过HTTP协议向指定服务提供方请求微服务,区块链网络验证用户请求微服务的合理性,并向用户发送响应信息。
本发明的特点还在于,
步骤1具体按照以下步骤实施:
步骤1.1,区块链网络获得服务提供方的注册申请,设置公私钥路径,验证用户是否存在,若用户已经存在,则返回结束;若为新用户,则开始注册并登记,并返回用户名称和密码;
步骤1.2,证书颁发机构通过用户名称和密码颁发注册证书,再通过注册证书生成Token,将Token发送给用户。
步骤1.2具体为:
证书颁发机构采用哈希算法对注册证书进行运算得到Hash1,再采用证书颁发机构的私钥及RSA算法对Hash1进行加密,得到加密证书即Token,将Token发送给用户。
Token用于用户在区块链网络中增加、查询事件的身份凭证。
步骤2具体按照以下步骤实施:
步骤2.1,采用证书颁发机构的公钥解密Token,得到哈希值Hash2,再采用SHA256计算注册证书明文,得到密文Hash1;
步骤2.2,将Hash1与Hash2的值进行对比,若Hash1与Hash2相同,则注册证书校验通过,否则,用户持有的是无效Token,结束校验。
步骤3具体按照以下步骤实施:
步骤3.1,服务提供方采用消息摘要算法对微服务的可执行文件进行加密,生成hash值;
步骤3.2,采用服务提供方的私钥对hash值进行数字签名,将数字签名、公钥提交至区块链网络;
步骤3.3,采用服务关系邻接矩阵和服务关系可达性矩阵将微服务关系图进行存储,采用服务提供方的私钥对其进行数字签名,将数字签名、公钥提交至区块链网络;
步骤3.4,区块链将步骤3.2、步骤3.3中的数字签名、公钥生成提案,并提交至区块链中的背书节点;
步骤3.5,背书节点模拟执行提案,并验证数字签名是否有效,若有效,调用SDK生成交易,排序服务节点对交易进行排序,并生成区块;否则结束。
微服务关系图为有向无环图;服务关系邻接矩阵表示微服务间的直接服务关系;服务关系可达性矩阵表示微服务间的间接服务关系。
步骤5具体按照以下步骤实施:
步骤5.1,用户与指定服务提供方的服务器建立TCP连接,打开连接后,用户将请求信息发送到服务器的相应端口上;
步骤5.2,指定服务提供方对请求信息进行处理,即区块链网络基于图搜索算法遍历微服务关系图;
步骤5.3,若找到相应的微服务关系,即用户请求的微服务合理,则向用户提供微服务,跳至步骤5.4,否则,用户请求的微服务不合理,则拒绝用户的微服务请求;
步骤5.4,用户得到微服务后,采用哈希算法对微服务进行运算,得到新hash值,将新hash值与区块链网络中存储的微服务hash值进行对比;
步骤5.5,若新hash值与hash值相同,则说明微服务是由指定服务提供方提供,且微服务在传送过程中未受到攻击、篡改、替换;否则,用户拒绝接受微服务。
用户请求的微服务合理,指定服务提供方通过SSL协议向用户传输微服务;
SSL协议通信具体为:
用户向指定服务提供方提供SSL版本、随机数a、加密方式;指定服务提供方将新加密方式、数字证书、随机数b发送给用户;用户确认数字证书的有效性,然后生成一个随机数,并采用指定服务提供方的数字证书公钥将随机数加密后发送给用户;指定服务提供方采用其私钥解密随机数;用户和指定服务提供方通过新加密方式将随机数、随机数a随机数b生成对话密钥用于通信。
本发明的有益效果是,
本发明一种基于区块链的流式微服务可信加载与验证方法,可以避免用户的恶意行为,即用户向服务提供方请求的服务不合理甚至不存在;可以避免服务提供方被恶意欺骗后向用户提供不正确的服务;可以避免微服务在传输过程中存在的恶意行为,即服务提供方在向用户传输服务时,在网络上遭受攻击,用户收到的服务可能被恶意替换或篡改;本发明一种基于区块链的流式微服务可信加载与验证方法,将服务提供方发布的微服务与微服务关系图上传至区块链网络,区块链网络作为服务提供方和用户之间的验证平台,记录两者交互的证据,从而使微服务在服务提供方与用户之间安全可信地加载与验证;本发明一种基于区块链的流式微服务可信加载与验证方法,将微服务与微服务关系图存储在区块链网络,利用区块链的不可篡改、可溯源、数据一致性等特点,实现服务提供方与用户双方可信的安全服务。
附图说明
图1是本发明一种基于区块链的流式微服务可信加载与验证方法的流程图;
图2是本发明一种基于区块链的流式微服务可信加载与验证方法中微服务及服务关系图存储的流程图;
图3是本发明一种基于区块链的流式微服务可信加载与验证方法中验证Token有效性的示意图。
具体实施方式
下面结合附图和具体实施方式对本发明进行详细说明。
本发明一种基于区块链的流式微服务可信加载与验证方法,如图1所示,具体按照以下步骤实施:
步骤1,服务提供方在区块链网络提交注册申请,获得用户注册证书生成的Token,并发送给用户;
步骤1具体按照以下步骤实施:
步骤1.1,区块链网络获得服务提供方的注册申请,设置公私钥路径,验证用户是否存在,若用户已经存在,则返回结束;若为新用户,则开始注册并登记,并返回用户名称和密码;
步骤1.2,证书颁发机构通过用户名称和密码颁发注册证书,再通过注册证书生成Token,将Token发送给用户;具体为:
证书颁发机构采用哈希算法对注册证书进行运算得到Hash1,再采用证书颁发机构的私钥及RSA算法对Hash1进行加密,得到加密证书即Token,将Token发送给用户;
其中,Token用于用户在区块链网络中增加、查询事件的身份凭证;
步骤2,区块链网络验证Token的有效性,将有效Token上传至区块链网络,如图3所示;具体按照以下步骤实施:
步骤2.1,采用证书颁发机构的公钥解密Token,得到哈希值Hash2,再采用SHA256计算注册证书明文,得到密文Hash1;
步骤2.2,将Hash1与Hash2的值进行对比,若Hash1与Hash2相同,则注册证书校验通过,否则,用户持有的是无效Token,结束校验;
步骤3,服务提供方将微服务与微服务关系图存入区块链网络,如图2所示;具体按照以下步骤实施:
步骤3.1,服务提供方采用消息摘要算法对微服务的可执行文件进行加密,生成hash值;
步骤3.2,采用服务提供方的私钥对hash值进行数字签名,将数字签名、公钥提交至区块链网络;
步骤3.3,采用服务关系邻接矩阵和服务关系可达性矩阵将微服务关系图进行存储,采用服务提供方的私钥对其进行数字签名,将数字签名、公钥提交至区块链网络;
步骤3.4,区块链将步骤3.2、步骤3.3中的数字签名、公钥生成提案,并提交至区块链中的背书节点;
步骤3.5,背书节点模拟执行提案,并验证数字签名是否有效,若有效,调用SDK生成交易,排序服务节点对交易进行排序,并生成区块;否则结束;
其中,微服务关系图为有向无环图;服务关系邻接矩阵表示微服务间的直接服务关系;服务关系可达性矩阵表示微服务间的间接服务关系;
步骤4,用户向区块链网络请求微服务,区块链网络基于图搜索算法遍历微服务关系图中的元数据,向用户返回其指定服务提供方的地址;
步骤5,用户通过HTTP协议向指定服务提供方请求微服务,区块链网络验证用户请求微服务的合理性,并向用户发送响应信息;具体按照以下步骤实施:
步骤5.1,用户与指定服务提供方的服务器建立TCP连接,打开连接后,用户将请求信息发送到服务器的相应端口上;
步骤5.2,指定服务提供方对请求信息进行处理,即区块链网络基于图搜索算法遍历微服务关系图;
步骤5.3,若找到相应的微服务关系,即用户请求的微服务合理,则向用户提供微服务,跳至步骤5.4,否则,用户请求的微服务不合理,则拒绝用户的微服务请求;
步骤5.4,用户得到微服务后,采用哈希算法对微服务进行运算,得到新hash值,将新hash值与区块链网络中存储的微服务hash值进行对比;
步骤5.5,若新hash值与hash值相同,则说明微服务是由指定服务提供方提供,且微服务在传送过程中未受到攻击、篡改、替换;否则,用户拒绝接受微服务;
用户请求的微服务合理,指定服务提供方通过SSL协议向用户传输微服务;
SSL协议通信具体为:
用户向指定服务提供方提供SSL版本、随机数a、加密方式;指定服务提供方将新加密方式、数字证书、随机数b发送给用户;用户确认数字证书的有效性,然后生成一个随机数,并采用指定服务提供方的数字证书公钥将随机数加密后发送给用户;指定服务提供方采用其私钥解密随机数;用户和指定服务提供方通过新加密方式将随机数、随机数a随机数b生成对话密钥用于通信。
实施例
块流即服务的边缘计算场景,分割后的App应用块即微服务在云服务提供商与物联网设备中流式传输与加载。以联盟区块链Hyperledger Fabric为例:
云服务提供商在Fabric的证书颁发机构中注册并登录成功后,首先将微服务和微服务关系图存储在Fabric中,包含hash值;物联网设备在请求服务前,向Fabric查询可提供所需微服务的服务提供方,向指定云服务提供商请求微服务;
云服务提供商收到请求时,通过Fabric查询微服务关系图,验证微服务请求合理性后,向物联网设备安全传输微服务可执行文件,物联网设备收到文件之后,对其做相同的哈希算法运算,将得到的新hash值与Fabric中存储的文件hash值作对比,若新hash值与hash值一致,则证明该微服务是由可信云服务提供商提供,且文件在传送过程中未受到攻击、篡改甚至替换。若新hash值与hash值不一致,则拒绝接受该微服务。

Claims (9)

1.一种基于区块链的流式微服务可信加载与验证方法,其特征在于,具体按照以下步骤实施:
步骤1,服务提供方在区块链网络提交注册申请,获得用户注册证书生成的Token,并发送给用户;
步骤2,区块链网络验证Token的有效性,将有效Token上传至区块链网络;
步骤3,服务提供方将微服务与微服务关系图存入区块链网络;
步骤4,用户向所述区块链网络请求微服务,所述区块链网络基于图搜索算法遍历微服务关系图中的元数据,向用户返回其指定服务提供方的地址;
步骤5,用户通过HTTP协议向指定服务提供方请求微服务,所述区块链网络验证用户请求微服务的合理性,并向用户发送响应信息;
所述区块链网络基于图搜索算法遍历微服务关系图,若找到相应的微服务关系,即用户请求的微服务合理,则向用户提供微服务;否则,用户请求的微服务不合理,则拒绝用户的微服务请求。
2.根据权利要求1所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述步骤1具体按照以下步骤实施:
步骤1.1,区块链网络获得服务提供方的注册申请,设置公私钥路径,验证用户是否存在,若用户已经存在,则返回结束;若为新用户,则开始注册并登记,并返回用户名称和密码;
步骤1.2,证书颁发机构通过所述用户名称和密码颁发注册证书,再通过所述注册证书生成Token,将所述Token发送给用户。
3.根据权利要求2所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述步骤1.2具体为:
所述证书颁发机构采用哈希算法对注册证书进行运算得到Hash1,再采用证书颁发机构的私钥及RSA算法对所述Hash1进行加密,得到加密证书即Token,将所述Token发送给用户。
4.根据权利要求2所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述Token用于用户在区块链网络中增加、查询事件。
5.根据权利要求3所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述步骤2具体按照以下步骤实施:
步骤2.1,采用所述证书颁发机构的公钥解密Token,得到哈希值Hash2,再采用SHA256计算注册证书明文,得到密文Hash1;
步骤2.2,将所述Hash1与Hash2的值进行对比,若Hash1与Hash2相同,则注册证书校验通过,否则,用户持有的是无效Token,结束校验。
6.根据权利要求2所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述步骤3具体按照以下步骤实施:
步骤3.1,服务提供方采用消息摘要算法对所述微服务的可执行文件进行加密,生成hash值;
步骤3.2,采用服务提供方的私钥对所述hash值进行数字签名,将所述数字签名、公钥提交至区块链网络;
步骤3.3,采用服务关系邻接矩阵和服务关系可达性矩阵将所述微服务关系图进行存储,采用服务提供方的私钥对其进行数字签名,将所述数字签名、公钥提交至区块链网络;
步骤3.4,区块链将步骤3.2、步骤3.3中的数字签名、公钥生成提案,并提交至区块链中的背书节点;
步骤3.5,所述背书节点模拟执行提案,并验证数字签名是否有效,若有效,调用SDK生成交易,排序服务节点对所述交易进行排序,并生成区块;否则结束。
7.根据权利要求6所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述微服务关系图为有向无环图;所述服务关系邻接矩阵表示微服务间的直接服务关系;所述服务关系可达性矩阵表示微服务间的间接服务关系。
8.根据权利要求6所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,所述步骤5具体按照以下步骤实施:
步骤5.1,用户与指定服务提供方的服务器建立TCP连接,打开连接后,用户将请求信息发送到所述服务器的相应端口上;
步骤5.2,所述指定服务提供方对请求信息进行处理,即所述区块链网络基于图搜索算法遍历微服务关系图;
步骤5.3,若找到相应的微服务关系,即用户请求的微服务合理,则向用户提供微服务,跳至步骤5.4,否则,用户请求的微服务不合理,则拒绝用户的微服务请求;
步骤5.4,用户得到微服务后,采用哈希算法对所述微服务进行运算,得到新hash值,将所述新hash值与区块链网络中存储的微服务hash值进行对比;
步骤5.5,若新hash值与所述hash值相同,则说明微服务是由指定服务提供方提供,且所述微服务在传送过程中未受到攻击、篡改、替换;否则,用户拒绝接受微服务。
9.根据权利要求8所述的一种基于区块链的流式微服务可信加载与验证方法,其特征在于,用户请求的微服务合理,所述指定服务提供方通过SSL协议向用户传输微服务;
所述SSL协议通信具体为:
用户向指定服务提供方提供SSL版本、随机数a、加密方式;所述指定服务提供方将新加密方式、数字证书、随机数b发送给用户;用户确认数字证书的有效性,然后生成一个随机数,并采用指定服务提供方的数字证书公钥将所述随机数加密后发送给用户;指定服务提供方采用其私钥解密所述随机数;用户和指定服务提供方通过所述新加密方式将随机数、随机数a随机数b生成对话密钥用于通信。
CN202010430763.5A 2020-05-20 2020-05-20 一种基于区块链的流式微服务可信加载与验证方法 Active CN111711607B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010430763.5A CN111711607B (zh) 2020-05-20 2020-05-20 一种基于区块链的流式微服务可信加载与验证方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010430763.5A CN111711607B (zh) 2020-05-20 2020-05-20 一种基于区块链的流式微服务可信加载与验证方法

Publications (2)

Publication Number Publication Date
CN111711607A CN111711607A (zh) 2020-09-25
CN111711607B true CN111711607B (zh) 2022-04-22

Family

ID=72538383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010430763.5A Active CN111711607B (zh) 2020-05-20 2020-05-20 一种基于区块链的流式微服务可信加载与验证方法

Country Status (1)

Country Link
CN (1) CN111711607B (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112685321B (zh) * 2021-01-11 2024-06-18 河南中原消费金融股份有限公司 一种微服务的测试方法、***及存储介质
CN112837163A (zh) * 2021-03-22 2021-05-25 中国工商银行股份有限公司 基于区块链的批量交易上链方法及***
CN114553495A (zh) * 2022-01-27 2022-05-27 南京第三极区块链科技有限公司 一种基于区块链的服务注册与发现***及其使用方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213616A (zh) * 2018-09-25 2019-01-15 江苏润和软件股份有限公司 一种基于调用图分析的微服务软件***异常检测方法
CN111177080A (zh) * 2019-12-31 2020-05-19 西安理工大学 一种基于区块链和ipfs的知识图谱存储与验证方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170244687A1 (en) * 2016-02-24 2017-08-24 Whitewood Encryption Systems, Inc. Techniques for confidential delivery of random data over a network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109213616A (zh) * 2018-09-25 2019-01-15 江苏润和软件股份有限公司 一种基于调用图分析的微服务软件***异常检测方法
CN111177080A (zh) * 2019-12-31 2020-05-19 西安理工大学 一种基于区块链和ipfs的知识图谱存储与验证方法

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A Blockchain Tokenizer for Industrial IOT trustless applications;Daniele Mazzei 等;《Future Generation Computer Systems》;20200430;全文 *
Power Trading Blockchain using Hyperledger Fabric;Yonghyun Kim 等;《2020 International Conference on Information Networking》;20200302;全文 *
基于区块链的可信存储***设计与实现;罗鑫;《中国优秀硕士学位论文全文数据库 信息科技辑》;20200215(第02期);全文 *

Also Published As

Publication number Publication date
CN111711607A (zh) 2020-09-25

Similar Documents

Publication Publication Date Title
CN112039872B (zh) 基于区块链的跨域匿名认证方法及***
Lu et al. A blockchain-based privacy-preserving authentication scheme for VANETs
US11128477B2 (en) Electronic certification system
CN109309565B (zh) 一种安全认证的方法及装置
CN109508552B (zh) 分布式云存储***的隐私保护方法
CN111711607B (zh) 一种基于区块链的流式微服务可信加载与验证方法
CN109495490B (zh) 一种基于区块链的统一身份认证方法
Chai et al. CyberChain: Cybertwin empowered blockchain for lightweight and privacy-preserving authentication in Internet of Vehicles
CN109617692B (zh) 一种基于区块链的匿名登陆方法及***
CN113553574A (zh) 一种基于区块链技术的物联网可信数据管理方法
CN113256290A (zh) 去中心化加密通讯与交易***
US20200412554A1 (en) Id as service based on blockchain
CN111294352A (zh) 云端与边缘节点之间的数据安全认证方法
CN108347428B (zh) 基于区块链的应用程序的注册***、方法和装置
CN109687965A (zh) 一种保护网络中用户身份信息的实名认证方法
CN114139203B (zh) 基于区块链的异构身份联盟风险评估***、方法及终端
CN113761582A (zh) 基于群签名的可监管区块链交易隐私保护方法及***
WO2022089420A1 (zh) 一种基于区块链的投票方法及装置
CN112543166A (zh) 实名登录的方法及装置
CN114125773A (zh) 基于区块链和标识密码的车联网身份管理***及管理方法
CN114679332A (zh) 一种分布式***的apt检测方法
CN110572392A (zh) 一种基于Hyperledger网络的身份认证方法
CN114465729A (zh) 一种基于区块链技术的物联网数据管理方法及***
CN114154125A (zh) 云计算环境下区块链无证书的身份认证方案
CN110851804B (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
GR01 Patent grant
GR01 Patent grant