当前位置:网站首页>Development of block hash game guessing system (mature code)
Development of block hash game guessing system (mature code)
2022-06-24 16:48:00 【Development weixin-xtkf556】
The four core technologies of blockchain are cryptography 、 Distributed ledger 、 Consensus mechanisms and smart contracts . Cryptography is one of the most important parts , It can be said to be the cornerstone of blockchain , Other technologies are high-rise buildings that build blockchain based on cryptography . There are two main cryptographic algorithms used in blockchain :
One is hash algorithm ,
Second, asymmetric encryption .
First , It's decentralized . The database originally maintained by one party , It has become a database maintained by many parties . Everyone writes data together by consensus , No one can control the data alone .
secondly , It allows everyone to change from a separate account to a joint account , This brings consistency and transparency to the data .
in addition , Blockchain is only allowed to write data , Deleting and modifying... Are not allowed , It can prevent data from being tampered with secretly . Simply speaking , Hash algorithm is a special function . No matter how long the string is entered , You can get a fixed length output value through this function . It's like the ID number , Always the 18th , It is also the only one in China . The output value of hash algorithm is called hashing value . Hash algorithm has three characteristics .
The first characteristic of hash algorithm is anti-collision ability . The so-called collision , Is to enter two different data , You end up with the same input . It's like we hit the shirt when we were shopping , The pit collision is that most of the inputs can get the only output . In the world of blockchain , The address of any transaction or account is completely generated by the hash algorithm . This also ensures the uniqueness of the transaction or account address in the blockchain network . The second feature is that it is unidirectional . for example , If you enter a string of data , You can get a hash value through the hash algorithm , But there is no way to invert the hash value to get the input data string . It's one-way , Based on that , Blockchain effectively protects the security of our information . The third characteristic of hash algorithm is anti tamper ability . For any input , Even small changes , The hash value can also vary greatly . This feature plays a key role in the connection between blocks . Each block of the blockchain is marked by the hash value of the previous block . Unless someone can crack all the hash values in the whole chain , Otherwise, once the data is recorded on the chain , It's impossible to tamper . Hash property :
(1) One way .Thatis,givenaninputnumber,itiseasytocalculateitshashvalue,butgivenahashvalue,theoriginalinputnumbercannotbeobtainedaccordingtothesamealgorithm.
(2) Weak anti-collision .Thatis,givenaninputnumber,itiscomputationallyinfeasibletofindanotherhashvaluetogetagivennumberwhenusingthesamemethod.
(3) Strong collision resistance .Thatis,foranytwodifferentinputnumbers,itisnotfeasibletocalculatethesamehashvalueaccordingtothesamealgorithm.
Simple explanation : Hash (Hash) Algorithm , Hash function . It's a one-way cryptosystem , That is, it is an irreversible mapping from plaintext to ciphertext , Only the encryption process , No decryption process . meanwhile , Hash function can change the input of any length to get fixed length output . This one-way feature of the hash function and the fixed length of the output data make it possible to generate messages or data .
边栏推荐
- Abstract factory pattern
- [leetcode108] convert an ordered array into a binary search tree (medium order traversal)
- Tencent blue whale Zhiyun community version v6.0.3 was officially released together with the container management platform!
- Video structured intelligent analysis platform easycvr video recording plan function optimization / regularly delete expired videos
- Introduction to website development for zero foundation Xiaobai
- Join in ABAP CDs
- [playing with Tencent cloud] a solution to the impassability of cross-border access to foreign websites using Tencent cloud CVM
- Yuanqi forest started from 0 sugar and fell at 0 sugar
- zblog系统实现前台调用当天发布文章数量的教程
- A set of very good H3C and Tianrongxin Internet cutover scheme templates, with word document download
猜你喜欢

A survey on dynamic neural networks for natural language processing, University of California

Ui- first lesson

Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)

A survey of training on graphs: taxonomy, methods, and Applications

Problems encountered in the work of product manager
![[leetcode108] convert an ordered array into a binary search tree (medium order traversal)](/img/e1/0fac59a531040d74fd7531e2840eb5.jpg)
[leetcode108] convert an ordered array into a binary search tree (medium order traversal)

Applet - use of template

Ps\ai and other design software pondering notes
![[go] concurrent programming channel](/img/6a/d62678467bbc6dfb6a50ae42bacc96.jpg)
[go] concurrent programming channel

Daily algorithm & interview questions, 28 days of special training in large factories - the 15th day (string)
随机推荐
Collect tke logs through daemonset CRD
Finite element simulation in design
Tencent releases the full platform version of reasoning framework TNN, and supports mobile terminal, desktop terminal and server terminal at the same time
6 things all engineers should know before FEA
05. Tencent cloud IOT device side learning -- mqtt protocol client implementation
Try catch finally implementation mechanism
Abnormal dockgeddon causes CPU 100%
Kubernetes popular series: getting started with container Foundation
AI structured intelligent security video monitoring technology, supporting the protective umbrella of the reserve / wild animals
集体突破之后,中国公有云的下一步落在哪里?
Principle analysis of robot hardware in the loop system
Load MySQL table data consumption quick installation configuration through kafka/flink
Cognition and difference of service number, subscription number, applet and enterprise number (enterprise wechat)
Week7 weekly report
中金证券靠谱吗?是否合法?开股票账户安全吗?
Is CICC securities reliable? Is it legal? Is it safe to open a stock account?
Sigai intelligent container damage identification products are deployed in Rizhao Port and Yingkou Port
Serial of H3CNE experiment column - VLAN configuration experiment, access and trunk
Cause analysis of the failure of web page live broadcast on demand RTMP streaming platform easydss streaming live broadcast
A survey on model compression for natural language processing (NLP model compression overview)