(1)物物交换
xff08; 1xff09; material exchange
世界上有一个与世隔绝小村庄叫做比特村,村庄共有几百户人家,村民们自给自足,一直过着物物交换的生活,比如,老张拿一袋面粉换老李的一只羊。
There is a small isolated village in the world called the village of Bit xff0c; there are hundreds of households in the village xff0c; the villagers are self-sufficient xff0c; they have been living in an exchange of goods xff0c; e.g. xff0c; Old Zhang is exchanging a bag of flour for a sheep of Lee.
(2)一般等价物
随着比特村的物品越来越丰富,这时不管是种苹果的还是养羊的,每天都得搞清楚几十种商品的相对价格。为了解决物物交换的问题,村民决定将黄金作为一般等价物,用黄金来表示商品价格,从而产生了货币的概念,比特村进入了货币商品交换阶段。
As the goods of the village of Bit get richer and richer xff0c; when they grow apples and goats xff0c; when they have to figure out the relative prices of dozens of commodities every day xff0c; when they decide to use gold as a generic equivalent xff0c; when they use gold to represent commodity prices xff0c; when they produce the concept of currency xff0c; and when the village of Bit is entering the currency exchange phase.
(3)符号货币
strang>( 3xff09; sign currency
随着物品交易数量和金额增加,对货币的需求越来越大,而黄金的开采费时费力。村民们决找张纸,写上“一克黄金”,就代表一克黄金。但这张纸只有德高望重的老村长签名的纸才有效,这样老村长就按照各家黄金的存量发给大家等量的纸币。比特村进入了符号货币(纸币)时代,而老村长就承担了政府和银行的角色。
As the volume and amount of goods are traded up xff0c; the demand for money is growing xff0c; and gold mining is time-consuming and time-consuming. Villagers decide to find a piece of paper xff0c; write “one gram of gold” xff0c; that represents one gram of gold. But this piece of paper is valid only if it is signed by an old village chief of high moral value xff0c; so that the old village chief issues the same amount of paper to everyone as the stock of gold. The village of Bit has entered the sign currency xff08; the bank notes #xff09; the era #xff0c; and the old village chief has assumed the role of government and bank.
(4)中央虚拟货币
随着交易的发展,村民们发现纸币也完全没有存在的必要。因为既然大家都信任老村长,也信任老村长发行的纸币,可以由村长维护一个记录每户的纸币数量账本,当老张用一克黄金换老李一只羊时,只需要在村长的账本上将老张的黄金减一克,将老李黄金加一克,就完成了交易。比特村进入了中央虚拟货币时代,正如凯恩斯在《货币论》中指出:“记账货币是表示债务、物价与一般购买力的货币。”
xff0c; villagers find that there is no need for paper coins to exist. Because everyone trusts the old village chief xff0c; also trusts the old village chief xff0c; it is possible for the village chief to maintain a bank account book that records the number of banknotes per household xff0c; xff0c when the old banknote is exchanged for an old Lee sheep xff0c; only need to reduce the old gold by xff0c on the village chief's books xff0c; complete the transaction.
(5)分布式数字货币
随着老村长年事已高,村民们选出了新一任村长。新一任村长拿着账本,心想这全村各户谁有多少钱岂不是我说了算,同时村民们也发现,这个体系完全依赖于账本持有人的个人信用,如果这个人随意篡改账本,整个货币系统将会崩溃。
As the old village chief's old age is high xff0c; the villagers have elected a new village chief. The new village chief has a book xff0c; I can't say how much money each household has in this village xff0c; and the villagers find xff0c; the system is entirely dependent on the personal credit of the account holder xff0c; if this person randomly alters the account book xff0c; the entire monetary system will collapse.
当村民们不知所措之时,一个叫中本聪的村民走上台,告诉大家他设计了一套不依赖任何中央机构或个人的分布式数字货币系统。
When the villagers were out of control #xff0c; a villager called Nakamoto took to the stage #xff0c; he told everyone that he had designed a distributed digital monetary system that did not depend on any central agency or individual.
- 账簿上不再记载每户村民的余额,而是记录从账簿创建开始到当前所有的交易记录。只要账簿的初始状态确定,每一笔交易记录可靠并有序,可以推算出当前每个人持有多少钱。
- 账簿公开,任何村民都可以获得当前完整的账簿。
这套系统中虽然账簿公开,任何人在交易时都不使用真实身份,而是使用一个唯一的代号,通过密码学技术确保在不暴露真实身份的情况下交易。
This system, although the books are publicly available xff0c; no one uses a real identity xff0c at the time of the transaction; instead, it uses a unique code xff0c; and by cryptography ensures that the transaction is conducted without revealing the true identity.
(1)对称密码体制
& #xff08; 1xff09; symmetric cryptographic system
对称密码体制(Symmetric Key Cryptosystem)又称单钥密码体制(One Key Cryptosystem)、秘密密钥密码体制(Secret Key Cryptosystem)。对称密码体制中,密钥必须完全保密,且加密密钥和解密密钥相同,或其中的一个可以很容易地推出另一个。
Symmetric cryptography & #xff08; SymmetsyKey Cryptosystem) also known as the single key cryptography & #xff08; OneKey Cryptosystem) Secret Key System & #xff08; Secret Key Cryptosystem). In the symmetric cryptography xff0c; keys must be completely confidential xff0c; and encryption keys are identical #xff0c; or one of them can easily launch another.
M = D k 2 ( E k 1 ( M ) ) M= D_{k_2}(E_{k_1}(M)) M=Dk2??(Ek1??(M))
其中,
k
1
=
k
2
k_1 = k_2
k1?=k2?或
k
1
k_1
k1?容易推出
k
2
k_2
k2?。
典型算法有DES、3DES、AES、IDEA、RC4等。对称密码体制的密钥相对较短,密文的长度往往与明文长度相同,具有较快的加解密速度,易于硬件实现。但发送方如何安全、高效地把密钥送到接收方是对称密码体制的软肋,往往需要“安全通道”,此外称密码体制密钥量大,难于管理。
xff0c;
(2)非对称加密 1976年,Whitefield Diffie和MartinHellman在《密码学的新方向》(New Directions in Cryptography)中开创性的提出了非对称密码体制(Asymmetric Key Cryptosystem),又称公钥密码体制(Public Key Cryptosystem)、双钥密码体制(Double Key Cryptosystem)。 1976 & #xff0c; Whitefield Diffie and Martin Hellman, in New Directions in Cryptography, pioneered the creation of an asymmetric cryptography (Asymmetric Key Cryptosystem) & #xff0c; also known as Public Key Password System (Public Key Cryptosystem), and Double Key Password System (Double Key Cryptosystem). 该体制中,用户
A
A
A有一对密钥:加密密钥(公钥)
k
p
k_p
kp?和解密密钥(私钥)
k
s
k_s
ks?,两者是不同的,且从加密密钥(公钥)无法推出解密密钥(私钥)。 xff0c; user
若
B
B
B要给
A
A
A发送信息
M
M
M,需要用
A
A
A的加密密钥(公钥)
k
p
k_p
kp?(可在公开目录中查找)加密消息:
E
k
p
(
M
)
E_{k_p}(M)
Ekp??(M)。 If
A
A
A收到密文后,用自己的解密密钥(私钥)
k
s
k_s
ks?解密密文:
M
=
D
k
s
(
E
k
p
(
M
)
)
M= D_{k_s}(E_{k_p}(M))
M=Dks??(Ekp??(M))
(3)哈希函数 Hash函数也称哈希函数/散列函数、杂凑函数,是一个从消息空间到像空间的不可逆映射,可将“任意”长度的输入经过变换以后得到固定长度的输出。它是一种单向密码体制,即只有加密过程,不存在解密过程。常用Hash函数包括:MD5、SHA1、SHA256、SHA384和SHA512等。 The Hash function is also called the Hash function / hash function & hash function xff0c; is an irreversible map xff0c from message space to space like xff0c; is an output of (4)数字签名 xff08; 4xff09; digital signature 数字签名(Digital Signature),也称电子签名,是指附加在某一电子文档中的一组特定的符号或代码。它利用密码技术对电子文档进行关键信息提取并进行认证形成,用于标识签发者的身份以及签发者对电子文档的认可,并能被接收者用来验证该电子文档在传输过程中是否被篡改或伪造。 Digital signature & #xff0c; also referred to as electronic signature & #xff0c; refers to a specific set of symbols or codes attached to an electronic document. It uses password technology to extract and authenticate key information from an electronic document to form xff0c; uses the identity of the issuer and the author's approval of the electronic document xff0c; and is able to be used by the recipient to verify whether the electronic document has been tampered with or falsified during transmission. 2008年,SatoshiNakamoto(中本聪)论文《Bitcoin:APeer-to-Peer Electronic Cash System》(《比特币:一种点对点的电子现金系统》成为了比特币(BitCoin)诞生的标志性作品。 2008 xff0c; SatoshNakamoto (medium-brain) paper, Bitcoin:Apeer-to-Peer Electronic Cash System (bitcoin: an electronic cash system for point-to-point) became the landmark by which BitCoin was born . 比特币是一种去中心化、无需第三方信任的电子货币,基于点对点网络和密码学工具实现。 Bitcoin is a decentralised electronic currency that does not require third-party trust xff0c; it is based on point-to-point networks and cryptography tools. 比特市与Q币、游戏币等其他虚拟货币的区别 the difference between the city of Bit and other virtual currencies, such as Q-coin, game currency 比特币的交易是由比特币网络中的参与者来共同完成的,这些参与者之间互相发送比特币,以此来完成资产的转移。 The Bitcoin transaction was performed jointly by participants in the Bitcoin network xff0c; the participants sent Bitcoin xff0c to each other as a means of completing the transfer of assets. 用户在交易前需要选择自己合适的比特币钱包,以存储和管理自己的比特币。比特币钱包是一种特殊文件,存放私钥,通过钱包可以访问多个比特币地址。 Users need to select their own appropriate bitcoin wallets xff0c; to store and manage their own bitcoins prior to the transaction. bitcoins are special files xff0c; store private keys xff0c; access several bitcoins through wallets. 一个比特币地址是一个字符串,由数字和字符组成,每个比特币地址都有着自己的比特币数量余额。 A bitcoin address is a string xff0c; xff0c consisting of numbers and characters; each bitcoin address has its own bitcoin quantity balance . 比特币用户可以创新任意多个地址,当创建一个比特币地址,实际上是生成了一个公钥/私钥对,一个比特币地址代表一个公钥(公钥允许任何人可以验证使用对应私钥签名的消息),而私钥则保存在钱包里。 bitcoin users can invent any number of addresses xff0c; when creating a bitcoin address xff0c; actually generating a public key/private key pair xff0c; a bitcoin address representing a public key xff08; a public key allowing anyone to verify a message using a corresponding private key signature xff09; xff0c; and a private key stored in a wallet .
比特币交易的过程分为以下四个步骤: The process of Bitcoin transactions is divided into the following four steps xff1a; (1)新建地址:Bob创建一个比特币地址 xff08; 1xff09; new address: Bob creates a bitcoin address (2)交易发起:Alice使用比特币钱包里的一个私钥对她的交易申请(包含交易金额与Bob的比特币地址)进行签名。此时,网络上的任何人都可以使用对应公钥对这个交易申请进行验证。 (2) transaction initiation: Alice uses a private key in the Bitcoin wallet to sign her transaction application (including the amount of the transaction and Bob's Bitcoin address). At this point xff0c; anyone on the network can authenticate the transaction application using the corresponding public key. (3)交易广播:Alice将该交易在网络中进行广播。 ( 3) trade broadcast : Alice broadcast the transaction on the Internet. (4)交易确认:矿工收集过去十分钟内的交易数据,并将将验证通过的交易信息打包形成一个新的“交易块”,矿工会基于前一个哈希值、新交易块以及随机数计算新的哈希值。哈希值为特定的格式:以一串特定数量的0开始。每个区块都包含一个名为coinbase的初始交易,这个交易为挖矿的胜出矿工所得。将新的“交易块”添加到区块链,这笔交易就被认为是完成了,并且不能被修改或者撤销。
(1)双花 xff08; 1xff09; 双花对于中心化的电子货币,每一笔交易都会经过权威中心的确认。比如,对于同时发起的两比转账行为,权威中心会按照时间顺序来处理,不会存在重复支付的问题。 double flowers for centralised electronic currencyxff0c; each transaction is confirmed by a central authority. For example xff0c; for simultaneous two-to-one transfers xff0c; for authority centres to deal with xff0c in chronological order; there is no problem of duplicate payments. 对于去中心化的比特币,为了确保不存在双重支付,有如下要求: For decentralised bitcoinxff0c; to ensure that there is no double paymentxff0c; the following requirements: (2)工作量证明 xff08; 2xff09; workload certification 比特币网络中通过投票表决来确认交易,一个CPU一票(one-cpu-one-vote),得票最多的交易被认定为一个合法的交易。所以,比特币又被称为是“民主货币”。 The Bitcoin network confirms the transaction by voting xff0c; a CPU (one-cpu-one-vote) xff0c; the transactions with the largest number of votes are recognized as legal transactions. xff0c; and Bitcoin is also referred to as the “democratic currency”. 比特币算法引入了工作量证明 (ProofofWork)机制,称做哈希现金。它的原理是根据交易的数据块,寻找一个包含了多个0的特征随机数,一旦找到了这个随机数,也就确认了一笔交易。计算机只能用穷举的办法来寻找这个随机数,因此证明一个交易需要耗费一定的运算资源和时间,而对随机数中0的数目要求增多,计算工作量呈现指数级增长。对于普通客户端,只需要简单运算,就可检证交易是真实的。这种机制类似现实生活中,政府花费大量精力对钞票进行防伪处理,普通民众可简单识别钞票真伪。 The Bitcoin method introduces the workload certificate (ProofWork) mechanism xff0c; xff0c. The rationale is based on the transaction data block xff0c; searching for a random number of characteristics containing more than zero xff0c; once this random number is found xff0c; confirming a transaction. The computer can only look for this random number xff0c in a poor way; thus proving that a transaction requires a certain amount of computing resources and time xff0c; demanding an increase in the number of zeros in random numbers xff0c; calculating an exponential increase in the workload. For ordinary customers xff0c; simply counting xff0c; just xff0c; and it can be verified that the transaction is real. (3)矿工奖励机制 xff08; 3xff09; incentives for miners 比特币之间的交易,由“矿工”通过“挖矿”进行验证,“挖矿”的过程就是寻找特定随机数的过程,通过找到满足特征的随机数来确认交易。 The transaction between bitcoin & #xff0c; validation by “miners” through “mining”; the process of “mining” is the process of searching for specific random numbers & #xff0c; confirming the transaction by finding random numbers to satisfy characteristics. 矿工通过“挖矿”来获取酬劳的,这个酬劳就是比特币。比特币最开始5年,每个数据块包含50个比特币用于支付“矿工”酬劳;之后每隔4年,得到的酬劳就会减半。此外,每一笔交易会产生少量交易费,这个交易费也是比特币。因此,“挖矿”的酬劳,包含两部分:数据块包含的奖励及交易产生的交易费。到2040年,比特币的总量2100万个被全部挖出后,“矿工”确认交易将不会再产生额外的比特币,而纯粹靠这个数据块里面包含的交易费来获得酬劳。 xff0c; this is Bitcoin. Bitcoin starts five years xff0c; each data block contains 50 bitcoins to pay “miners” xff1b; every four years xff0c; the next half xff0c; and xff0c; each transaction generates a small transaction fee xff0c; this transaction is also Bitcoin. So xff0c; xff0c); xff0c; xff1a; xff1a; xy; xff0c; 2040; xff0c; xfff0c; 21 million of the total amount of bitcoins have been fully recovered; xffoc; miners have confirmed that the transaction will not generate any additional bitcoin xffoc; and the transaction fees contained in this data block will be paid solely on the basis of the transaction fee. 比特币的挖矿过程可以分为以下几个步骤: The mining process in Bitcoin can be divided into the following steps xff1a; 交易验证:矿工会先收集比特币网络中的交易信息,并进行有效性验证。 Trade validation & #xff1a; mining unions first collect information on transactions in the Bitcoin network & #xff0c; and verify validity. 区块打包:矿工会将验证通过的交易信息打包成一个区块,并添加到区块链中。 Block wrapping & #xff1a; the union packs certified transaction information into a block & #xff0c; and adds it to the block chain. 解决谜题:在打包区块的过程中,矿工需要不停的尝试各种可能的数学谜题,直到找到一个合法的区块头。 Resolving puzzles & #xff1a; during packing blocks & #xff0c; miners need to constantly try possible mathematical puzzles & #xff0c; until a legal block is found. 区块验证:一旦矿工找到一个合法的区块头,其他矿工将会对其进行验证,并且选择继续新增区块或者抛弃该区块。 Block validation xff1a; once the miners have found a legal block head xff0c; other miners will verify it xff0c; and choose to continue adding a block or discard it. 奖励获得:一旦矿工成功地新增了一个区块,他们将会获得新的比特币奖励,并且可以从交易费中获得一定的手续费。 Incentives xff1a; once miners succeed in adding a block xff0c; they will receive a new bitcoin reward xff0c; and they will receive a certain transaction fee.
公钥密码体制的设计最终归结为一个陷门单向的数,常见公钥密码体制包括基于大整数因子分解问题的RSA公钥密码体制,基于有限域乘法群上的离散对数问题的ElGamal公钥密码体制,基于椭圆曲线上离散对数问题的椭圆曲线公钥密码体制等。非对称密码体制主要是为了解决对称密码体制中的密钥分发和管理问题,与对称密码体制相比,非对称密码体制加解密速度较慢,密钥较长,密文长度往往大于明文长度。
Hash函数的单向性和输出长度固定的特征使其可生成消息的“数字指纹”(Digital Fingerprint),也称消息摘要(MD,Message Digest)或哈希值/散列值(Hash Value),主要应用于消息认证、数字签名、口令的安全传输与存储、文件完整性校验等方面。
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论