Position: Home page » Blockchain » Blockchain signature verification

Blockchain signature verification

Publish: 2021-04-29 00:02:28
1. Basically, the principle is the same. Take baopin.com as an example, baopin.com's video blockchain authentication is actually DAPP. First, it takes a screenshot of the video's key frames per minute, then transcodes it into a string of unique numbers, and then uploads and records it into the Ethereum blockchain.
2. Blockchain itself solves the problem of large-scale cooperation between strangers, that is, strangers can cooperate with each other without mutual trust. So how to ensure the trust between strangers to achieve mutual consensus mechanism? The centralized system uses trusted third-party endorsements, such as banks. In the eyes of the common people, banks are reliable and trustworthy institutions. The common people can trust banks to solve real disputes. But how does a decentralized blockchain guarantee trust
in fact, blockchain uses the basic principles of modern cryptography to ensure its security mechanism. The knowledge system involved in the field of cryptography and security is very complicated. Here, I only introce the basic knowledge of cryptography related to blockchain, including hash algorithm, encryption algorithm, information digest and digital signature, zero knowledge proof, quantum cryptography, etc. Through this lesson, you can learn how to ensure the confidentiality, integrity, authentication and non repudiation of the blockchain using cryptography technology
basic course lesson 7 basic knowledge of blockchain security
1. Hash algorithm (hash algorithm)
hash function (hash), also known as hash function. Hash function: hash (original information) = summary information. Hash function can map any length of binary plaintext string to a shorter (generally fixed length) binary string (hash value)
a good hash algorithm has the following four characteristics:
1. One to one correspondence: the same plaintext input and hash algorithm can always get the same summary information output
2. Input sensitivity: even if the plaintext input changes slightly, the newly generated summary information will change greatly, which is greatly different from the original output
3. Easy to verify: plaintext input and hash algorithm are public, anyone can calculate by themselves, and whether the output hash value is correct
4. Irreversibility: if there is only the output hash value, the hash algorithm can never dece the plaintext
5. Conflict avoidance: it is difficult to find two plaintexts with different contents, but their hash values are the same (collision)
for example:
hash (Zhang San lent Li Si 100000 yuan for 6 months) = 123456789012
such a record as 123456789012 is recorded in the account book
it can be seen that hash function has four functions:
simplify information
it is easy to understand, and the information after hashing becomes shorter
identification information
you can use 123456789012 to identify the original information, and summary information is also called the ID of the original information
hidden information
the account book is a record like 123456789012, and the original information is hidden
verification information
if Li Si cheated that Zhang San only lent Li Si 50000 when repaying, both parties can verify the original information with the hash value of 123456789012 recorded before
hash (Zhang San lent Li Si 50000 for 6 months) = 987654321098
987654321098 is completely different from 123456789012, which proves that Li Si lied, Then the information can't be tampered
common hash algorithms include MD4, MD5 and Sha series algorithms, and Sha series algorithms are basically used in mainstream fields. Sha (secure hash algorithm) is not an algorithm, but a group of hash algorithms. At first, it was SHA-1 series, and now the mainstream applications are sha-224, SHA-256, sha-384 and sha-512 algorithms (commonly known as SHA-2). Recently, Sha-3 related algorithms have been proposed, such as keccak-256 used by Ethereum
MD5 is a very classic hash algorithm, but unfortunately, both it and SHA-1 algorithm have been cracked. It is considered by the instry that its security is not enough to be used in business scenarios. Generally, sha2-256 or more secure algorithm is recommended
hash algorithm is widely used in blockchain. For example, in blocks, the latter block will contain the hash value of the previous block, and the content of the later block + the hash value of the previous block will jointly calculate the hash value of the later block, which ensures the continuity and non tamperability of the chain< Encryption and decryption algorithm is the core technology of cryptography, which can be divided into two basic types: symmetric encryption algorithm and asymmetric encryption algorithm. According to whether the key used in the encryption and decryption process is the same or not, the two modes are suitable for different needs, just forming a complementary relationship, and sometimes can be combined to form a hybrid encryption mechanism
symmetric cryptography (also known as common key cryptography) has the advantages of high computational efficiency and high encryption strength; Its disadvantage is that it needs to share the key in advance, which is easy to leak and lose the key. The common algorithms are des, 3DES, AES and so on
asymmetric cryptography (also known as public key cryptography) is different from the encryption and decryption key, and its advantage is that it does not need to share the key in advance; Its disadvantage is that it has low computational efficiency and can only encrypt short content. Common algorithms include RSA, SM2, ElGamal and elliptic curve series. Symmetric encryption algorithm is suitable for the encryption and decryption process of a large number of data; It can't be used in signature scenario: and it often needs to distribute the key in advance. Asymmetric encryption algorithm is generally suitable for signature scenario or key agreement, but it is not suitable for large amount of data encryption and decryption< Third, information digest and digital signature
as the name suggests, information digest is to hash the information content to obtain a unique digest value to replace the original and complete information content. Information digest is the most important use of hash algorithm. Using the anti-collision feature of hash function, information digest can solve the problem that the content has not been tampered
digital signature is similar to signing on paper contract to confirm contract content and prove identity. Digital signature is based on asymmetric encryption, which can be used to prove the integrity of a digital content and confirm the source (or non repudiation)
we have two requirements for digital signature to make it consistent with our expectation for handwritten signature. First, only you can make your own signature, but anyone who sees it can verify its validity; Second, we want the signature to be only related to a specific file and not support other files. These can be achieved by our asymmetric encryption algorithm above
in practice, we usually sign the hash value of information instead of the information itself, which is determined by the efficiency of asymmetric encryption algorithm. Corresponding to the blockchain, it is to sign the hash pointer. In this way, the front is the whole structure, not just the hash pointer itself< Zero knowledge proof means that the verifier can make the verifier believe that a certain conclusion is correct without providing any additional information to the verifier
zero knowledge proof generally meets three conditions:
1. Completeness: authentic proof can make the verifier successfully verify
2. Soundness: false proof can not make the verifier pass the verification
3. Zero knowledge: if you get proof, you can't get any information other than the proof information from the proof process< With more and more attention paid to the research of quantum computing and quantum communication, quantum cryptography will have a huge impact on the information security of cryptography in the future
the core principle of quantum computing is that qubits can be in multiple coherent superposition states at the same time. Theoretically, a large amount of information can be expressed by a small number of qubits and processed at the same time, which greatly improves the computing speed
in this way, a large number of current encryption algorithms are theoretically unreliable and can be cracked, so the encryption algorithm has to be upgraded, otherwise it will be broken by quantum computing
as we all know, quantum computing is still in the theoretical stage, which is far from large-scale commercial use. However, the new generation of encryption algorithms should consider the possibility of this situation.
3.

in the distributed network of blockchain, the communication and trust between nodes need to rely on digital signature technology, which mainly realizes the identity confirmation and information authenticity and integrity verification

digital signature

digital signature (also known as public key digital signature, electronic signature) is a kind of common physical signature written on paper, but it uses the technology in the field of public key encryption to identify digital information. A digital signature usually defines two complementary operations, one for signature and the other for verification. Only the sender of information can proce a digital string which can not be forged by others. This digital string is also an effective proof of the authenticity of the information sent by the sender. Simply prove that "I am who I am."

4. It's useless to just delete, because there is no solution to the vulnerability
the suggestion is to redo the system, and then find the guardian God to reinforce the system security for you, so as to completely plug the loopholes.
5. [verify signature]
jump out of the verification interface, click the return button in the upper left corner, and then upgrade to the latest version to refresh the node. Or uninstall again and restore the account with mnemonics Refresh node] in free communication, the + sign in the upper right corner, "node detection & quot;
6. 1、 Similarity

distributed
git ensures that each code warehouse maintains a complete project library locally, not just the branch in which it works and its own submission history. At the same time, it also keeps all the snapshot and index information after the latest pull

on the blockchain, each node keeps a complete database locally, not just its own transaction information

traceability
in Git commit chain, each commit object contains a parent object (the object of the last commit, except the first commit), which can trace all the previous records

on the blockchain, each block contains the index of the previous block (except the genesis block), which can trace all valid transactions before<

tamper proof
in Git's commit chain, each object itself calculates a checksum before storing, and then references it with a checksum. Once modified, the checksums will not be correct, which means that it is impossible to change the contents of any file or directory without git's knowledge< The mechanism used by git to calculate the checksums is called SHA-1 hash. This is a string composed of 40 hexadecimal characters (0-9 and A-F), which is calculated based on the content or directory structure of the file in GIT. SHA-1 hash looks like this:



in the blockchain, each block contains the last block ID, and this block ID has two SHA-256 hashes, which are calculated based on the block content. Once the content is modified, the hash will change, which is inconsistent with the chain of other nodes and cannot be added to the longest chain, so the content cannot be tampered with< 2. Difference

collective consensus and central node will: 1 - blockchain merges based on collective consensus (POW / POS) to form the longest chain, which is the main chain

2 - in Git system, when multi node cooperation is carried out through the warehouse hosting platform, it is the manager of the platform project who controls the power of merge, which reflects the will of the central node<

cryptography
1 - in bitcoin blockchain, cryptography mainly uses the following methods

in the whole system of bitcoin blockchain, a large number of public encryption algorithms are used, such as Merkle tree hash number algorithm, elliptic curve algorithm, hash algorithm, symmetric encryption algorithm and some coding algorithms. The functions of various algorithms in bitcoin blockchain are as follows:

A) hash algorithm

the two hash functions used in bitcoin system are: 1. SHA-256, which is mainly used to complete pow (proof of workload) calculation; 2. Ripemd160, mainly used to generate bitcoin address

b) Merkle hash tree

binary tree or multi tree based on hash value. In the computer field, Merkle tree is mostly used for integrity verification. In the distributed environment, integrity verification can greatly rece the complexity of data transmission and calculation<

C) elliptic curve algorithm

in bitcoin, the public key cryptography algorithm based on secp256k1 elliptic curve mathematics is used for signature and verification. On the one hand, it can ensure that the user's account is not replaced by an impostor, on the other hand, it can ensure that the user can not deny the signed transaction. The private key is used to sign the transaction information, and the user's public key is used to verify the signature. If the verification is passed, the transaction information will be recorded and the transaction will be completed

d) symmetric encryption algorithm

the official bitcoin client uses AES (symmetric block cipher algorithm) to encrypt the wallet file. After the user sets the password, the private key of the wallet is encrypted by the user set password through AES to ensure the security of the private key of the client

e) base58 encoding

base58 is a unique encoding method used in bitcoin. It is mainly used to generate the wallet address of bitcoin, which is similar to the permutation algorithm mechanism in classical cryptography. Its purpose is to increase the readability of bitcoin and change the binary hash value into the address we see

2 - git: SSH key is mainly used for remote login verification, SHA-1 is used for code content checking sum<

SSH is the abbreviation of secure shell, developed by IETF's network working group. It is a protocol designed to provide security for remote login sessions and other network services. SSH protocol can effectively prevent information leakage in the process of remote management< The process of SSH transmission is as follows: (1) the remote host receives the user's login request and sends its public key to the user 2) The user uses the public key to encrypt the login password and send it back 3) The remote host uses its own private key to decrypt the login password. If the password is correct, the user is allowed to log in.
7.

As an emerging technology, blockchain has attracted more and more attention. It is a new application of traditional technology in the Internet era, including distributed data storage technology, consensus mechanism and cryptography. With the establishment of various blockchain research alliances, more and more funds and personnel support related research. Hash algorithm, zero knowledge proof, ring signature and other cryptographic algorithms used in blockchain:

hash algorithm

as the basic technology of blockchain, the essence of hash function is to map a set of data of any length (limited) to a set of defined length data stream. If this function satisfies the following conditions:

(1) the calculation of hash value for any group of data is very simple

(2) it is difficult to find two different data with the same hash value

hash functions satisfying the above two properties are also called encrypted hash functions. In case of no contradiction, hash functions usually refer to encrypted hash functions. For the hash function, finding such that is called a collision. The current popular hash functions are MD5, SHA1, Sha2, Sha3

bitcoin uses sha256, and most blockchain systems use sha256 algorithm. So here's sha256< Step 1: additional filling bits. The length of the message is congruent with that of 448 mod512 (length = 448 mod512). The number of bits to be filled ranges from 1 to 512. The highest bit of the filled bit string is 1, and the rest bits are 0

Step2: additional length value. The bit length of the initial message (before filling) represented by 64 bit is appended to the result of step 1 (the low byte takes precedence)

Step3: initialize cache. A 256 bit cache is used to store the intermediate and final results of the hash function

Step 4: process 512 bit (16 word) packet sequence. The algorithm uses six basic logic functions and consists of 64 steps of iterative operation. Each step takes the 256 bit cache value as the input, and then updates the cache content. Each step uses a 32-bit constant KT and a 32-bit wt. Where WT is the packet after the packet, t = 1,2,..., 16

step5: after all 512 bit packets are processed, the output of the last packet of sha256 algorithm is 256 bit packet< In 2001, Rivest, Shamir and TauMan proposed ring signature for the first time. It is a simplified group signature, only ring members have no manager, and it does not need the cooperation between ring members. In the ring signature scheme, the signer first selects a temporary signer set, which includes signers. Then the signer can generate the signature independently by using his private key and the public key of others in the signature set without the help of others. Members of the signer collection may not know that they are included in it

ring signature scheme consists of the following parts:

(1) key generation. A key pair (public key PKI, private key ski) is generated for each member of the ring

(2) signature. The signer uses his private key and the public keys of any n ring members (including himself) to generate the signature a for the message M

(3) signature verification. According to the ring signature and message M, the verifier verifies whether the signature is signed by the member in the ring. If it is valid, it will be received, otherwise it will be discarded

ring signature satisfies the following properties:

(1) unconditional anonymity: the attacker can not determine which member of the ring generated the signature, even if the private key of the ring member is obtained, the probability is not more than 1 / n

(2) Correctness: the signature must be verifiable by all others

(3) unforgeability: other members of the ring can't forge the real signer's signature, and even if an external attacker obtains a valid ring signature, he can't forge a signature for message M

(1) anonymity. The verifier can verify that the signature is signed by a member of the group, but can't know which member it is, so that the signer can be anonymous< (2) traceability. In group signature, the existence of group administrator ensures the traceability of signature. The group administrator can revoke the signature and expose the real signer. The ring signature itself cannot reveal the signer unless the signer wants to expose or add additional information to the signature. A verifiable ring signature scheme is proposed. In this scheme, the real signer wants the verifier to know his identity. At this time, the real signer can confirm his identity by disclosing his secret information< (3) management system. Group signature is managed by group administrator, ring signature does not need to be managed, signer can only select a set of possible signers, obtain its public key, and then publish the set, all members are equal

the Xueshuo innovation blockchain Technology Workstation of Lianqiao ecation online is the only approved "blockchain Technology Specialty" pilot workstation of "smart learning workshop 2020 Xueshuo innovation workstation" launched by the school planning, construction and development center of the Ministry of ecation of China. Based on providing diversified growth paths for students, the professional station promotes the reform of the training mode of the combination of professional degree research, proction, learning and research, and constructs the applied and compound talent training system< br />

8. Hello, your problem, I seem to have encountered before, the following is my original solution ideas and methods, hope to help you, if there is a mistake, please forgive me! The process of signing all
e-contracts on the e-signing platform is generally as follows:
how to sign an E-contract first step: real name authentication
real name authentication is a kind of verification audit for the authenticity of user data. Help to establish a sound and reliable Internet credit foundation< How to sign an E-contract step 2: sign an E-contract online
the Ministry of Commerce promulgated the "E-contract online process specification", which encourages everyone to sign an E-contract by using the E-contract platform, and uses the e-signature technology to ensure the security, integrity and effectiveness of the contract signing, transmission and storage. The e-signature and encryption technology are adopted. Once the contract is signed, the, After signing the contract, it can be stored in a secure cloud storage system, solidifying the evidence and providing evidence in case of dispute. The most important thing is that the evidence provided by the third party E-contract platform is very strong and easy to be accepted by judges
to sign an E-contract on the E-contract platform, as long as you upload your E-contract and use your exclusive e-signature, in order to verify that your e-signature is exclusive to you, encrypt the login, reserve the mobile phone random dynamic password, and ensure that the signing behavior is controlled by the signer, the E-contract will be signed
how to sign an electronic contract step 3: send the contract
next, you can send the signed contract to the other party, and the first time you sign it will be sent to the other party for signing, and the sending time will also be recorded accurately
how to sign an E-contract step 4: the other party signs the contract
when the other party receives the contract you sent, it will receive a notice. At this time, the other party only needs to log on the platform to sign the received E-contract, verify it by SMS, and complete the effective signing. In this process, the platform E-contract will also issue CA certificate through the national authority, and ensure the uniqueness of the certificate fingerprint, so that the tampering is invalid and the authenticity and validity of the signature can be identified. Thank you very much for your patience. If you have any help, please accept it. I wish you a happy life! thank you!
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750