P1.BTC- principles of cryptography

The so-called currency encryption is not encrypted, the contents of all transactions on the block chain (including: address accounts, transfer of address) are public.

Bitcoin is mainly used in cryptography two functions: Hash and signature.

One Hash

Cryptographic hash function:

1.Collision resistance

  Hash collision is very common, because space is limited the output of mail, such as 256-bit Hash value, the output power of 2 space is 256, but the input space is infinite. But Collision resistance is one currently no effective way to push the anti-input value by hash value, can only be cracked by Brutal Force. If you enter a larger space in the actual break in, almost infeasible. I.e., having tamper resistance.

ps: MD5 algorithm already does not have the characteristics of a. (Already know how to artificially manufacture the Hash Collision)

2.Hiding

Refers to a single calculation process Hash is irreversible. But still can consider the use of brute force.

ps: in practice, in order to prevent brute force, a random number will be used after stitching the nonce (increase of the input space), calculates Hash values.

 3.puzzle friendly

Refers to the Hash value is unpredictable in advance, if you want to hash falls within a certain range, the only one to try.

Bitcoin hash function used is SHA-256 (secure hash Algorithm)

 

Two signature

   You need to know the account management mechanism in Bitcoin, the decentralized, would like to open an account is to create a pair of local (public, private), on behalf of an account. If you need an account to turn 10 Bitcoin, you need to use their own private key signature, the other with my public key to decrypt it can be verified.

Guess you like

Origin www.cnblogs.com/carlous/p/11033171.html