是... 哈希(Hash)! 不是嘻哈... ... ...
Text: Combo Huang
SHA-256: 451a833c115dc529aeca87feaad6ce9866e072a1481b0456af2bca4abafe823d @ 32bytes
RIPEMD-160: 573bed87af75c06415e64267452bc6310ba1a092 @ 20bytes
BTC Address: 1L3EuimbzuP2kDEvkkNQdBNVcaiC6MXC77
@ Crypto 3 way Concept
1.) PublicKey Encryption
2.) Secrect Key Encryption
3.) Digital Signature (Hash + Private Key to Crypto)
Bitcoin使用ECC @ Secp256k1演算法來產生公私鑰
(比特币终结者探索 @ http://www.8btc.com/btbzjzts_walker)
而... 一般相信, 相同長度的ECDSA比RSA更難破解!!!
Double Hash/Hashing Twice/二次哈希:
SHA256(SHA256(data + random nonce)) // random nonce就是所謂加的"鹽"
以資料形式呈現, 儲存亦很簡單, 透過P2P網路進行資訊交換, 因此非常適合網路交易!!
去中央化, 中央控管的數位貨幣會繼承法幣缺點, 法幣的價值來自政府的擔保, 而... 政府可能會倒!!!
payments to be sent directly from one party to another without going through a
financial institution. Digital signatures provide part of the solution, but the main
benefits are lost if a trusted third party is still required to prevent double-spending.
propose a solution to the double-spending problem using a peer-to-peer network.
The network timestamps transactions by hashing them into an ongoing chain of
hash-based proof-of-work, forming a record that cannot be changed without redoing
the proof-of-work. The longest chain not only serves as proof of the sequence of
events witnessed, but proof that it came from the largest pool of CPU power. As
long as a majority of CPU power is controlled by nodes that are not cooperating to
attack the network, they'll generate the longest chain and outpace attackers. The
network itself requires minimal structure. Messages are broadcast on a best effort
basis, and nodes can leave and rejoin the network at will, accepting the longest
proof-of-work chain as proof of what happened while they were gone.
1.) 去中央化, 純粹的P2P網路電子貨幣
3.) 使用基於哈希函數的作工證明(hash-based proof-of-work)
Commerce on the Internet has come to rely almost exclusively on financial institutions serving as
trusted third parties to process electronic payments. While the system works well enough for
most transactions, it still suffers from the inherent weaknesses of the trust based model.
Completely non-reversible transactions are not really possible, since financial institutions cannot
avoid mediating disputes. The cost of mediation increases transaction costs, limiting the
minimum practical transaction size and cutting off the possibility for small casual transactions,
and there is a broader cost in the loss of ability to make non-reversible payments for nonreversible
services. With the possibility of reversal, the need for trust spreads. Merchants must
be wary of their customers, hassling them for more information than they would otherwise need.
A certain percentage of fraud is accepted as unavoidable. These costs and payment uncertainties
can be avoided in person by using physical currency, but no mechanism exists to make payments
over a communications channel without a trusted party.
What is needed is an electronic payment system based on cryptographic proof instead of trust,
allowing any two willing parties to transact directly with each other without the need for a trusted
third party. Transactions that are computationally impractical to reverse would protect sellers
from fraud, and routine escrow mechanisms could easily be implemented to protect buyers. In
this paper, we propose a solution to the double-spending problem using a peer-to-peer distributed
timestamp server to generate computational proof of the chronological order of transactions. The
system is secure as long as honest nodes collectively control more CPU power than any
cooperating group of attacker nodes.
1.) 再次強調去中央化, 使用密碼學的證明而不是信任第三方機構
2.) 透過P2P分散式的timestamp server產生按時間順序交易的計算證明
We define an electronic coin as a chain of digital signatures. Each owner transfers the coin to the
next by digitally signing a hash of the previous transaction and the public key of the next owner
and adding these to the end of the coin. A payee can verify the signatures to verify the chain of
the coin. A common solution is to introduce a trusted central authority, or mint, that checks every
transaction for double spending. After each transaction, the coin must be returned to the mint to
issue a new coin, and only coins issued directly from the mint are trusted not to be double-spent.
The problem with this solution is that the fate of the entire money system depends on the
company running the mint, with every transaction having to go through them, just like a bank.
We need a way for the payee to know that the previous owners did not sign any earlier
transactions. For our purposes, the earliest transaction is the one that counts, so we don't care
about later attempts to double-spend. The only way to confirm the absence of a transaction is to
be aware of all transactions. In the mint based model, the mint was aware of all transactions and
decided which arrived first. To accomplish this without a trusted party, transactions must be
publicly announced , and we need a system for participants to agree on a single history of the
order in which they were received. The payee needs proof that at the time of each transaction, the
majority of nodes agreed it was the first received.
1.) 透過PKI的數位簽章(Digital Signature)
使用Private Key來簽章(加密); 使用Public Key來驗證(解密)
2.) 基於設計出如上圖的加解密貨幣系統, 來紀錄每一筆交易
The solution we propose begins with a timestamp server. A timestamp server works by taking a
hash of a block of items to be timestamped and widely publishing the hash, such as in a
newspaper or Usenet post [2-5]. The timestamp proves that the data must have existed at the
time, obviously, in order to get into the hash. Each timestamp includes the previous timestamp in
its hash, forming a chain, with each additional timestamp reinforcing the ones before it.
為了設計出去除中央化的機制, 提出了Timestamp Server(時間戳記伺服器)的解決方案
To implement a distributed timestamp server on a peer-to-peer basis, we will need to use a proof of-
work system similar to Adam Back's Hashcash , rather than newspaper or Usenet posts.
The proof-of-work involves scanning for a value that when hashed, such as with SHA-256, the
hash begins with a number of zero bits. The average work required is exponential in the number
of zero bits required and can be verified by executing a single hash.
For our timestamp network, we implement the proof-of-work by incrementing a nonce in the
block until a value is found that gives the block's hash the required zero bits. Once the CPU
effort has been expended to make it satisfy the proof-of-work, the block cannot be changed
without redoing the work. As later blocks are chained after it, the work to change the block
would include redoing all the blocks after it.
The proof-of-work also solves the problem of determining representation in majority decision
making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone
able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority
decision is represented by the longest chain, which has the greatest proof-of-work effort invested
in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the
fastest and outpace any competing chains. To modify a past block, an attacker would have to
redo the proof-of-work of the block and all blocks after it and then catch up with and surpass the
work of the honest nodes. We will show later that the probability of a slower attacker catching up
diminishes exponentially as subsequent blocks are added.
To compensate for increasing hardware speed and varying interest in running nodes over time,
the proof-of-work difficulty is determined by a moving average targeting an average number of
blocks per hour. If they're generated too fast, the difficulty increases.
這類函數具備了"容易驗證" (efﬁciently veriﬁable), 卻"很難被破解"(parameterisably expensive to compute)
A cost-function should be efﬁciently veriﬁable, but parameterisably expensive to compute. We use the following notation to deﬁne a cost-function.
其實越多的0越難猜, 由於電腦不會真的去猜, 所以只好暴力去試所有可能的nonce值,
這是非常相當耗費運算能力, 然而驗證其正確性卻很簡單, 但是並不是純粹算有幾個前導零
SHA256(Block data + nonce) < Difficulty
SHA256(SHA256(version, prev_hash, root_hash, time, difficulty, nonce)) < Target
Target = coefficient * 2^(8 * (exponent – 3))
1418481395 Difficulty @ 2014-01-09 (14億)
144116447847 Difficulty @ 2016-02-17 (1441億)
(Difficulty @ 實作上採用小於目標值的方式能更精確地調整難度)
1. 透過巨量的計算，為當前區塊找到一個前導 n 個 0 的 hash 簽名。
2. 自治系統每兩周調整一次 n 值，爭取全球每 10 分鐘產生一個合法 hash 簽名。
3. 當前區塊裡，包括：前一個區塊的 hash 簽名、轉帳資訊清單 hash、亂數、時間戳記、簽名難度值
（即 n 值）、當前區塊 hash 簽名。
Combo™相當認同佩服這段比喻 by 約翰·史密斯
作工證明的概念早就出現在我們的現實生活中, 就像有一個正妹, 她有一大堆的追求者
@ 金融短訊：比特幣 (Bit Coin) 的運作原理
@ [技術] Bitcoin運作基本原理
@ 兩年升值2萬倍，最划算的投資 — 深入了解 Bitcoin
@ 道高一尺 魔高一丈：比特幣是怎麼回事？
The steps to run the network are as follows:
1) New transactions are broadcast to all nodes.
2) Each node collects new transactions into a block.
3) Each node works on finding a difficult proof-of-work for its block.
4) When a node finds a proof-of-work, it broadcasts the block to all nodes.
5) Nodes accept the block only if all transactions in it are valid and not already spent.
6) Nodes express their acceptance of the block by working on creating the next block in the
chain, using the hash of the accepted block as the previous hash.
Nodes always consider the longest chain to be the correct one and will keep working on
extending it. If two nodes broadcast different versions of the next block simultaneously, some
nodes may receive one or the other first. In that case, they work on the first one they received,
but save the other branch in case it becomes longer. The tie will be broken when the next proofof-
work is found and one branch becomes longer; the nodes that were working on the other
branch will then switch to the longer one.
many nodes, they will get into a block before long. Block broadcasts are also tolerant of dropped
messages. If a node does not receive a block, it will request it when it receives the next block and
realizes it missed one.
express: 表達 表現 表示 (Show)
acceptance: 驗收 承認
branch: 部會 分會 部門 分岔 支會 分支 (branch)
reach: 達到 抵達
dropped: 跌落 放掉
realizes: 知道 認清 意識到 察覺到
6. Incentive (獎勵機制)
By convention, the first transaction in a block is a special transaction that starts a new coin owned
by the creator of the block. This adds an incentive for nodes to support the network, and provides
a way to initially distribute coins into circulation, since there is no central authority to issue them.
The steady addition of a constant of amount of new coins is analogous to gold miners expending
resources to add gold to circulation. In our case, it is CPU time and electricity that is expended.
The incentive can also be funded with transaction fees. If the output value of a transaction is
less than its input value, the difference is a transaction fee that is added to the incentive value of
the block containing the transaction. Once a predetermined number of coins have entered
circulation, the incentive can transition entirely to transaction fees and be completely inflation
free.The incentive may help encourage nodes to stay honest. If a greedy attacker is able to
assemble more CPU power than all the honest nodes, he would have to choose between using it
to defraud people by stealing back his payments, or using it to generate new coins. He ought to
find it more profitable to play by the rules, such rules that favour him with more new coins than
everyone else combined, than to undermine the system and the validity of his own wealth.
convention: 公約 慣例 常規 習俗
circulation: 循環 發行量
steady: 穩定 平穩
constant: 常數 不變
funded with: 資助 與資助
completely: 全然的 完全的
encourage: 鼓勵 提倡 助長 激勵
stay honest: 保持誠實
greedy: 貪婪 饞
assemble: 聚集 組合 組成
defraud: 欺騙 蒙騙 坑
profitable: 有利可圖 有經濟效益
stealing: 偷 賊贓
play by the rules: 守規則辦事 按規矩
favour: 偏愛 恩惠 賜予 促成
undermine: 破壞 腐化
wealth: 財富 錢財
Once the latest transaction in a coin is buried under enough blocks, the spent transactions before
it can be discarded to save disk space. To facilitate this without breaking the block's hash,
transactions are hashed in a Merkle Tree , with only the root included in the block's hash.
Old blocks can then be compacted by stubbing off branches of the tree. The interior hashes do
not need to be stored.
A block header with no transactions would be about 80 bytes. If we suppose blocks are
generated every 10 minutes, 80 bytes * 6 * 24 * 365 = 4.2MB per year. With computer systems
typically selling with 2GB of RAM as of 2008, and Moore's Law predicting current growth of
1.2GB per year, storage should not be a problem even if the block headers must be kept in
claim: 要求 宣稱
Reclaim: 回收 糾正 墾荒
buried: 隱藏 掩埋 埋藏 掩藏
discarded: 丟棄 擯除 拋棄
facilitate: 促進 促成
breaking: 破壞 決裂 打斷
Merkle Tree: https://www.youtube.com/watch?v=t523Q-g22xw
then be: 然後 然後是
interior: 室內 內部 裡面
It is possible to verify payments without running a full network node. A user only needs to keep
a copy of the block headers of the longest proof-of-work chain, which he can get by querying
network nodes until he's convinced he has the longest chain, and obtain the Merkle branch
linking the transaction to the block it's timestamped in. He can't check the transaction for
himself, but by linking it to a place in the chain, he can see that a network node has accepted it,
and blocks added after it further confirm the network has accepted it.
As such, the verification is reliable as long as honest nodes control the network, but is more
vulnerable if the network is overpowered by an attacker. While network nodes can verify
transactions for themselves, the simplified method can be fooled by an attacker's fabricated
transactions for as long as the attacker can continue to overpower the network. One strategy to
protect against this would be to accept alerts from network nodes when they detect an invalid
block, prompting the user's software to download the full block and alerted transactions to
confirm the inconsistency. Businesses that receive frequent payments will probably still want to
run their own nodes for more independent security and quicker verification.
Payment Verification: 付款核銷 付款驗證
querying: 查詢 詢問
convince: 說服 信服
obtain: 取得 獲得 收到
reliable: 可靠 一靠
as long as: 只要
overpowered: 制服了 打敗 壓迫
fool: 唬 欺瞞 玩弄
fabricate: 偽造 杜撰 虛構 捏造 臆造
strategy: 戰略 謀略 籌略
against: 針對 抵抗
accept alerts: 接受警報
inconsistency: 不符合 前後矛盾
frequent: 頻繁的 密集密切的
2. Merkle Tree的子節點上的值是基於你想要的設計可以來任意指定的
(ex. Merkle Hash Tree會將資料的摘要值作為子節點的值;想要設計:哈希運算)
(ex. Merkle Hash Tree的非子節點的值, 其計算法則是將該節點所有的子節點進行組合,
Although it would be possible to handle coins individually, it would be unwieldy to make a
separate transaction for every cent in a transfer. To allow value to be split and combined,
transactions contain multiple inputs and outputs. Normally there will be either a single input
from a larger previous transaction or multiple inputs combining smaller amounts, and at most two
outputs: one for the payment, and one returning the change, if any, back to the sender.
It should be noted that fan-out, where a transaction depends on several transactions, and those
transactions depend on many more, is not a problem here. There is never the need to extract a
complete standalone copy of a transaction's history.
零和博弈 (by 別人的失敗,就是我的快樂啦~)
individually: 個別地 逐一逐個地
fan-out: the number of inputs that can be connected to a specified output.
standalone: 獨立 獨一無二
The traditional banking model achieves a level of privacy by limiting access to information to the
parties involved and the trusted third party. The necessity to announce all transactions publicly
precludes this method, but privacy can still be maintained by breaking the flow of information in
another place: by keeping public keys anonymous. The public can see that someone is sending
an amount to someone else, but without information linking the transaction to anyone. This is
similar to the level of information released by stock exchanges, where the time and size of
individual trades, the "tape", is made public, but without telling who the parties were.
from being linked to a common owner. Some linking is still unavoidable with multi-input
transactions, which necessarily reveal that their inputs were owned by the same owner. The risk
is that if the owner of a key is revealed, linking could reveal other transactions that belonged to
the same owner.
但Bitcoin就很難找到當事人是誰, 為什麼Bitcoin可以做到無法追蹤呢? 因為其帳戶其實就是一組公開金鑰
與私鑰, 任何人都可能可以產生這樣的帳號 同一個人可以產生並擁有成千上萬組的帳戶, 在全世界的任一
的交易記錄都是公開的 因此你理論上可以查到全世界所有的每個Bitcoin帳戶裡有多少錢, 以及這些交易分
別從哪些帳戶匯入 但如前面所述, 很難證明到底是誰擁有這些帳戶 講白話一點...
preclude: 排除 屏除
maintaine: 維護 保持
stock exchanges: 證券交易所
trades: 行業 商業 茂商業工
unavoidable: 不免 避不掉
reveal: 揭示 揭露 批露
11. Calculations (略!)
We have proposed a system for electronic transactions without relying on trust. We started with
the usual framework of coins made from digital signatures, which provides strong control of
ownership, but is incomplete without a way to prevent double-spending. To solve this, we
proposed a peer-to-peer network using proof-of-work to record a public history of transactions
that quickly becomes computationally impractical for an attacker to change if honest nodes
control a majority of CPU power. The network is robust in its unstructured simplicity. Nodes
work all at once with little coordination. They do not need to be identified, since messages are
not routed to any particular place and only need to be delivered on a best effort basis. Nodes can
leave and rejoin the network at will, accepting the proof-of-work chain as proof of what
happened while they were gone. They vote with their CPU power, expressing their acceptance of
valid blocks by working on extending them and rejecting invalid blocks by refusing to work on
them. Any needed rules and incentives can be enforced with this consensus mechanism.
robust: 健全 強壯的
unstructured simplicity: 非結構化簡化
at once: 立即 馬上 及時 當下
little coordination: 缺乏協調
delivered: 交付 傳遞發送
rejoin: 歸隊 回應
at will: 隨意 任意
vote with: 投與
acceptance: 驗證 承諾
consensus mechanism: 共識機制
Das System darf keine Geheimhaltung erfordern (德文)
既然不是仙 難免有雜念 道義放兩旁 利字擺中間
你我皆凡人 生在人世間 終日奔波苦 一刻不得閒
(你)既然不是仙 難免有雜念 道義放兩旁 (把)利字擺中間
多少男子漢 一怒為紅顏 多少同林鳥 已成(了)分飛燕
人生何其短 何必苦苦戀 愛人不見了 向誰去喊冤
The system must not require secrecy and can be stolen by the enemy without causing trouble
歲次丙申 @ 四年一次229
康熙通寶™ by Bitcoin
可爱的 Python: 用 hashcash 打击垃圾邮件