當前位置:
首頁 > 科技 > 貝爾鏈:How is the decentralization of bloc

貝爾鏈:How is the decentralization of bloc

貝爾鏈(BaerChain):How is the decentralization of blockchain technology done?

導言:

區塊鏈技術最顯著的特徵之一便是去中心化,今天的技術分析文我們就來講講去中心化究竟是如何做到的,這其中主要涉及到兩項技術:「分散式賬本」和「加密演算法」。

Preface:

One of the most striking features of blockchain technology is decentralization. Today"s technical analysis is about how decentralization is done. This involves two technologies: 「Distributed Ledgers」and "Encryption Algorithm".

1

分散式賬本

(Distributed Ledger)

分散式賬本,又稱共享賬本,是一種跨越地理範圍、在多處同步進行相同信息記錄的「去中心化資料庫系統」。區塊鏈實際上是分散式賬本的其中一種應用。

Distributed ledger, also known as shared ledger, is a "decentralized database system" that synchronizes the same information records across multiple geographic locations. The blockchain is actually one of the applications of distributed ledgers.

分散式賬本既可以記錄網路參與者之間的交易,比如數據或資產的交換,也可以複製共識,將數據共享並同步到多個網站、國家或機構。分散式賬本最大的特點就是:沒有中心管理員或集中數據存儲。網路中的每一個參與者都根據一致性原則來協商和制約賬本記錄的更新。分散式賬本中的每一條記錄,都有一個時間戳和唯一的密碼簽名,這使得賬本成為網路中所有交易的可審計歷史記錄。

為什麼需要分散式記賬呢?我們舉一個例子來理解。

Distributed ledgers can record transactions among network participants, such as the exchange of data or assets, as well as copying consensus, sharing and synchronizing data to multiple websites, countries, or institutions. The biggest feature of distributed ledgers is that there is no central administrator or centralized data storage. Each participant in the network negotiates and restricts the updating of the book records based on the principle of consistency. Each record in the distributed ledger has a time stamp and a unique cryptographic signature, which makes the ledger an auditable history of all transactions in the network.

Why do we need distributed accounting? Here is an example.

在白雲村,張三向李四借了1000塊錢,他們分別在各自的賬本上記下來。這時候,如果張三悄悄跑到李四家,偷了李四的賬本,然後反悔。李四空口無憑,恐怕很難把錢要回來。

In Baiyun Village, Zhang San borrowed 1,000 yuan from Li Si, and they wrote down their respective books. However, if Zhang San quietly stole Li Si』s account book and then repented, it would be difficult for Li Si to get the money back.

為了防止這種情況出現,大家想出了一個新的記賬規則。每次有人向別人借錢時,都在村裡的喇叭里廣播,然後每家人都幫忙記錄這次借錢記錄:張三問李四借,全村人記;小五問小蒙借,全村人記;長貴問謝大腳借,全村人記……這樣一來,不管哪兩個人有債務往來,都有全村人作證;要是誰要賴賬,必須挨家挨戶去偷全村每家人的賬本,難度太大了。

這就是分散式賬本的好處。而傳統的銀行、支付寶、騰訊雲等資料庫,黑客攻擊的時候只需攻擊一個中心化資料庫,相對來說不安全。

In order to prevent this from happening, everyone came up with a new accounting rule. Every time someone borrows money from someone else, they broadcast in the village"s trumpet, and then every family helps to record the borrowing record: Zhang San borrowed from Li Si, Xiaowu borrowed from Xiaomeng, Xiaowu borrowed from Xiaomeng... the whole village wrote it down. In this way, no matter which two people have debts, all the villagers will testify; if anyone wants to deny the account, they must go door to door to steal every family in the village, which is too difficult.

This is the benefit of distributed ledgers. Traditional banks, such as Alipay, Tencent Cloud and other databases, can be attacked simply by a centralized database, which is relatively insecure.

分散式賬本可以用於存儲、記錄和交易所有類型的資產,潛在的應用領域十分廣泛。例如,跨境電子支付是通過代理行模式,實現銀行與銀行之間的資金轉移。一般涉及多重費用,且報文通信處理和結算時間較長,成本則會轉嫁給終端用戶。分散式賬本技術的某些特性,例如跨時空共享賬本的能力,可以減少跨境支付中所依賴的中介機構的數量,從而降低成本,並提高成本結構的透明度。

Distributed ledgers can be used to store, record, and trade all types of assets, with a wide range of potential applications. For example, cross-border electronic payments are through proxy lines that enable the transfer of funds between banks and banks. Generally, multiple charges are involved, and the message communication processing and settlement time is long, and the cost is passed on to the end user. Certain features of distributed ledger technology, such as the ability to share books across time and space, can reduce the number of intermediaries that are dependent on cross-border payments, thereby reducing costs and increasing the transparency of the cost structure.

現在流行的P2P下載實際上也是分散式賬本的一種應用。也就是說,你下載的內容並不是存儲在某一個中心化的雲上,而是分別存儲在很多個人終端上,你是從很多這種終端上下載的;同時你下載好的內容也在被別人下載。這就解決了擁堵的問題,所以P2P下載的速度很快。

近幾年流行的P2P借貸,其實也是分散式賬本的一種應用。但由於掛羊頭賣狗肉、技術不成熟、缺乏監管、魚龍混雜等等原因,產生了很多負面新聞,大家需要防範。

The popular P2P download is actually an application of distributed ledger. In other words, the content you download is not stored on a centralized cloud, but stored on many personal terminals. At the same time, the content you are downloading is also being downloaded by others. This solves the problem of congestion, so P2P downloads are fast.

The popular P2P loan in recent years is actually another application of distributed ledgers. However, due to the fact that the technology is not mature, the supervision is lacking, and some other issues, a lot of negative news has occurred, leading people to guarding against it.

分散式賬本技術需要和區塊鏈的其他底層技術,比如加密演算法、共識機制等結合,才能發揮最大效能的作用。

Distributed ledger technology needs to combine with other underlying technologies of the blockchain, such as encryption algorithms and consensus mechanisms, in order to maximize the effectiveness.

2

加密演算法

(Cryptography)

加密演算法可以保證數據的隱私、安全及可溯。加密演算法可分為對稱加密演算法和非對稱加密演算法。區塊鏈技術沒有用到對稱加密,這裡就講非對稱加密。

Encryption algorithms guarantee data privacy, security and traceability. The encryption algorithm can be divided into a symmetric encryption algorithm and an asymmetric encryption algorithm. Blockchain technology does not use symmetric encryption, here is asymmetric encryption.

非對稱加密有兩個重要的概念:公鑰、私鑰。公鑰和私鑰都是一長串無規律的字元串,可以用來加密和解密。在非對稱加密演算法中,每一個私鑰必然對應一個公鑰。即,公鑰來加密的話,只能用對應的私鑰來解密;私鑰用來加密的話,只能用公鑰來解密。

Asymmetric encryption has two important concepts: public key and private key. Both public and private keys are long strings of irregular strings that can be used for encryption and decryption. In an asymmetric encryption algorithm, each private key necessarily corresponds to a public key. That is, if the public key is encrypted, it can only be decrypted with the corresponding private key; if the private key is used for encryption, it can only be decrypted with the public key.

00000048849nhfiuhwte7ny438v7rnq498ct4c89m4cj2

我們可以通過一個例子來理解。We can understand by an example.

如上圖:貝勒爺(我們假定故事主人公是貝勒爺)想給女朋友發一條消息:我喜歡你。但是他不想這個情書的內容被人看到。於是,貝勒爺用女朋友發給他的公鑰0(公鑰是可以發給別人用來加密和解密的)給【我喜歡你】這四個字加密。加密之後,這四個字就變成一串無規律的亂碼【亂碼0】,別人不知道裡面的內容。但是,貝勒爺的女朋友可以用自己與【公鑰0】對應的【私鑰0】來解密,就能看到裡面的內容了。

As shown above: Baylor wants to send a message to his girlfriend: I like you. But he does not want the content of this love letter to be seen. So, Baylor uses the public key 0 sent by his girlfriend (the public key can be sent to others for encryption and decryption) to encrypt the three words [I like you]. After encryption, these words become a series of irregular garbled characters [garbled 0], others do not know the contents. However, Baylor"s girlfriend can use the [Private Key 0] corresponding to [Public Key 0] to decrypt it eventually see the contents inside.

但是這裡還有一個問題。他女朋友不能百分百肯定,這條信息是貝勒爺發給她的。因為誰都可以發【我喜歡你】這幾個字。

But there is still a problem here. His girlfriend can"t be 100% sure, this message was sent to her by Baylor. Because anyone can send the words [I like you].

解決方案如下圖所示。The solution is shown below.

貝勒爺先用女朋友的【公鑰B】給【我喜歡你】四個字加密,變成【亂碼1】,然後用自己的【私鑰A】給【亂碼1】加密,就變成【亂碼2】,發給他女朋友。他女朋友收到後,就用貝勒爺發給她的【公鑰A】解密【亂碼2】,得到【亂碼1】;然後,他女朋友再用自己的【私鑰B】解密【亂碼1】,就可以看到【我喜歡你】四個字了。

Baylor firstly uses the girlfriend"s [public key B] to encrypt[I like you], which becomes [garbled 1], and then use his own [private key A] to encrypt [garbled 1], which becomes [ Garbled 2], sent to his girlfriend. After his girlfriend receives it, she uses [Public Key A] sent by Baylor to decrypt [garbled 2] and gets [garbled 1], then uses her [Private Key B] to decrypt [garbled 1] , finally she can see the words [I like you].

在上面的過程中,因為他女朋友要用到貝勒爺發給她的【公鑰A】,如果解密成功,就表明是貝勒爺用的只有他自己持有的【私鑰A】給信息加的密,那麼,就能證明這條信息是貝勒爺發給她的。貝勒爺用【私鑰A】加密【亂碼1】的過程,就是我們常說的「數字簽名」。如果他女朋友用貝勒爺發給她的【公鑰A】打不開信息,就表明這條信息不是貝勒爺發給她的,她就能斷定,是有別人想冒充貝勒爺。同時,雙重加密的過程保證了信息不被泄露露。

In the above process, if the decryption is successful, it means that it is Baylor who encrypted the message by his own [Private Key A] and this message was sent to her by Baylor, because his girlfriend had to use [Public Key A] sent by Baylor . Baylor"s process of encrypting [garbled code 1] with [Private Key A] is what we often call "digital signature." If his girlfriend can"t open the message with [Public Key A] by Baylor, it means that this message was not sent to her by Baylor. She can conclude that someone wants to pretend to be Baylor. At the same time, the process of double encryption ensures that information is not leaked.

以上整個流程就是區塊鏈技術中,對交易信息的加密解密過程。

The whole process above is the encryption and decryption process of transaction information in the blockchain technology.

3

以上幾種技術的結合,就實現了區塊鏈技術的去中心化:分散式賬本確保信息不被單方面篡改;共識機制解決記賬權的問題,同時保證數據難以被篡改;加密演算法既能保證信息的隱私,又能保證信息的安全;智能合約保證約定動作自動執行。

The combination of the above technologies realizes the decentralization of the blockchain technology: the distributed ledger ensures that the information is not unilaterally falsified; the consensus mechanism solves the problem of the accounting rights, and at the same time ensures that the data is difficult to be tampered with; the encryption algorithm guarantees the privacy of the information and ensures the security of the information; the smart contract guarantees that the action is automatically executed.


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 天極數碼 的精彩文章:

每滿300減30,名龍堂雙12提前購勁爆來襲
「全民空凈節」 AO史密斯甲醛凈化器新品再獲行業殊榮

TAG:天極數碼 |