【Filecoin】Drand: The source of randomness for Filecoin

【Filecoin】Drand: The source of randomness for Filecoin

One of the security guarantees of blockchain comes from various unpredictability, such as private keys, block generation rights, challenge seeds, etc. In the original design, Filecoin used Ticket Chain to generate unpredictable but publicly verifiable random numbers. Currently, it uses Drand as a random number source instead.
Drand is an independent project, and this article briefly introduces it.

Similar to the Beacon Chain implemented by Ethereum 2.0, Filecoin currently uses Drand as its Beacon source and enables the originally designed Ticket Chain. We know that the Ticket Chain is actually a logical chain that is parasitic on the Filecoin chain. Although the Ticket Chain is well designed, it still has its unsatisfactory aspects, such as: 1) Its Ticket is available for each block, but only one is required for each height, so there is a selection problem here, but this problem is not big; in addition, 2Ticket itself is not unpredictable to everyone, because the Ticket is generated by the miner, so the block miner knows what the random number is earlier than others; further, 3) when the chain is forked and reorganized, the Ticket will change, which will invalidate many calculations that rely on the Ticket.

Therefore, Ticket Chain is not an ideal solution. The Filecoin team is good at adopting new technologies. After weighing the pros and cons, the current processing method is to completely separate the generation of random numbers from the Filecoin network and enable a public, unpredictable, non-biased, and publicly verifiable random source. This random source is Drand.

Problems to be solved by trusted random sources

In short, a good random source should have the following characteristics:

  • Unpredictable: Any individual or group at any point in time cannot predict the random number released

  • No bias: The final output distribution is completely random and cannot have any tendency

  • Publicly verifiable: After the random number is generated, anyone can verify it

  • Decentralization: Random numbers should be generated by a group of independent and active individuals

  • Availability: The system must keep running, always (according to the rhythm) continuously outputting random results

Drand: Distributed Randomness Beacon Daemon

Drand (pronounced "dee-rand") is a program that runs as distributed nodes. Written in Golang, Drand uses bilinear pairing and threshold cryptography to link servers running drand to each other to generate common, publicly verifiable, unbiased, and unpredictable random values ​​at fixed intervals. Drand nodes can also provide locally generated private randomness to clients.

drand was originally developed within the DEDIS (Decentralized Distributed Organization) organization, and in December 2019, it became an independent drand organization.

Drand's goals and applications

The demand for public verifiable random numbers is very widespread. For example, in gambling, blockchain systems, and embedded devices; similarly, it is also crucial in some statistical sampling: such as autonomous organizations, elections, jury composition, random financial audits, etc. However, building a secure source of randomness is by no means easy. In our real life, there are various failed attacks, such as cheating in welfare lotteries, favoritism in elections, etc. There are many reasons that affect the generation of randomness, such as: static keys, non-uniform distribution, output bias, etc.

Well, Drand aims to achieve that breakthrough by providing a randomness-as-a-service network (similar to an NTP server for time or a certificate authority server for CA validation), providing a continuous source of randomness.

The Drand mechanism has the following characteristics, or goals:

  • Decentralization: Drand is software run by various reputable entities on the Internet, requiring a threshold to generate randomness, with no central point of failure.

  • Publicly verifiable and unbiased: drand provides publicly verifiable and unbiased randomness on a regular basis. Any third party can obtain and verify the authenticity of the randomness and ensure that it has not been tampered with.

  • Also provides "private" local services: Drand nodes can also provide cryptographic randomness for use by local applications, such as injecting seeds for the operating system's PRNG.

Currently, the Drand Network is operated by organizations around the world including Cloudflare, EPFL, Kudelski Security, Protocol Labs, Celo, UCL, and UIUC.

If you want to learn more, you can visit the League of Entropy website, where you can also view the random values ​​generated by the network in real time.

Public random number

The main function of Drand is to generate public random numbers. This is achieved by the collaboration of Drand nodes.

The main challenge in generating good randomness is that no party involved in the randomness generation process can predict or bias the final output. In addition, the final result must be verifiable by a third party so that it can be used in various applications, such as lottery, parameter generation in sharding or security protocols, etc. In the Filecoin network, this kind of random number is used in many occasions, such as block generation rights, various stages of replication proof, time-space proof, etc.

The Drand random beacon consists of a set of distributed nodes and is divided into two phases:

  1. Setup: Each node first generates a fixed public-private key pair for long-term use. Then, all public keys are written to a group file together with some other metadata required to operate the beacon. After distributing this group file, the node executes the distributed key generation (DKG) protocol to create a public public key and a private key factor for each server. In other words, this private key is a distributed private key that is jointly owned by a group of nodes. Each participant will not explicitly see or use the entire distributed private key, but use their own private key factor to calculate the public key pair to generate public randomness. The setup process only needs to be run once.

  2. Generation: After setup, nodes switch to continuous randomness generation mode. Any node can initiate a randomness generation round by broadcasting a message, which all other participants sign with n threshold versions of the Boneh-Lynn-Shacham (BLS) signature scheme and their respective private key factors. Once any node (or third-party observer) has collected t partial signatures, it can reconstruct the full BLS signature (using Lagrange interpolation). The signatures are then hashed using SHA-512 to ensure that there is no bias in the byte representation of the final output. This hash corresponds to the collective random value and can be verified against the collective public key.

Private Randomness

Private randomness, that is, randomness that serves the local node.

Private randomness generation is a secondary feature of Drand. Clients can request private randomness from some or all Drand nodes, which extract it locally from their entropy pools and send it back in encrypted form. This can be useful for gathering randomness from different entropy sources, such as in embedded devices.

In this mode, we assume that the client has a private/public key pair and encapsulates its public key into the server's public key using the ECIES ( Elliptic Curve Integrated Encryption Scheme ) encryption scheme. Upon receiving the request, the Drand node generates 32 random bytes locally, encrypts them using the received public key, and sends them back to the client.

In some devices, since there is no good local noise source, it is difficult to guarantee randomness. In this way, good random numbers can be obtained. For example, many embedded devices or devices that are not designed with special noise sources. However, it must be noted that the initial client key pair must be issued by a trusted source (such as the device manufacturer). When the security of the key pair is affected, the reception of random numbers will be greatly reduced.

Centralization or decentralization

Looking back at the five goals of random sources mentioned at the beginning of the article, has Drand achieved them? My conclusion is that it is basically, but not an ideal solution.

Currently, the system is run by different companies, which has achieved a certain degree of decentralization, but it is not completely decentralized, and it is not a very self-contained network. This may be the reason why Drand has not been widely accepted in the blockchain world.

But theoretically speaking, as long as these nodes do not collude with each other and can ensure continuous operation and stable output of random numbers, they are relatively safe.

Dragon Boat Festival
Happy Dragon Boat Festival

<<:  Comment | The SEC’s power to recover illegal gains is limited. Can cryptocurrency startups benefit from it?

>>:  [Advanced Classroom] How many coins can a mining machine mine?

Recommend

The Australian Stock Exchange is paying close attention to blockchain

The Australian Securities Exchange (ASX) is consi...

What influence do dimples have on a person's fortune?

In real life, dimples have indeed always been a s...

Coin Zone Trends: Bitcoin Price Trends Based on Big Data This Week (2017-07-24)

The price of the currency rises and then falls ba...

What does a woman's nose look like when she brings good luck to her husband?

A nose that brings good fortune to the husband is...

Analyze personality traits and changes in luck from palm features

Analyze personality traits and changes in luck fr...

Teeth tell fortune

1. In terms of quantity. 36 beads indicate a pers...

Is the Sichuan Palm good for men? How to activate destiny

There is a saying among the people: A woman with ...

What are the facial features of women with bad luck in love?

If you have good luck in love, then you will have...

Your career fortune revealed by your face

In modern society, both men and women have their ...

What does a mole on the eyelid mean? Are women with moles on their eyelids good?

Moles sometimes appear in special places, and dif...

Seeing things with dull eyes, understanding a person's fate through his eyes

People with dull eyes are not suitable to be frie...

Is Bitcoin an efficient market? | How do good and bad news affect the market?

one Do you think the current Bitcoin market is a ...

The basic characteristics of the anti-bone phase are best not to provoke them

In physiognomy, rebelliousness is a bad facial fe...

ETC and IOTA: Who will be the overlord in the field of Internet of Things?

In November, IOTA's market value soared more ...

What kind of face can a woman have to marry into a wealthy family?

Being able to marry into a wealthy family is the ...