Introduction to Cryto & Crptocurrencies Lecture 1 Part I

Posted xuesu

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Introduction to Cryto & Crptocurrencies Lecture 1 Part I相关的知识,希望对你有一定的参考价值。

Lecture 1.2 Hash Pointer & Data Structure

Use Case 1. 什么是Block Chain呢?

想象一个像链表一样的结构,只不过与通常的指向下一块地址的指针不同的是,这里用的是Hash指针。

如图:

技术图片

如果黑客篡改了block 0,那么他也必须篡改Block 1的H1,Block 2的H2等,会给他带来一定困难。

 

Use Case 2: Merkle Tree

Block Chain固然具有防止篡改的能力,但是每次验证某条记录没被篡改,就需要O(n)的时间来一一核对。比如看第i个block有没有被篡改,就要去查block i + 1, block i + 2...

Merkle Tree则使用Hash Pointer + 二叉树结合,将核对验证的代价降到了O(logn)。

具体格式见下图。

现在如果要验证L3没被篡改,那么就只要看Hash 1-0,Hash 1, Top Hash没算错就行了。

所以,如果一个客户端只用到L3,那么它只需要获取用于计算的Hash 1-1, Hash 0,用于对比的Hash 1-0, Hash 1和Top Hash这几个值,而不需要存储整个交易历史。

 

技术图片

 Lecture 1.4

Decentralized Identity Management 去中心化身份管理

用公钥作为身份,方便随时生成和丢弃。用私钥来发消息。

 

Lecture 1.5 A Simple Cryptocurrency

 

以上是关于Introduction to Cryto & Crptocurrencies Lecture 1 Part I的主要内容,如果未能解决你的问题,请参考以下文章

将 cryto.generateKeyPair 与 jsonwebtoken 一起使用

Introduction to Unity UI

Gilbert Strang 《Introduction to Linear Algebra》 chap1 Introduction to Vectors 笔记

MATH10282 Introduction to Statistics

ITI 1121. Introduction to Compute

Introduction to Paging