CN115242790A - 基于随机序列区块链共识算法的交易数据安全处理方法 - Google Patents
基于随机序列区块链共识算法的交易数据安全处理方法 Download PDFInfo
- Publication number
- CN115242790A CN115242790A CN202211149227.3A CN202211149227A CN115242790A CN 115242790 A CN115242790 A CN 115242790A CN 202211149227 A CN202211149227 A CN 202211149227A CN 115242790 A CN115242790 A CN 115242790A
- Authority
- CN
- China
- Prior art keywords
- block
- current
- legendre
- transaction data
- exhaustive search
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000004519 manufacturing process Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 5
- 238000012795 verification Methods 0.000 claims description 4
- 238000004806 packaging method and process Methods 0.000 claims description 2
- 230000007547 defect Effects 0.000 claims 1
- 230000007246 mechanism Effects 0.000 abstract description 11
- 230000006870 function Effects 0.000 description 12
- 230000008901 benefit Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 238000001583 randomness test Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000010845 search algorithm Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 238000009827 uniform distribution Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9027—Trees
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/20—Network architectures or network communication protocols for network security for managing network security; network security policies in general
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Computer Security & Cryptography (AREA)
- General Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Technology Law (AREA)
- Strategic Management (AREA)
- Software Systems (AREA)
- Marketing (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
技术领域
本发明涉及区块链技术和数据安全技术领域,具体涉及一种基于随机序列区块链共识算法的交易数据安全处理方法。
背景技术
在区块链共识协议中,传统的PoW(Proof of Work)共识算法能够抵抗拜占庭错误;此外,PoW拥有几乎恒定的共识时间,虽然区块链系统中的节点数量各不相同,但生成每个区块所需的时间几乎是恒定的,需要六个区块来确认前一个区块;最后,区块链提出了一种通过激励机制和PoW相结合来实现去中心化的全新思路。
因此,区块链技术已被应用于去中心化的各种场景中。此后,为了满足不同场景的需求,许多不同的共识算法被提出,如:PoS(Proof of Stake)、DPoS(Delegated Proof ofStake)、PoC(Proof of Capacity),这些共识算法在不同的方面有着超越PoW的性能,但PoW仍是当前使用最广泛的共识算法之一。
区块链的核心思想是PoW依赖穷举搜索过程来实现共识。在穷举搜索的过程中,需要找到一个nonce值,使得将该值填入区块头后区块头的哈希值小于目标值。节点花费大量计算资源穷举搜索任何可能的nonce值直到满足要求为止。此后,节点广播该区块,打包的区块中的信息获得系统内全部节点的认可,同时该节点获得奖励,从而实现了系统内全部节点间的共识。
哈希函数假设的抗碰撞和单向映射特性使得共识节点无法从哈希值推断输入。区块链在三个领域采用了两个哈希函数:穷举搜索(SHA-256)、消息摘要(SHA-256 和RIPEMD-160)和Merkle树(SHA-256 和 RIPEMD-160)。
然而,随着密码学技术的发展、算力和攻击能力的提升,类似的许多哈希函数并不像假设的那样安全。例如,2005年X.Wang等人攻破SHA-1哈希函数。此外,MD4 和 RIPEMD 的碰撞被发现。最近的研究中已经报道了对哈希函数冲突的攻击,例如通过量子计算机发现哈希冲突意味着存在量子敌手,以及研究广泛使用的Merkle-Damgård哈希函数中的冲突被发现。如果区块链中使用的哈希函数存在缺陷,攻击者可以利用它们来获得穷举搜索的优势,从而导致严重后果。例如,极少数节点也可能能够控制整个系统,这违背了区块链技术的去中心化的规律。因此,替代区块链中使用的哈希函数成为了一种需要。
Merkle树作为集合成员的证明,可以用累加器代替。而基于哈希函数的消息摘要可以用其他加密原语代替,比如使用密码块链接(cipher block chaining,CBC)加密模式的最后一个块作为输出,或伪随机序列发生器(pseudo-random sequence generator,PRSG)的扰频器模式。有人指出诸如哈希函数、消息验证码(Message AuthenticationCode, MAC)、分组密码、流密码和 PRSG 之类的密码学原语可以互换。
Legendre序列是由A.M.legendre提出的一种二元序列,经过深入的研究展现出平衡性、理想的自相关性、较大的线性复杂度、良好的伪随机性以及均匀的模式分布。I.B.Damgård在Crypto会议中讨论了Legendre序列的性质。R.Turyn等人的工作中给出了Legendre的极小多项式。Jeong-Heon等人求得了Legendre的迹的表达式。Ding Cunsheng和Helleseth Tor讨论了广义扩展的Legendre序列的随机性质,并讨论了相关的生成速度,他们还研究了以 N 为周期的Legendre序列在GF(2)上的线性复杂度。C.Mauduit, A.Sárközy提出了二元序列的随机复杂度度量,f-correlation measure of orderk以及correlation measure of order k。利用有限域上不完全特征和的Weil引理,可以说明Legendre序列具有理想的随机分布性质,序列中的k元子序列具备一致分布的统计属性。
关于Legendre序列的生成,J.Zhao等人设计了一个并行化的高效Legendre序列生成算法。此外,一系列随机性测试证实了Legendre序列在包括NIST测试套件在内的不同随机性测试中均具有良好的随机性。
为了消除当前PoW机制中存在的数据安全隐患,本发明使用Legendre序列设计了一个新型的区块链PoW共识算法,提供了一种基于随机序列区块链共识算法的交易数据安全处理方法。
发明内容
本发明的目的是提出一种基于随机序列区块链共识算法的交易数据安全处理方法,可替换基于传统密码学哈希函数(如SHA-256)进行穷举搜索。在具有严格可证明的随机性和好的安全性保证的同时,可达到符合区块链共识场景需求的交易数据吞吐量和延迟水平,并实现共识机制难度自动调节机制。
本发明的技术方案:
一种基于随机序列区块链共识算法的交易数据安全处理方法,包括以下步骤:
步骤1,区块链初始化阶段:
选取Legendre序列的周期,将这个周期划分为长度相等的个缝隙,并规定共识机制的穷举搜索的目标难度值,穷举搜索的目标为:在Legendre序列中确定当前区块穷举搜索所对应的缝隙,根据该缝隙找到当前区块所对应的Legendre子序列的一个起点,使得该起点所对应的当前区块的Legendre子序列的值满足小于当前目标难度值;其中,所述起点是由和拼接构成,是的高位组成部分,是的低位组成部分;
步骤2,基于Legendre序列的区块链PoW共识阶段:
S2.2当前节点收集区块链网络上待处理的交易数据,将这些交易数据打包到区块体中;
S2.4如果在当前节点完成步骤S2.3之前,当前节点接收到了区块链网络上的其他节点广播的区块,则暂停当前的穷举搜索,对接收到的区块做检查,若检查通过,则将该区块追加到区块链的尾部,然后从步骤S2.1开始重新打包新区块,进行穷举搜索;若检查不通过,则返回到步骤S2.3,继续当前的穷举搜索过程。
相对于现有技术,本发明的优点和有益效果如下:
1、本发明所提出的基于Legendre序列的PoW共识算法是原创的PoW算法,可替代传统的使用密码学哈希函数的穷举搜索方案;具有一定可证明安全性;在保证安全性同时,能够达到符合区块链共识场景需求的交易吞吐量和延迟水平,还可实现共识机制难度自动调节机制。
3、Legendre序列具有特定的数学结构,由有限域上的乘法特征生成,具有一定严格数学证明的随机性,可为共识机制提供好的安全性保证。
4、本发明具有好的可扩展性,可以通过构造新的伪随机序列发生器和选择不同大的梅森素数等方法,灵活地调整穷举搜索算法。
附图说明
图1是实现本发明的方法所对应的系统架构图。
图2是本发明的基于随机序列区块链共识算法的交易数据安全处理方法的流程图。
对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,可以根据以上附图获得其他的相关附图。
具体实施方式
以下结合附图和具体实施例对本发明作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
图1给出了实现本发明的方法所对应的系统架构图,包括数据层、网络层和共识层。数据层包含了Legendre序列、交易数据、版本号、时间戳、成员证明、目标难度、;在数据层的上方是网络层,主要包含P2P网络、传播机制、验证机制;在网络层的上方是共识层,即本发明设计的基于随机序列区块链共识算法的交易数据安全处理方法。
本发明的基于随机序列区块链共识算法的交易数据安全处理方法,包括以下步骤:
步骤1,区块链初始化阶段:
选取Legendre序列的周期,将这个周期划分为长度相等的个缝隙,并规定共识机制的穷举搜索的目标难度值,穷举搜索的目标为:在Legendre序列中确定当前区块(可理解为任意的第n个区块)穷举搜索所对应的缝隙,根据该缝隙找到当前区块所对应的Legendre子序列的起点,(即是由和拼接构成,是的高位组成部分,是的低位组成部分),使得该起点所对应的当前区块的Legendre子序列的值满足小于当前目标难度值。(具体的讲,本实施例中,是在Legendre序列自该起点往后数256位作为当前区块的Legendre子序列)。
步骤2,参见附图2,基于Legendre序列的区块链PoW共识阶段:
S2.1获取共识机制的穷举搜索的目标难度值
S2.2收集交易数据
当前节点收集区块链网络上待处理的交易数据,将这些交易数据打包到区块体中。在该节点收集交易数据时,当前区块所对应的Legendre子序列的起点及穷举搜索结果独立于该区块头中的其他字段。为了防止当前区块在整个区块链网络中传播时,其他共识节点篡改当前区块的版本号、当前区块生成的时间和当前区块目标难度值,因此本发明将这些字段一起打包到当前区块的区块头部分:即,将当前区块版本号、当前区块生成的时间、当前区块的交易的成员证明、当前共识机制的穷举搜索的目标难度值和上一个区块(第n-1个区块)的Legendre子序列的起点填入区块头。
S2.33计算出,即,将与拼接得到;然后计算出该对应的Legendre 子序列,比较的值与当前目标难度值的大小,如果不满足,则继续执行下一步骤;如果满足,则将该填入并组装到当前区块的区块头,广播该区块。
进一步的说,为了提高效率,当前节点可预先检查步骤S2.33中子序列中最长的零游程,如果其长度超过了穷举搜索条件等价所需的前导0个数,那么向后移动到该最长零游程的起点,就自然找到了满足难度要求的子序列,不必向后移动256位。
在确定之前,由于随机的不能被预先计算或存储在内存,使得每次穷举搜索生成的序列有更高的独立性,可防止预先穷举搜索和存储攻击,消除了恶意节点的优势;同时,当前节点每次穷举搜索仅能以一个特定的为基础进行(作为的高位,作为的低位),且可能的取值散布在一个足够大的(以大于为例)的空间内,均匀分布在整个空间内,根据生日悖论,碰撞的概率极小。
S2.4检查区块
如果在当前节点完成步骤S2.3之前,当前节点接收到了区块链网络上的其他节点广播的区块,则暂停当前的穷举搜索(即,在当前节点完成步骤S2.3之前,区块链网络上已经有其他节点完成了穷举搜索并广播其区块),对接收到的区块做检查(检查接收到的区块是否其),若检查通过,则将该区块追加到区块链的尾部,然后从步骤S2.1开始重新打包新区块,进行穷举搜索;若检查不通过,则返回到步骤S2.3,继续当前的穷举搜索过程。
以上所述仅为本发明的实施例说明,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。
Claims (7)
1.一种基于随机序列区块链共识算法的交易数据安全处理方法,其特征在于,包括以下步骤:
步骤1,区块链初始化阶段
选取Legendre序列的周期,将这个周期划分为长度相等的个缝隙,并规定共识机制的穷举搜索的目标难度值,穷举搜索的目标为:在Legendre序列中确定当前区块穷举搜索所对应的缝隙,根据该缝隙找到当前区块所对应的Legendre子序列的一个起点,使得该起点所对应的当前区块的Legendre子序列的值满足小于当前目标难度值;其中,所述起点是由和拼接构成,是的高位组成部分,是的低位组成部分;
步骤2,基于Legendre序列的区块链PoW共识阶段
S2.2当前节点收集区块链网络上待处理的交易数据,将这些交易数据打包到区块体中;
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211149227.3A CN115242790A (zh) | 2022-09-21 | 2022-09-21 | 基于随机序列区块链共识算法的交易数据安全处理方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211149227.3A CN115242790A (zh) | 2022-09-21 | 2022-09-21 | 基于随机序列区块链共识算法的交易数据安全处理方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115242790A true CN115242790A (zh) | 2022-10-25 |
Family
ID=83681220
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211149227.3A Pending CN115242790A (zh) | 2022-09-21 | 2022-09-21 | 基于随机序列区块链共识算法的交易数据安全处理方法 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115242790A (zh) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018032371A1 (zh) * | 2016-08-13 | 2018-02-22 | 深圳市樊溪电子有限公司 | 一种区块链功耗感知的PoW共识机制 |
US20180336552A1 (en) * | 2017-05-17 | 2018-11-22 | Nec Europe Ltd. | Method and system for providing a robust blockchain with an integrated proof of storage |
CN110580653A (zh) * | 2019-08-14 | 2019-12-17 | 长沙理工大学 | 一种基于交易的区块链共识机制 |
-
2022
- 2022-09-21 CN CN202211149227.3A patent/CN115242790A/zh active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018032371A1 (zh) * | 2016-08-13 | 2018-02-22 | 深圳市樊溪电子有限公司 | 一种区块链功耗感知的PoW共识机制 |
US20180336552A1 (en) * | 2017-05-17 | 2018-11-22 | Nec Europe Ltd. | Method and system for providing a robust blockchain with an integrated proof of storage |
CN110580653A (zh) * | 2019-08-14 | 2019-12-17 | 长沙理工大学 | 一种基于交易的区块链共识机制 |
Non-Patent Citations (2)
Title |
---|
YE YUAN 等: ""A New PoW Consensus of Blockchain Based on Legendre Sequence"", 《IEEE CONFERENCE PUBLICATION》 * |
吴梦宇等: "基于工作量证明和权益证明改进的区块链共识机制", 《计算机应用》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bernstein et al. | SPHINCS: practical stateless hash-based signatures | |
Karlof et al. | Distillation codes and applications to DoS resistant multicast authentication | |
Zheng et al. | Fair and dynamic proofs of retrievability | |
Yun et al. | On protecting integrity and confidentiality of cryptographic file system for outsourced storage | |
Asayag et al. | A fair consensus protocol for transaction ordering | |
Lu et al. | Bolt-dumbo transformer: Asynchronous consensus as fast as the pipelined bft | |
Fisch et al. | Scaling proof-of-replication for filecoin mining | |
Chen et al. | Data dynamics for remote data possession checking in cloud storage | |
Biryukov et al. | Fast and tradeoff-resilient memory-hard functions for cryptocurrencies and password hashing | |
Meckler et al. | Coda: Decentralized cryptocurrency at scale | |
Sengupta et al. | Efficient proofs of retrievability with public verifiability for dynamic cloud storage | |
Bernstein et al. | Sphincs | |
Cecchetti et al. | PIEs: Public incompressible encodings for decentralized storage | |
Anthoine et al. | Dynamic proofs of retrievability with low server storage | |
Chaigneau et al. | Key-recovery attacks on full Kravatte | |
Van Hieu et al. | Hardware implementation for fast block generator of Litecoin blockchain system | |
Behnia et al. | Tachyon: Fast signatures from compact knapsack | |
KR102389465B1 (ko) | 블록 체인 생성 장치 및 방법 | |
Primmer et al. | Collision and preimage resistance of the Centera content address | |
CN1815948B (zh) | 基于复合非线性数字滤波器的混沌散列构造方法 | |
Lewi et al. | Securing update propagation with homomorphic hashing | |
Qi et al. | Blockchain-Based Light-Weighted Provable Data Possession for Low Performance Devices. | |
CN115242790A (zh) | 基于随机序列区块链共识算法的交易数据安全处理方法 | |
Di Chiano et al. | A survey on NIST PQ signatures | |
Endignoux | Design and implementation of a post-quantum hash-based cryptographic signature scheme |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221025 |