比特幣挖礦一定要用計算機嗎?用紙筆來計算可行嗎?

比特幣挖礦在解一條方程嗎?解方程一定要用到計算機嗎能不能用紙筆算一個解出來?

相關問題:如何筆算解碼二維碼?


Mining Bitcoin With Pencil and Paper

樓主,這裡有教程,我很看好你。解出來以後比特幣的開採就有你掌控了。掙錢了記得給我沖50元話費。

結論寫在這吧:作者做了個比喻,用手算出哈希值的難度比在全世界的沙子裡面找到特定的一粒沙子還要難,可能性還要低。

教程每天算出來手算的速度是0.67hash(不吃不喝不睡),樓主經過訓練以後速度應該有所提升,和現在主流挖礦機比起來挖礦機的速度是樓主的一百萬的三次方倍(quintillion)。

但是樓主沒問難不難,只問可不可以,所以答案是可以的。

Ken Shirriff

I decided to see how practical it would be to mine Bitcoin with pencil and paper. It turns out that the SHA-256 algorithm used for mining is pretty simple and can in fact be done by hand. Not surprisingly, the process is extremely slow compared to hardware mining and is entirely impractical. But performing the algorithm manually is a good way to understand exactly how it works.

我決定看看用鉛筆和紙來演算挖比特幣的礦是不是一件可行的事情。結果我發現挖礦所用的SHA-256演算法其實很簡單並且也可以用手算。當然了,與硬體挖礦相比這個過程是漫長的,但這不失為一中理解比特幣挖礦演算法的一種好方法。

The mining process

Bitcoin mining is a key part of the security of the Bitcoin system. The idea is that Bitcoin miners group a bunch of Bitcoin transactions into a block, then repeatedly perform a cryptographic operation called hashing zillions of times until someone finds a special extremely rare hash value. At this point, the block has been mined and becomes part of the Bitcoin block chain. The hashing task itself doesn"t accomplish anything useful in itself, but because finding a successful block is so difficult, it ensures that no individual has the resources to take over the Bitcoin system. For more details on mining, see my Bitcoin mining article.

比特幣挖礦是比特幣系統安全的保證。中心思想就是比特幣礦工們匯聚到一個礦區並且重複進行加密的哈希運算(不計其數的,zillion應該是比trillion還大的多得多的計量單位。)直到找到產生合適的哈希的字元串。到此為止,這個區塊就已經被挖到了並成為了比特幣區塊鏈上的一環。哈希運算本省並沒有任何意義。但是挖礦的難度由於是巨大的,這就保證了沒有任何一個人可以有足夠多的資源佔據整個比特幣系統。

A cryptographic hash function takes a block of input data and creates a smaller, unpredictable output. The hash function is designed so there"s no "short cut" to get the desired output—you just have to keep hashing blocks until you find one by brute force that works. For Bitcoin, the hash function is a function called SHA-256. To provide additional security, Bitcoin applies the SHA-256 function twice, a process known as double-SHA-256.

加密的哈希計算確保了解出這個運算沒有任何捷徑,只能夠不斷覺得進行運算用暴力的方法直至成功。

In Bitcoin, a successful hash is one that starts with enough zeros. [1] Just as it is rare to find a phone number or license plate ending in multiple zeros, it is rare to find a hash starting with multiple zeros. But Bitcoin is exponentially harder. Currently, a successful hash must start with approximately 17 zeros, so only one out of 1.4x1020 hashes will be successful. In other words, finding a successful hash is harder than finding a particular grain of sand out of all the grains of sand on Earth.

The following diagram shows a block in the Bitcoin blockchain along with its hash. The yellow bytes are hashed to generate the block hash. In this case, the resulting hash starts with enough zeros so mining was successful. However, the hash will almost always be unsuccessful. In that case, the miner changes the nonce value or other block contents and tries again.

Structure of a Bitcoin block

The SHA-256 hash algorithm used by Bitcoin

The SHA-256 hash algorithm takes input blocks of 512 bits (i.e. 64 bytes), combines the data cryptographically, and generates a 256-bit (32 byte) output. The SHA-256 algorithm consists of a relatively simple round repeated 64 times. The diagram below shows one round, which takes eight 4-byte inputs—A through H—then performs a few operations, and generates new values of A through H.

SHA-256 演算法把輸入為64bytes的區塊整合成加密數據併產生了32byte的輸出。SHA-256 演算法包含了相對而言簡單的64輪操作。下面的圖展示了把8個4byte的輸入從A到H,展開了一些運算以後產生了從A到H新的值。

One round of the SHA-256 algorithm showing the 8 input blocks A-H, the processing steps, and the new blocks. Diagram created by kockmeyer, CC BY-SA 3.0.

The blue boxes mix up the values in non-linear ways that are hard to analyze cryptographically. Since the algorithm uses several different functions, discovering an attack is harder. (If you could figure out a mathematical shortcut to generate successful hashes, you could take over Bitcoin mining.)

右側深藍色的格子裡面把輸入的數值用非線性的方法進行整合,這樣就很難進行分析。因為這種演算法用到了數種方法,找到一條捷徑就更難了。如果誰找出來了,他就能掌管比特幣的開採。

The Ma majority box looks at the bits of A, B, and C. For each position, if the majority of the bits are 0, it outputs 0. Otherwise it outputs 1. That is, for each position in A, B, and C, look at the number of 1 bits. If it is zero or one, output 0. If it is two or three, output 1.

Ma這個運算主要關注與A,B和C的值。如果他們主要的值是0.那輸出就是0.如果主要不是0,那輸出就是1.比如說,A,B,C上都是0或者1,那麼輸出0,如果是2或3那麼就輸出1.

The Σ0 box rotates the bits of A to form three rotated versions, and then sums them together modulo 2. In other words, if the number of 1 bits is odd, the sum is 1; otherwise, it is 0. The three values in the sum are A rotated right by 2 bits, 13 bits, and 22 bits.

Σ0轉換A的值並且相加,找出除以2的餘數。如果1bits是偶數那麼總和為偶,不然就為0.三個值加起來的總和是A向右移2bits,13bits和22bits。

The Ch "choose" box chooses output bits based on the value of input E. If a bit of E is 1, the output bit is the corresponding bit of F. If a bit of E is 0, the output bit is the corresponding bit of G. In this way, the bits of F and G are shuffled together based on the value of E.

Ch的值由E的輸入來決定。如果E的bit為1,那麼輸出為F的bit。如果E為0,那麼輸出為G的bit。這樣F 和 G 一定程度上有E決定。

The next box Σ1 rotates and sums the bits of E, similar to Σ0 except the shifts are 6, 11, and 25 bits.

Σ1與Σ0類似,只是向右移6,11,25bits.

The red boxes perform 32-bit addition, generating new values for A and E. The input Wt is based on the input data, slightly processed. (This is where the input block gets fed into the algorithm.) The input Kt is a constant defined for each round.[2]

紅格子產生了新的A和E. 輸入的Wt是由輸入的數據決定的,經過稍微的處理。輸入的Kt 是一個常數由每一輪運算定義。

As can be seen from the diagram above, only A and E are changed in a round. The other values pass through unchanged, with the old A value becoming the new B value, the old B value becoming the new C value and so forth. Although each round of SHA-256 doesn"t change the data much, after 64 rounds the input data will be completely scrambled. [3]

每一輪只有A和E產生了變化。其他的值都沒有變。舊的A變成了新的B.舊的B變成了新的C.儘管每一輪都沒有太大的變化,但是六十四輪以後輸入的值就會有翻天覆地的變化。

Manual mining

The video below shows how the SHA-256 hashing steps described above can be performed with pencil and paper. I perform the first round of hashing to mine a block. Completing this round took me 16 minutes, 45 seconds.

https://www.youtube.com/watch?time_continue=1v=y3dqhixzGVo 這裡有視頻地址,需要翻牆才能看。

To explain what"s on the paper: I"ve written each block A through H in hex on a separate row and put the binary value below. The major peration appears below C, and the shifts and Σ0 appear above row A. Likewise, the choose operation appears below G, and the shifts and Σ1 above E. In the lower right, a bunch of terms are added together, corresponding to the first three red sum boxes. In the upper right, this sum is used to generate the new A value, and in the middle right, this sum is used to generate the new E value. These steps all correspond to the diagram and discussion above.

解釋一下我在紙上做了什麼,我把從A到H分別在一行上面十六進位轉換為二進位。主要的運算寫在C下面。bits轉換和Σ0展示在A行上面。同樣的,choose運算在G下面,bits轉換和Σ1在E的上方。在右下角,相對應於三個紅格子的數值被加了上去。在右上方,總和被用於產生一個新的A值。在右中側,總和被用於產生新的E值。

I also manually performed another hash round, the last round to finish hashing the Bitcoin block. In the image below, the hash result is highlighted in yellow. The zeroes in this hash show that it is a successful hash. Note that the zeroes are at the end of the hash. The reason is that Bitcoin inconveniently reverses all the bytes generated by SHA-256. [4]

What this means for mining hardware

Each step of SHA-256 is very easy to implement in digital logic—simple Boolean operations and 32-bit addition. (If you"ve studied electronics, you can probably visualize the circuits already.) For this reaon, custom ASIC chips can implement the SHA-256 algorithm very efficiently in hardware, putting hundreds of rounds on a chip in parallel. The image below shows a mining chip that runs at 2-3 billion hashes/second; Zeptobars has more photos.

In contrast, Litecoin, Dogecoin, and similar altcoins use the scrypt hash algorithm, which is intentionally designed to be difficult to implement in hardware. It stores 1024 different hash values into memory, and then combines them in unpredictable ways to get the final result. As a result, much more circuitry and memory is required for scrypt than for SHA-256 hashes. You can see the impact by looking at mining hardware, which is thousands of times slower for scrypt (Litecoin, etc) than for SHA-256 (Bitcoin).

Conclusion

The SHA-256 algorithm is surprisingly simple, easy enough to do by hand. (The elliptic curve algorithm for signing Bitcoin transactions would be very painful to do by hand since it has lots of multiplication of 32-byte integers.) Doing one round of SHA-256 by hand took me 16 minutes, 45 seconds. At this rate, hashing a full Bitcoin block (128 rounds) [3] would take 1.49 days, for a hash rate of 0.67 hashes per day (although I would probably get faster with practice). In comparison, current Bitcoin mining hardware does several terahashes per second, about a quintillion times faster than my manual hashing. Needless to say, manual Bitcoin mining is not at all practical.[5]

SHA-256運算出奇的簡單,簡單到可以拿手算。做一輪要花我16分鐘45秒,以這個速度得到一個完整的比特幣區塊(128輪)需要1.49天(不吃不喝一直做)每天的速度是0.67 hashes.目前挖礦機的效率是我的一百萬的三次方倍數。所以說手算挖礦是不實際的。

A Reddit reader asked about my energy consumption. There"s not much physical exertion, so assuming a resting metabolic rate of 1500kcal/day, manual hashing works out to almost 10 megajoules/hash. A typical energy consumption for mining hardware is 1000 megahashes/joule. So I"m less energy efficient by a factor of 10^16, or 10 quadrillion. The next question is the energy cost. A cheap source of food energy is donuts at $0.23 for 200 kcalories. Electricity here is $0.15/kilowatt-hour, which is cheaper by a factor of 6.7 - closer than I expected. Thus my energy cost per hash is about 67 quadrillion times that of mining hardware. It"s clear I"m not going to make my fortune off manual mining, and I haven"t even included the cost of all the paper and pencils I"ll need.

有一個reddit網友問我關於能量消耗的事。其實並沒有消耗我多少的體能。假設一個人一天啥也不干他的機體消耗是1500卡路里。手動挖礦找到一個哈希值大約消耗10兆焦耳。硬體挖礦通常消耗是100兆焦耳。所以我的能耗比機器要低的多得多的多。關於補充能量的事,一個甜甜圈能提供200卡路里需要23美分(1塊5).電的價格是一千瓦時15美分(九毛八)。所以我的耗能是機器的百萬的四次方倍,很明顯靠筆算挖礦掙不了錢。而且我還沒有考慮筆和紙的消耗。


我覺得高贊答案那個老外還少算了,他就算了下SHA256,事實上還有其他麻煩...

不想看原理可以直接跳到最後一張圖開始.


比特幣挖礦,說來也容易,其實就是找到如下不等式的一個解而已:

	ext{hash}(x)<	ext{target}

其中hash就是常說的哈希函數,target則決定了難度.

哈希函數定義域為整數,值域則是某個範圍的正整數.

可以看出其實解有無數個,但是發現其中一個並不容易.

你可能要說了,我能不能分析這個函數來求它的部分反函數?

有些哈希函數可以,比如CRC校驗函數,但是一類用作加密的哈希函數不可以.

哈希加密函數,基本特點之一就是隨機,以比特幣使用的SHA256為例,畫出前100個數字的哈希值:

可以看出這個函數圖像幾乎就是 0sim 2^{256} approx 1.15792	imes 10^{77} 中的一個隨機數.

也就是說隨便說一個數,說中答案的概率只有  8.63616^{-78},宇宙原子總數才 10^{80} 左右...

Target用來調節難度.Target越小,找到一個解的難度自然就越高.

而唯一的求解方法就是窮舉.


SHA256是SHA-2的一種,SHA-2的第t個加密循環如圖所示:

圖中的深藍色方塊是事先定義好的非線性函數.

egin{aligned} operatorname {Ch} (E,F,G)=(Eland F)oplus (
eg Eland G)\ operatorname {Ma} (A,B,C)=(Aland B)oplus (Aland C)oplus (Bland C)\ Sigma _{0}(A)=(A!ggg !2)oplus (A!ggg !13)oplus (A!ggg !22)\ Sigma _{1}(E)=(E!ggg !6)oplus (E!ggg !11)oplus (E!ggg !25)\ end{aligned}

先把輸入從16進位翻譯成2進位,有256位哦.然後切片輸入這個運算器.

  • operatorname {Ch} 關注E,F,G.如果E為1,那麼輸出為F。如果E為0,那麼輸出為G.
  • operatorname {Ma} 關注A,B,C.相互進行ADN然後相加取模二餘數.
  • Sigma _{0}(A) ,取A分別右移動2Bits,13Bits和22Bits,等價於數學上的除以$2^2$ , $2^13$ , $2^22$,然後相加取模二餘數.
  • Sigma _{1}(E)Sigma _{0}(E) 類似,只是右移6,11,25 Bits.
  • 遇到紅框模 2^{32} ,也就是抹去前面192位.

ABCDEFGH一開始分別是八個初始值,$K_t$是第t個密鑰,$W_t$是本區塊產生第t個word.

原消息被切成固定長度的區塊,對每一個區塊,產生n個word,通過重複運作循環n次對ABCDEFGH這八個工作區塊循環加密.

最後一次循環所產生的八段字元串合起來即是此區塊對應到的散列字元串.

比特幣的方程(不等式)可以寫成

	ext{SHA256}(	ext{SHA256}(C+x)) < 	ext{TARGET},0<x<2^{32}

其中C是個常數,根據環境而定

C = 	ext{version} + 	ext{prev_hash} + 	ext{merkle_root} + 	ext{ntime} + 	ext{nbits}

  • version = 版本號
  • prev_hash = 前一區塊ID的位元組反轉
  • merkle_root = 本區塊中所有交易的SHA256的墨克哈希樹根的位元組反轉
  • ntime = 時間戳
  • nbits = 網路難度

Target根據之前上千個區塊的平均求解速度調整,演算法會將找到一個解的期望時間控制在10分鐘左右.

解出來還要廣播,其他終端會驗證是否正確,如果正確就會被接受,然後大家一起去算下一個區塊.

如果和別人幾乎同時算出來,那麼出現小分叉,然後繼續挖,直到其中一個比較短被遺棄.


那麼問題來了,人力能否求解這個方程?

不能...第一步就GG了...

時間戳(ntime)是從1970年1月1日0時0分0秒(格林尼治天文台時間)開始經過的秒數...

好吧 題主是最強大腦,大腦內置銫原子鐘 ,這個問題不考慮.

然後以上所有運算都是16進位運算

一個這樣的輸入(prev_hash)有64位16進位之長,然後你得取反然後根據其他條件算出 C ,然後算出 C+x ,而且你得翻譯成二進位進一步運算.

好吧 題主作為尖子生熟練掌握16進位加法和進位轉換

這麼大的整數至少要算20分鐘的樣子,列豎式大概只要一張紙,然後還不能有錯.

當然 題主作為特長生學過珠心算 ,花了1秒打了下算盤就搞定了,然後花59秒寫到紙上...

算錯...不存在的...這可是國粹......

第二,取兩次SHA256,一次是64個循環,兩次128.這個比較簡單無腦了,都是位運算就是在紙上位移不大方便.

那個老外算了16分鐘,題主單身多年手速不知高到哪裡去了,只花了4分鐘就搞定了一輪(一共有128輪).

然而還是沒有什麼卵用,題主猜的這個x不是答案,還要繼續窮舉.

  • 然而呢,上面說了平均運算時間是10分鐘.你算得比別人慢......白算!!!
  • 和別人同時幾乎同時算出來,還要看誰被更多的終端承認,否則...白算!!!

題主是在上海上大學,聆聽過人生經驗,知道一些時間的奧秘,所以題主跑的很快...

根據相對論,跑的快的話時間就會變慢...

我查了下今天的全網算力是7,844 PH/s,題主靜止狀態下算力是1/(5*60*128) H/s

題主希望他能在一天內挖出一個比特幣

一天有24*60/10=144個結算周期.根據伯努利概型:

E=n p=144	imesfrac{s}{7844P+s}=1

1 P=10^3 T=10^6 G=10^{15}

speed=5.4472	imes 10^{16} H/s

根據相對論,題主的速度達到了 1-1.516	imes10^{-29} 倍光速!!!!

終於...題主算出了一個比特幣...

但是,題主的速度實在是太快了,以至於時空畸變是如此的激烈

強大的能量,散發的輻射足以把地球轟的連原子都不剩!!!

這麼大的能量從哪裡來?

根據質量守恆,一定是題主燃燒了YY之魂才能換取如此不可思議的能量吧.


終於,地球OL伺服器卡機了...題主濫用外掛被封號...

哪天這個問題或回答沒了一定是GM回檔了...


別說,還真可以,教程附上:

很快題主就能成為億萬富翁了,加油!


似乎只有一個人能在有生之年算出來。


假定中國960W平方千米的土地里地下十米內埋藏的有價值文物為100W件(實際上遠遠不止),一人力一天能挖掘一平方米的土地十米,按照每件文物500塊和一個證書計算,挖到一個比特幣價值的文物(以最高價值3W計算)需要1315068493150年,而以人腦計算速度和目前比特幣挖掘難度計算,手工挖比特幣一個需要395824185999360年,是挖文物難度的三百倍。所以得出結論,挖比特幣不如挖土


記得費曼當年速算超牛,見誰贏誰,號稱你30秒內給出的問題他都能解決。

直到遇見一位只用了不到5秒就描述完的問題: e的π次方等於多少,精確到小數點後20位。

(上面的是我記錯了,看那本書是xx年前的事了,評論里有人說是tan(10^100))

您能回答這個問題嗎?

再來一個不那麼複雜的:

分解質因數(下面的數是我隨便按鍵盤按出來的啊)

32545613579156784123517556128997388779254532486212376158713879394152185279

請把上面這個數分解成質數的乘積。

(評論里有人無聊地分解了,祝賀這位,如果是手算的,那麼恭喜你,你找到了一個不小的質數)

如果你能手算了,祝賀你,你可以從很多銀行白拿錢了,你可以獲得所有人的淘寶用戶名密碼了(方法是偽造證書,釣魚)。現在大部分證書都是用RSA簽名的,RSA基於的原理就是認為一個大數分解質因數很難算,需要很多計算時間。當然,人家是先找兩個長質數(RSA現在認為2048位夠安全),然後計算好乘積,認為反過來從這個乘積找這兩個質數比較困難。我就不出那麼難了,就給上面這個隨便寫出來的數,我也不知道他有多少個質因子。

好像比特幣的挖礦和交易記錄也是用rsa簽名的。如果你破解了rsa,可以手握一塊錢永遠花不完(這裡的「好像」又錯了,不是rsa,是橢圓曲線)。


您好,Jeff Dean先生,我對您的中文水平表示讚美!


任何計算機演算法你都可以用紙筆去做,快慢的區別而已


理論上來說呢是可以的,知道演算法的話

比特幣的區塊ID的計算方式是 位元組反轉(SHA256(SHA256(版本號 || 位元組反轉(前一區塊ID) || 位元組反轉(本區塊中所有交易的SHA256的墨克哈希樹根) || 時間戳 || 網路難度 || 自己選的32位值)))

有用Linux的小夥伴可以用這條命令算

linnaea@s2:~&> xxd -r -p | sha256sum | cut -d" " -f1 | xxd -r -p | sha256sum | cut -d" " -f1 | fold -c2 | tac | sed ":a;N;$!ba;s/
//g"
01000000
81cd02ab7e569e8bcd9317e2fe99f2de44d49ab2b8851ba4a308000000000000
e320b6c2fffc8d750423db8b1eb942ae710e951ed797f7affc8892b0f1fc122b
c7f5d74d
f2b9441a
42a14695
00000000000000001e8d6829a8a21adc5d38d0a473b144b6765798e61f98bd1d
linnaea@s2:~&>

挖礦成功的要求就是區塊ID小於等於一個特定值,這個值由網路確定(所以你別想在網路難度里填個1d00ffff然後自己隨便算個混過去,網路上其它的客戶端看到你生成的區塊里寫的難度跟他們認可的不一樣會拒絕承認你生成的區塊)

最內層的東西一共640位,按照SHA-256的要求對消息進行填充(先填一位1,然後補0補到差64位滿512的倍數,然後按大端序填原本消息的位數)

以我開始寫的時候的區塊頂(#484784)來看,一共是兩塊內容

第一塊:

200000001c748267032b94a257f24eaff35c73f1fd8adce6434730010000000000000000xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

第二塊:

xxxxxxxxyyyyyyyy1801310b________800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000280

你需要填充的東西有三塊

  1. 那堆x,按照你區塊會包含的交易填寫,簡單起見就留一個coinbase交易,這樣x這塊就能固定下來了,你可以預算好第一塊之後SHA-256的狀態
  2. 那堆y,值是從1970年1月1日0時0分0秒(格林尼治天文台時間)開始經過的秒數(不含閏秒),自己估算下啥時候能算出來隨便填下
  3. 看到劃得空格了沒,這是你需要求的東西

至於SHA-256怎麼算,自己搜下去,寫成高中水平能看懂的公式感覺太麻煩了_(:3_|∠)_

你需要的就是把y和那堆下劃線填上,使最後的運算結果小於等於000000000000000001310b000000000000000000000000000000000000000000

如果你算到一半出新的區塊的話,你白算,需要拿新的區塊數據重新再來一遍

我要啥時候有閑心的話試試看把整個要求寫成一組方程好了(好像不現實


完全沒有驗證過的東西,我敢保證這裡SHA-256有地方寫錯了,只是拿來給題主感受下計算難度而已

而且還漏了一層SHA-256,嘛算了不改了煩死了_(:3_|∠)_

題主覺得能解的話請動筆,限時15分鐘

消息M[0...31] = [0x20000000, 0x1c748267, 0x032b94a2, 0x57f24eaf, 0xf35c73f1, 0xfd8adce6, 0x43473001, 0x00000000,
0x00000000, 0x________, 0x________, 0x________, 0x________, 0x________, 0x________, 0x________,
0x________, 0x________, 0x1801310b, 0x________, 0x80000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000280]

定義H[0...7] = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19]
定義K[0...63] = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]

| 對 0 &<= i &<= 15 M[16n + i] 定義函數w(n, i) = | | 對 16 &<= i &<= 63 ((w(n, i - 15) &>&>&> 7) ⊕ (w(n, i - 15) &>&>&> 18) ⊕ (w(n, i - 15) &>&>&> 3)) + ((w(n, i - 2) &>&>&> 17) ⊕ (w(n, i - 2) &>&>&> 19) ⊕ (w(n, i - 2) &>&>&> 10)) + w(n, i - 16) + w(n, i - 7)

定義函數v1(n, i) = f[0](n, i) + ((e(n, i) &>&>&> 6) ⊕ (e(n, i) &>&>&> 11) ⊕ (e(n, i) &>&>&> 25)) + ((e(n, i) · f(n, i)) ⊕ (?e(n, i) · g(n, i))) + K[i] + w(n, i)
定義函數v2(n, i) = ((a(n, i) &>&>&> 2) ⊕ (a(n, i) &>&>&> 13) ⊕ (a(n, i) &>&>&> 22)) + ((a(n, i) · b(n, i)) ⊕ (a(n, i) · c(n, i)) ⊕ (b(n, i) · c(n, i)))

定義一組函數f[0...7] = [
a(n, i) = v1(n, i - 1) + v2(n, i - 1), a(n, 0) = hh(n - 1, 0)
b(n, i) = a(n, i - 1), b(n, 0) = hh(n - 1, 1)
c(n, i) = b(n, i - 1), c(n, 0) = hh(n - 1, 2)
d(n, i) = c(n, i - 1), d(n, 0) = hh(n - 1, 3)
e(n, i) = d(n, i - 1) + v1(n, i - 1), e(n, 0) = hh(n - 1, 4)
f(n, i) = e(n, i - 1), f(n, 0) = hh(n - 1, 5)
g(n, i) = f(n, i - 1), g(n, 0) = hh(n - 1, 6)
h(n, i) = g(n, i - 1), h(n, 0) = hh(n - 1, 7)
]

定義函數
hh(n, k) = hh(n - 1, k) + f[k](n, 64)
hh(-1, k) = H[k]

M[9]到M[17]請算好coinbase的哈希之後填進去,M[18]自己估下解題需要的時間填進去(精確到秒,估錯的話白算),求解M[20]滿足

hh(1, 7) = 0
hh(1, 6) = 0
((hh(1, 5) · 0x000000FF) &<&< 24) + ((hh(1, 5) · 0x0000FF00) &<&< 8) + ((hh(1, 5) · 0x00FF0000) &>&> 8) + ((hh(1, 5) · 0xFF000000) &>&> 24) &<= 0x01310b00


很難,區塊鏈技術核心是多個鏈表,所以一般的計算要用算盤,如果想要加快計算速度,需要多塊算盤串列,或是增加算盤的長度,這樣可以接近64位cpu的水平。如果你珠算功力高的話,可以同時打兩塊算盤,我們知道,雙核並行的性能是遠遠高於單核的。


實際上現在專門挖比特幣的人用的一般是ASIC,Application-Specific Integrated Circuits,某種意義上說確實不是傳統的計算機——它比傳統計算機的效率高四五個數量級,但是只能運行比特幣需要的演算法。

所以你的紙筆計算速度達到計算機的水平還不夠,你需要比高端顯卡並行運算的速度快一萬倍以上,才能和專門進行這個工作的ASIC、也就是俗稱的礦機競爭。

【官方雙語】256位加密有多安全?_趣味科普人文_科技_bilibili_嗶哩嗶哩

如上,3Blue1Brown有個視頻很形象地展示了為什麼有些計算是人力所不能及的,雖然其中用於舉例的例子——暴力破解SHA256加密——並不是比特幣所需的問題,不過也是一個計算量極大的問題。給不方便看視頻的讀者簡述一下:

假設地球上有四十億人都人手擁有一台無敵超算,這台超算的運算能力相當於一千個谷歌的所有伺服器的總和;然後假設銀河系中有四十億個這樣的地球;然後假設宇宙中有四十億個這樣的銀河系;然後所有這些超算一起運算五千億年,就有四十億分之一的幾率成功破解一個SHA256加密了。


是這樣的,我要求也不高,你用紙筆幫我解個方程(要解的是 vec{r_3}left(t
ight) ):

frac{{
m d}^2 vec{r_3}left(t
ight)}{{
m d}t^2}=Gleft(frac{m_1}{left|vec{r_1}-vec{r_3}left(t
ight)
ight|^3}left(vec{r_1}-vec{r_3}left(t
ight)
ight)+frac{m_2}{left|vec{r_2}-vec{r_3}left(t
ight)
ight|^3}left(vec{r_2}-vec{r_3}left(t
ight)
ight)
ight)

限制性三體問題罷了,題主一定能解出來的,中國的又一個Fields prize即將到來,加油,我看好你!


拆開電腦機箱,想不到裡面居然有一個充電的小人在筆算!據了解,每一台計算機生產環節最關鍵的一步是抓一個數學好的小孩關進機箱里,充電後小孩可以不吃不喝持續筆算。這也是民間俗稱電腦的由來。沒有買賣就沒有殺害,讓我們一起抵制計算機。

真的是一夜爆贊


去月球一定要太空船嗎?我自己用跑的可以嗎?
我大概了解一下力學,克服引力無非就是快嘛?飛起來一定要用到航天器嗎?我自認為我的體育還是不錯的,高中大學都是班裡跑的最快的。


2020年,小明因為欠了一屁股債,被高利貸抓住,被蒙著眼睛押送到一處空氣渾濁的密室中,當眼罩被拉下來之後,發現自己被帶到了一個非法礦場,一群彪形大漢帶著腳銬手銬,滿頭大汗,地上已經有好幾個吐血的人,這時,有個黑衣人走了過來,扔給小明一張紙和一支筆,「快算,等你產出十塊比特幣就趕緊夾著屁股滾蛋吧!」(??。)


演算法是人設計的,當然可以用手算。不過難度類似從上海游到洛杉磯,甚至更大


重複複雜並且要求精度高的運算是計算機的優勢,何況現在比特幣挖礦已經慘烈到一塊很牛掰的GPU都不一定能賺錢(電費還是貴),何況用紙筆...
強行手算挖比特幣其實比較像和挖掘機比拆遷...


只有一個人能在有生之年對這個問題進行解算.

## 評論區提示, 其實有三個人可以做這個事. 一個是高斯, 一個是Jeff Dean, 另外一個在知乎上不能說.


這孩子……可以用來做顯卡……


來來來,題主我不為難你,幫我徒手解一下He原子的含時薛定諤方程吧,就是那個波函數 Psi


推薦閱讀:

區塊鏈是什麼,如何簡單易懂地介紹區塊鏈?

TAG:數學 | 比特幣 (Bitcoin) | 區塊鏈(Blockchain) |