區塊鏈基礎(一)

來源:互聯網
上載者:User

Lecture 1.1 1.2
作者: bao_zijian@163.com Cryptographic Hash Functions 性質: 1.collision free      nobody can find x and y sun that x!=y and H(x)=H(y) 應用:if H(x)=H(y) then x=y.這裡H(x)和H(y)只有236bits,所以很節約空間。 2.Hiding      given H(x),it is infeasible to find x. 3.謎題友好(比特幣需要的性質) 如果對於任意n位輸出值y,假定k選自高階最小熵分布,如果無法找到一個可行的方法,在比2的n次方小很多的時間內找到x,保證H(k||x)=y 成立,那麼我們稱雜湊函數H為謎題友好。
Lecture 1.3 作者: bao_zijian@163.com Hash pointers and authenticated data structures
key idea: 1. Take any pointer-based data structure 2. Replace pointers with cryptographic hashes

Modifications to any block will propagate forever
Merkle tree: binary tree with hash pointers




Lecutre 1.4 作者: bao_zijian@163.com Digital Signatures
1.( sk, pk) := genKey(keysize) sk: secret signing key pk: public verification key 2.sig := sign( sk, message) 3.isValid := verify( pk, message, sig) 其中 1.2.can be randomized algorithms,我理解的是1這個產生密鑰是一個隨機的演算法,sign也是一個隨機演算法。
要求 1.correctness sk, pk = genKey(keysize)→verify(pk, message, sign(sk, message)) == true 2.unforgeability (EUF-CMA security) adversary given pk may adaptively query oracle for sign(mi) cannot output a valid signature pair (σ, m’) for any new message m’



Lecture 1.5 作者: bao_zijian@163.com
public key is an identity  Anybody can get an identity with genKey                Collisions statistically negligible  To “speak” as pk, sign using sk  Keys are pseudonyms 這裡有一篇比較好的部落格介紹: http://blog.csdn.net/qishuo_java/article/details/48137989

1. 首先使用隨機數發生器產生一個『私密金鑰』。一般來說這是一個256bits的數,擁有了這串數字就可以對相應『錢包地址』中的比特幣進行操作,所以必須被安全地儲存起來。
2. 『私密金鑰』經過SECP256K1 演算法處理產生了『公開金鑰』。SECP256K1是一種橢圓曲線演算法,通過一個已知『私密金鑰』時可以算得『公開金鑰』,而『公開金鑰』已知時卻無法反向計算出『私密金鑰』。這是保障比特幣安全的演算法基礎。
3. 同SHA256一樣,RIPEMD160也是一種Hash演算法,由『公開金鑰』可以計算得到『公開金鑰雜湊』,而反過來是行不通的。
4. 將一個位元組的地址版本號碼串連到『公開金鑰雜湊』頭部(對於比特幣網路的pubkey地址,這一位元組為“0”),然後對其進行兩次SHA256運算,將結果的前4位元組作為『公開金鑰雜湊』的校正值,串連在其尾部。
5. 將上一步結果使用BASE58進行編碼(比特幣定製版本),就得到了『錢包地址』。 比如, 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa






聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.