朱岩等:网络安全等级保护下的区块链评估方法 1271 表3分布式对等网络测评 Table 3 Distributed peer-to-peer network assessment 类别 测评项 实施 预期效果 实际测评结果说明 达标 Categories Items Implementation Expected Effectiveness Description of actual Y/N evaluation results 查看连人区块链是否 当节点连人系统时,对其进 节点接人时没有对身份 身份鉴别 节点接入控制 行身份认证,控制节点接人 进行认证 需要认证 否 Identification Node link control Check if the connection to the When nodes are connected, The identity is not the system authenticates authenticated when the node is Blockchain requires authentication themto restrict node access. connected. 网络抖动对传输不会造成太 软件容错 自我保护与自适应 网络不稳定时查看信息传输情况 网络抖动时,区块链 大影响,系统运行稳定 系统运行稳定 是 Software fault Self-protection and self-Inspect information transmission Network jitter does not have tolerance when the network is unstable. Blockchain system runs stably 上 adaptation much impact on transmission. Blockchain runs stably. when network jitter occurs. 对最大并发连接进行限制. 节点连接不超过117个输入 并发连接限制 查看节点最大连接数目 防止系统资源耗尽 连接,向其他节点发起 Concurrent connection View the maximum number of 8个输出连接 Limit maximum concurrent 是 restriction connections on nodes connections to prevent system Node connections do not exceed 117 input connections resource exhaustion and 8 output connections. 资源控制 某个节点超过30min没有新 Resource control 自动结束长期无应答的会话消息,则发送心跳消息,长达 查看相关网络配置 防止系统资源占用 90min没有通信,则结束会话 连接超时限制 Automatically end long-term If there is no communication Connection timeout limit View related network for more than 30 minutes,a unanswered sessions to configurations heartbeat message is sent.End prevent system resource usage. the session if there is no communication for 90 minutes. 查看数据传输是否加密防 数据在点对点通信过程中不 不能保障数据在单播通信过 单播通信防篡改 篡改安全 被篡改 程中的完整性 否 Anti-tampering of unicast Check whether data transmission is Data is not tampered with in The integrity of data in unicast N encrypted and tamper-proof the process of point-to-point communication cannot be communication. guaranteed. 能否提供通信多播,广播功能.通 信过程中数据是否防篡改 数据在广播通信过程中 不能保障数据在广播通信过 程中的完整性 广播通信防篡改 Check whether the system can 不被篡改 数据完整性 Multicast communication provide communication multicast, Data is not tampered with The Bitcoin system does not 否 Data integrity guarantee the integrity of data tamper-proof broadcast function and tamper- during broadcast in the broadcast proof data in the process of communication communication process communication 不能保障数据在转发通信过 转发通信防篡改 转发功能及数据防篡改 数据在某节点通过转发时 程中的完整性 Forwarding Data tampering prevention in 不被篡改 The integrity of data in the 否 ommunication tamper Data is not tampered with process of forwarding proof forwarding communication when forwarded by a node. communication cannot be guaranteed 存在单个节点的状态更新记 录.但更新记录不进行全网 查看日志是否记录 能够为系统的稳定运行提供 交换,无法获取全网状态 网路状态获取更新 可信的节点数据 There is a status update record Network status get 节点状态信息 Ability to provide trusted node for a single node.However, 否 update Check whether the log records node status information. data for stable operation of the update records are not system. exchanged in the whole 安全市计 network,the whole network Security audit status cannot be obtained. 网络节点动态监测 是否对在线节点数量 具备对节点动态增加和减少区块链系统具备全网节点数 的识别能力 量实时统计能力 进行统计 The Bitcoin system does not 是 Network node dynamic Statistics on the number of Ability to recognize nodes have the real-time statistical monitoring online nodes dynamically increasing and ability of the number of nodes decreasing. in the whole network. 节点共同实现,下述评测内容在此共识过程基础 4.1 共识资源控制(测评项①) 上进行评测 区块链共识机制中矿工不断修改区块头
节点共同实现,下述评测内容在此共识过程基础 上进行评测. 4.1 共识资源控制(测评项①) 区块链共识机制中矿工不断修改区块头 表 3 分布式对等网络测评 Table 3 Distributed peer-to-peer network assessment 类别 Categories 测评项 Items 实施 Implementation 预期效果 Expected Effectiveness 实际测评结果说明 Description of actual evaluation results 达标 Y/N 身份鉴别 Identification 节点接入控制 Node link control 查看连入区块链是否 需要认证 Check if the connection to the Blockchain requires authentication 当节点连入系统时,对其进 行身份认证,控制节点接入 When nodes are connected, the system authenticates themto restrict node access. 节点接入时没有对身份 进行认证 The identity is not authenticated when the node is connected. 否 N 软件容错 Software fault tolerance 自我保护与自适应 Self-protection and selfadaptation 网络不稳定时查看信息传输情况 Inspect information transmission when the network is unstable. 网络抖动对传输不会造成太 大影响,系统运行稳定 Network jitter does not have much impact on transmission. Blockchain runs stably. 网络抖动时,区块链 系统运行稳定 Blockchain system runs stably when network jitter occurs. 是 Y 资源控制 Resource control 并发连接限制 Concurrent connection restriction 查看节点最大连接数目 View the maximum number of connections on nodes 对最大并发连接进行限制, 防止系统资源耗尽 Limit maximum concurrent connections to prevent system resource exhaustion 节点连接不超过117个输入 连接,向其他节点发起 8个输出连接. Node connections do not exceed 117 input connections and 8 output connections. 是 Y 连接超时限制 Connection timeout limit 查看相关网络配置 View related network configurations 自动结束长期无应答的会话 防止系统资源占用 Automatically end long-term unanswered sessions to prevent system resource usage. 某个节点超过30 min没有新 消息,则发送心跳消息,长达 90 min没有通信,则结束会话 If there is no communication for more than 30 minutes, a heartbeat message is sent. End the session if there is no communication for 90 minutes. 是 Y 数据完整性 Data integrity 单播通信防篡改 Anti-tampering of unicast 查看数据传输是否加密防 篡改安全 Check whether data transmission is encrypted and tamper-proof 数据在点对点通信过程中不 被篡改 Data is not tampered with in the process of point-to-point communication. 不能保障数据在单播通信过 程中的完整性 The integrity of data in unicast communication cannot be guaranteed. 否 N 广播通信防篡改 Multicast communication tamper-proof 能否提供通信多播,广播功能,通 信过程中数据是否防篡改 Check whether the system can provide communication multicast, broadcast function and tamperproof data in the process of communication 数据在广播通信过程中 不被篡改 Data is not tampered with during broadcast communication. 不能保障数据在广播通信过 程中的完整性 The Bitcoin system does not guarantee the integrity of data in the broadcast communication process. 否 N 转发通信防篡改 Forwarding communication tamperproof 转发功能及数据防篡改 Data tampering prevention in forwarding communication 数据在某节点通过转发时 不被篡改 Data is not tampered with when forwarded by a node. 不能保障数据在转发通信过 程中的完整性 The integrity of data in the process of forwarding communication cannot be guaranteed 否 N 安全审计 Security audit 网络状态获取更新 Network status get update 查看日志是否记录 节点状态信息 Check whether the log records node status information. 能够为系统的稳定运行提供 可信的节点数据 Ability to provide trusted node data for stable operation of the system. 存在单个节点的状态更新记 录,但更新记录不进行全网 交换,无法获取全网状态 There is a status update record for a single node. However, update records are not exchanged in the whole network, the whole network status cannot be obtained. 否 N 网络节点动态监测 Network node dynamic monitoring 是否对在线节点数量 进行统计 Statistics on the number of online nodes 具备对节点动态增加和减少 的识别能力 Ability to recognize nodes dynamically increasing and decreasing. 区块链系统具备全网节点数 量实时统计能力 The Bitcoin system does not have the real-time statistical ability of the number of nodes in the whole network. 是 Y 朱 岩等: 网络安全等级保护下的区块链评估方法 · 1271 ·
1272 工程科学学报,第42卷,第10期 12(a) 12(b) (2020/5/14,718874) --Active nodes -Active nodes 2020/5/14,718874 10 10 8 8 6 4 (2020/2/1,585209) 2 (2009/19,14) 0 0 2020/02/01 2020/0221 2020/03/12 2020/04/01 2020/04/21 2020/05/11 2009/01 2010/1 2012/1 2014/09 016/07 2018/06 2020/05 Date Date 图2比特币P2P网络规模变化图.(a)近3个月比特币网络规模变化图:(b)2009年之后比特币网络规模变化图 Fig2 Scale change of Bitcoin P2P network:(a)scale change of Bitcoin P2P network in last three months,(b)scale change of Bitcoin P2P network since 2009 2 Transaction node Mining node Nodes Kth consensus Create transaction Broadcast transaction Create candidate blocks Proof of work Broadcast block Broadcast block 白 Verify candidate Verify candidate blocks blocks Block assembly to Block assembly to chain chain (K+1)h consensus -4 图3共识过程时序关系图 Fig.3 Consensus timing diagram BlockHeaderf的随机数Nn,并计算区块头的SHA 以比特币为例进行评测分析 2562哈希值,直到区块头哈希值小于难度值Tm (1)全网平均算力 上述关系可由下式表示:SHA2562 BlockHeadern)<Tm 算力是衡量在一定的网络消耗下生成新块的 矿工在短时间内消耗大量的计算资源以求得满足 单位总计算能力:全网算力,即网络中所有参与挖 要求的随机数,进而争夺记账权.若挖矿成功,则 矿的矿机算力综合,比特币的全网算力是所有参 N作为该矿工的工作量证明.该证明生成困难(生 与挖矿的比特币矿机算力的总和.如图4所示我 日攻击下的平均挖矿计算复杂性为0(V226/T), 们收集了2009年1月至2020年5月的全网平均 任何节点可通过上面的公式轻易验证该矿工为成 算力,并画出了分布趋势图.可以看出,随着比特 功者.系统经过十余年的运行,挖矿难度越来越 币在线活跃地址数的增加和计算能力的迅捷发 大,带来了大量(电力)资源消耗,这意味着系统运 展,比特币全网算力也有了较大的提升 行成本的增加,共识周期的延长,严重影响系统稳 (2)区块生成时间分布 定性,因此应将全网平均算力和区块生成时间分 假设区块链中一个节点的地址为A,且其余额 布等作为资源控制(测评项①)的测评指标,下述 为bal(A),在挖矿过程中,该节点不断修改随机数的
BlockHeadern Nn SHA 2562 Tn SHA 2562 (BlockHeadern) < Tn Nn O ( √ 2 256/T ) 的随机数 ,并计算区块头的 哈希值 ,直到区块头哈希值小于难度值 . 上述关系可由下式表示: . 矿工在短时间内消耗大量的计算资源以求得满足 要求的随机数,进而争夺记账权. 若挖矿成功,则 作为该矿工的工作量证明. 该证明生成困难(生 日攻击下的平均挖矿计算复杂性为 ) , 任何节点可通过上面的公式轻易验证该矿工为成 功者. 系统经过十余年的运行,挖矿难度越来越 大,带来了大量(电力)资源消耗,这意味着系统运 行成本的增加,共识周期的延长,严重影响系统稳 定性,因此应将全网平均算力和区块生成时间分 布等作为资源控制(测评项①)的测评指标,下述 以比特币为例进行评测分析. (1)全网平均算力. 算力是衡量在一定的网络消耗下生成新块的 单位总计算能力;全网算力,即网络中所有参与挖 矿的矿机算力综合,比特币的全网算力是所有参 与挖矿的比特币矿机算力的总和. 如图 4 所示我 们收集了 2009 年 1 月至 2020 年 5 月的全网平均 算力,并画出了分布趋势图. 可以看出,随着比特 币在线活跃地址数的增加和计算能力的迅捷发 展,比特币全网算力也有了较大的提升. (2)区块生成时间分布. bal(A) 假设区块链中一个节点的地址为 A,且其余额 为 ,在挖矿过程中,该节点不断修改随机数的 2020/02/01 2020/02/21 2020/03/12 2020/04/01 2020/04/21 2020/05/11 0 2 4 6 8 10 12 Active nodes Date Active nodes/10 5 (2020/2/1, 585209) (2020/5/14, 718874) (a) Active nodes Date 0 2 4 6 8 10 12 (b) Active nodes/10 5 (2009/1/9, 14) (2020/5/14, 718874) 2009/01 2010/11 2012/10 2014/09 2016/07 2018/06 2020/05 图 2 比特币 P2P 网络规模变化图. (a)近 3 个月比特币网络规模变化图;(b) 2009 年之后比特币网络规模变化图 Fig.2 Scale change of Bitcoin P2P network: (a) scale change of Bitcoin P2P network in last three months; (b) scale change of Bitcoin P2P network since 2009 Transaction node Mining node Nodes Broadcast transaction Broadcast block Proof of work Create transaction Create candidate blocks Verify candidate blocks Block assembly to chain Verify candidate blocks Block assembly to chain Broadcast block (K+1)th consensus Kth consensus 图 3 共识过程时序关系图 Fig.3 Consensus timing diagram · 1272 · 工程科学学报,第 42 卷,第 10 期