What is Key Sharding?

What is Key Sharding?

Key sharding, or Shamir’s Secret Sharing, is a process by which a private crypto key is split into separate pieces, or shards, rendering each shard useless unless enough are assembled to reconstruct the original key. For example, if there are 5 shards and only 3 are needed for access, the holders of 3 shards can combine their efforts for access. This process is uniquely deeply rooted in cryptographic concepts, and makes way for more decentralized risk in the new economy. This secret sharing can be used in applications like clearing houses without custody or for recovery mechanisms in which nobody has the single key.

Key sharding was inspired by database sharding when it was adopted by the blockchain community. In this article, we will go in depth about how blockchain sharding and key sharding work, the reasons for sharding in the first place and its potential uses. If you are a new reader in the blockchain space, worry not. We will start from the very basics and gradually work our way up to more complex material. If you wish to learn more about some of the terms in this article (such as Proof of Work or Private Keys), feel free to check any of the other video articles and glossary definitions on the site!


The Problem with Proof of Work

The earliest blockchains, such as Bitcoin, used a revolutionary security encryption process known as Proof of Work. In this case, anonymous contributors known as miners, encrypt the network’s transactions onto blocks stacked on an immutable public ledger (the blockchain). They do this in exchange for a newly minted token that can be used in transactions over the network. What is so ingenious about this process was that it presents a seemingly brilliant way to decentralize peer-to-peer network maintenance and security, shifting these processes from corporations and technology giants into the public technology space. Through the method of consensus, in which every node (computer) on the network checks the consistency and legitimacy of the miner’s newly encrypted block before rewarding that miner for their work (hence, Proof of Work), every node on the network has a copy of the blockchain public ledger.

While Proof of Work makes network data storage and maintenance completely decentralized and secure from centralized attack efforts, it also keeps transactions slow, since the transactions must be accounted for by every node on the network. For example, at the beginning of 2018, the Bitcoin blockchain could only record 4-6 transactions per second while the Ethereum blockchain, with its more economically advance gas powered system (see “What is Ethereum Gas?”) could not break 30 transactions per second. Despite its 9 year streak of improvements and innovations, Proof of Work still does not seem fast enough to compete with other financial transaction networks that power our international financial hubs, which record millions if not billions of transactions per minute.


Sharding as a Solution

In looking for a solution, brave blockchain developers looked towards contemporary database solutions for inspiration. In the database storage industry, the process of dividing the database’s data body into linked layers or shards known as sharding has become a bit of an industry standard. By linking the layers, access to stored information is much faster, since the query travels a linked route versus traversing the entire database of information bit by bit.

In the corresponding blockchain solution, developers divide the public ledger into shards, distributed amongst the many nodes in the network, in which one who wishes to access a limited set of the ledger can do so by traversing down a selected path of nodes to find the correct node with the right set of information.

In sharded blockchains, if one wishes to assemble and examine the complete Iedger, they can do so thanks to key sharding or Shamir’s Secret Sharing. Key sharding divides the data of the blockchain and each data set’s respective access key across the nodes of the network. When someone on one node wishes to access all of the data, they must find a few other users on other nodes who have access to the other shards of data. On a sharded blockchain, only a few different keys are required for full access, such as 3 or 4 different keys when there are thousands.


Proof of Stake

So how does this all work? That is to say, if all of the nodes cannot contribute to a consensus process for security, then how does a sharded blockchain run on Proof of Work? Well, sharded blockchains do not use Proof of Work. Instead, current sharded blockchains use Proof of Stake, the process by which certain nodes will stake their coins for access to mining. That is, when a miner wishes to mine blocks, they must show proof that they hold a minimum amount of coins before being allowed to mine. The more coins the miner holds and is able to stake, the more network transactions they can mine and secure at one time.

Proof of Stake is in itself a multidimensional approach to the issues with Proof of Work. Proof of Work for one is somewhat susceptible to motivated attacks in cryptocurrency mining, while Proof of Stake makes attacks counterintuitive since the attacks would be hurting the miner’s digital assets. Proof of Stake is also a solution to the Tragedy of the Commons issue that Proof of Work poses, in which mining becomes less profitable for smaller miners on Proof of Work blockchains and the majority of mining increasingly is performed by corporations with large sums of financial capital and warehouses of hardware components such as ASICs (Application Integrated Specific Circuits).

In these ways, blockchain sharding, key sharding and Proof of Stake solutions work to solve the inherent issues of Proof of Work blockchains. To review, these are: slow transaction velocity, Tragedy of the Commons, motivated attacks and unwanted access to the entirety of the blockchain’s data. As always, we remind our readers to educate themselves as much as possible using the information provided by us and other reliable sources in the blockchain community before making substantial decisions. We do this in line with our overall mission at Ethos; to provide accessible blockchain solutions and to generate a culture of responsibility in the global blockchain space as we step forward into the age of the Digital Economy.