6. h0 := 0x6a09e667
h1 := 0xbb67ae85
h2 := 0x3c6ef372
h3 := 0xa54ff53a
h4 := 0x510e527f
h5 := 0x9b05688c
h6 := 0x1f83d9ab
h7 := 0x5be0cd19
s0 := (a rightrotate 2) xor (a rightrotate 13) xor(a rightrotate 22)
s1 := (e rightrotate 6) xor (e rightrotate 11) xor(e rightrotate 25)
maj:= (a and b) xor (a and c) xor(b and c)
ch := (e and f) xor ((not e) and g)
t1 := h + s1 + ch + k[i] + w[i]
t2 := s0 + maj
Initialize variables
h:= g
g:= f
f:= e
e:= d + t1
d:= c
c:= b
b:= a
a:= t1 + t2
h0:= h0 + a
h1:= h1 + b
h2:= h2 + c
h3:= h3 + d
h4:= h4 + e
h5:= h5 + f
h6:= h6 + g
h7:= h7 + h
t1
t2
SHA
38. Ethereum address Random
PrivateKey (256bit)
SECP256k1
PublicKey (512bit)
sha3.keccak_256()
sha3.keccak(256bit)
頭:0x+sha末40位(hex)
ETH address(160bit)
One
Two
Three
Four
./ethereum-wallet-generator.py
Private key:
eff415edb6331f4f67bdb7f1ecc639da9bcc0550b100bb275c7b5
b21ce3a7804
Public key:
d6dd5241c03bf418b333c256057ee878c34975d6abda075d58e
4b9780f4a8659fcc096b6ad763d8e5914f7daa0b7351398b1eb6
458e95ac41a2711a0651f3fc6
Address: 0x4206f95fc533483fae4687b86c1d0a0088e3cd48
41. 參考文獻
• Vasek, Marie, et al. "The Bitcoin brain drain: a short paper on the use and abuse of bitcoin brain wallets."
Financial Cryptography and Data Security, Lecture Notes in Computer Science. Springer (2016).
• Gilbert, Henri, and Helena Handschuh. "Security analysis of SHA-256 and sisters." International workshop
on selected areas in cryptography. Springer, Berlin, Heidelberg, 2003.
• Chen, Po-Wei, Bo-Sian Jiang, and Chia-Hui Wang. "Blockchain-based payment collection supervision
system using pervasive Bitcoin digital wallet." 2017 IEEE 13th International Conference on Wireless and
Mobile Computing, Networking and Communications (WiMob). IEEE, 2017.
• 江柏憲、陳伯韋、王家輝、何建明,”匿名加密貨幣與實名商家交易的有效行動支付監督平臺之建置與實作-以比特
幣為例,” TANET2017 臺灣網際網路研討會, Oct. 25-27, 2017
• http://programmermagazine.github.io/201401/htm/message2.html