The Hitchhiker’s Guide to KERI. Part 1: Why should you adopt KERI?
TLDR: The KERI protocol does not have a distributed consensus mechanism and is not subject to the blockchain trilemma. KERI is designed to be scalable, secure, and decentralized — all three at the highest level.
This blog is the first part of a three-part series, the Hitchhiker’s Guide to KERI:
- Part 1: Why should you adopt KERI?
- Part 2: What exactly is KERI?
- Part 3: How do you use KERI?
In recent years, the Key Event Receipt Infrastructure (KERI) has emerged as one of the most promising technologies within the Self-Sovereign Identity (SSI) ecosystem. With the rise of the verifiable Legal Entity Identifier (vLEI) ecosystem, KERI has garnered considerable interest within the community. Despite its potential, KERI often finds itself shrouded in misunderstanding, often being criticized for its perceived complexity. Thus, this blog aims to provide an introduction guide to KERI, demystifying its intricacies and advocating for its widespread adoption.
KERI Why/What/How
Since its invention in 2019, KERI has been one of the most misunderstood technologies and concepts in the SSI space, given its technical complexity and seemingly steep learning curve. As an attempt to demystify KERI, here, this three-part series will answer three simple Why, What, and How questions, as follows:
Part 1 starts with the Why question. The following sections outline the evolution of digital identity systems from a centralized to a decentralized model. We will delve into the reason why blockchain is not a necessary component for building a decentralized identity system and put forth an argument as to why a KERI-based model is a better alternative and is potentially a candidate for the next generation of digital identity systems.
Centralized Digital Identity
Digital identity is defined as the information utilized by computers to represent external entities, including a person, organization, application, or device. Hence, digital identity has been around since the early days of the Internet when a computer system needed to know with whom or things it interacted.
Dated back to the 1960s and 1970s, the earliest form of digital identity was the use of usernames and passwords that allow multiple users to access shared computer resources and online services. These systems independently and centrally manage their interactions, resulting in a model known as Centralized Digital Identity. Nowadays, centralized digital identity has evolved into Federated Digital Identity in the 2000s where digital identities used by multiple computer systems are federated to a single trusted centralized entity, called an Identity Provider (IdP). Despite their prevalence, there are two major concerns with the centralized identity model:
- Single Point of Failure: A centralized identity system relies on a single centralized entity. If the central entity is compromised, all associated systems and services also become vulnerable.
- Privacy Concern: IdPs with large user bases, like Google and Facebook, can collect a vast amount of user data, tracking all aspects of the users’ digital lives. These IdP platforms may monetize these data as well as abuse it, e.g., influencing the geopolitical opinions of the public.
Blockchain-based Decentralized Digital Identity
Decentralized Digital Identity—also known as Self-Sovereign Identity (SSI)—promises to give “control” back to the users from the centralized platforms—enhancing trust while preserving individual privacy. Seminal works that lay the foundation include The Laws of Identity (2005) by Kim Cameron and The Path to Self-Sovereign Identity (2016) by Christopher Allen.
Note: The terms “Decentralized Digital Identity” and “SSI” are often used interchangeably. However, SSI is more commonly used to describe the principles and community while Decentralized Digital Identity is more commonly used to describe the technology based on the principles of this movement.
By 2015, the rise of blockchain technology started to capture the attention of the digital identity community, and several sessions on “blockchain identity” were hosted during the Spring 2015 Internet Identity Workshop (IIW). A seminal paper on “Decentralized Public Key Infrastructure (DPKI)” by C. Allen, et al. was also published in the same year.
“The goal of DPKI is to ensure that, unlike PKIX, no single third party can compromise the integrity and security of the system as a whole. Trust is decentralized through the use of technologies that make it possible for geographically and politically disparate entities to reach consensus on the state of a shared database.” — Decentralized Public Key Infrastructure, C. Allen, et al., Rebooting the Web of Trust I (2015).
Note: PKIX stands for Public Key Infrastructure that is based on X.509 certificates.
Note: Here, we specifically refer to the term “blockchain” as a “distributed-consensus ledger with a global ordering of records”. This is because the term “blockchain” is sometimes used to refer to a hash-chained verifiable data structure.
The development of blockchain-based digital identity kickstarted the SSI revolution and resulted in multiple communities of practitioners including the Decentralized Identity Foundation in 2017 and the Trust Over IP Foundation in 2020 as well as multiple standards including Verifiable Credentials and Decentralized Identifiers.
Over the years, the popularity of blockchain has made the term “decentralization” synonymous with the term “blockchain” to the public. Unfortunately, this gave a false impression to many people that any decentralized system requires the use of blockchain technology. For example, the Internet Protocol (IP)—which was invented in the 1970s and predates the invention of blockchain—is also decentralized since there is no single entity controlling the global Internet network.
Blockchain indeed possesses multiple properties that make it suitable for decentralized digital identity systems, including security, availability, programmability, transparency, etc. However, blockchain is not a silver bullet without any drawbacks and is simply one implementation of decentralized systems among many. For example, one of the most common drawbacks of blockchain is its scalability due to the unsolvable problem known as the blockchain trilemma.
While you can certainly build a decentralized identity system using blockchain, it turns out you don’t have to. The following sections give a detailed reason for why this is the case.
Double Spending Proof
In 2008, Satoshi Nakamoto published the Bitcoin whitepaper. At its core, Bitcoin solves the double-spending problem in a decentralized manner using a distributed consensus mechanism called Proof-of-Work (PoW). Later iterations of blockchain technology proposed other consensus mechanisms such as Poof-of-Stake (PoS) and Proof-of-Authority (PoA).
Note: The double-spending problem is a problem in a cryptocurrency system where the same single digital token can be spent more than once.
In essence, blockchains address the double-spending problem by establishing a network of validators, which are distributed geographically and are not controlled by a single entity. These validators collectively maintain a shared ledger with a total ordering of transactional records. Updates to this shared ledger occur through a consensus mechanism agreed upon by the validators.
Note: In distributed systems, a “total order” refers to a consistent and agreed-upon sequence or ranking of all events or transactions in a system. In a total order, every pair of events can be compared, and it is clear which one occurred before the other.
While double-spending is a fundamental problem in a cryptocurrency system, it does not generally apply to an identity system. In a cryptocurrency system, if Alice transfers the same amount of money to Bob twice, Alice is twice as poor, and Bob is twice as rich. On the other hand, if Alice performs identical authorization operations on Bob repeatedly, their internal states may be affected by only the first operation and remain unaffected by all subsequent operations.
Note: This is the property called idempotence. It is defined as follows: “An operation is idempotent if it can be applied multiple times without changing the result beyond the initial application.”
Cryptocurrency operations are not idempotent and require double-spending proof property. On the other hand, most operations in identity systems are idempotent. This can be summarized below:
“An identity system does not need to provide double-spending proof of an account balance. It merely needs to provide consistency.”
Bypassing the blockchain trilemma
The blockchain trilemma is a well-known fundamental problem in blockchain technology, which is widely believed to be unsolvable. It highlights an inherent trade-off among decentralization, security, and scalability in blockchain systems. Implementations of blockchain—including blockchain-based identity systems—cannot simultaneously achieve high levels of all three components. Any attempt to improve one aspect always comes at the expense of the others.
A good example is Bitcoin itself, which is extremely secure and decentralized while having poor scalability. Another good example is the Terra blockchain which was designed to be highly scalable at the cost of security, leading to its collapse in 2022.
The root cause of the blockchain trilemma is the fact that a blockchain network fundamentally consists of validators that must come to a consensus to make an update to a shared totally ordered ledger. Such a consensus mechanism is an essential component in a cryptocurrency system where double-spending proof is a critical property.
As outlined in the previous section, as a double-spending proof is not a necessary property for an identity system, a consensus mechanism is thus not a required component. Hence, the blockchain trilemma can be entirely bypassed—not solved—for a decentralized identity system by giving up the double-spending-proof property.
As it turns out, a means for building such a decentralized identity system already exists, and it is known as KERI.
KERI-based Decentralized Digital Identity
In a nutshell, Key Event Receipt Infrastructure (KERI) is a decentralized protocol for the management of persistent self-certifying identifiers.
While blockchain was initially invented for the construction of a cryptocurrency system, the KERI protocol was specifically designed for building a decentralized digital identity system.
While, we will discuss in detail what KERI exactly is in the next part of this series, here are a few reasons why you should adopt KERI.
KERI is a more scalable alternative to blockchain
One of the most common problems with blockchain-based identity systems is their scalability. For example, Hyperledger Indy—one of the most popular blockchain protocols for decentralized identity—takes around 4 hours to issue 18,000 credentials, as discussed in detail by Kaliya Young in her blog “Being “Real” about Hyperledger Indy & Aries / Anoncreds”.
In short, blockchain is slow, and one can only make it faster by reducing security and/or decentralization due to the blockchain trilemma. This is not at all the case for KERI:
The KERI protocol does not have a distributed consensus mechanism and is not subject to the blockchain trilemma. KERI is designed to be scalable, secure, and decentralized — all three at the highest level.
Since security and decentralization are often not a concern for most implementations of blockchain-based identity systems, the most important reason for adopting KERI is as follows:
KERI is a more scalable alternative to blockchain for building decentralized identity systems.
Other reasons to adopt KERI
- KERI may leverage blockchain for discovery and verification. KERI’s ledger, called a key event log (KEL), may be embedded in an arbitrary blockchain network. As a result, KERI may leverage all the advantages of using blockchain — including availability, transparency, and programmability.
- KERI is portable across blockchains. KERI does not ultimately rely on blockchain. Once a KERI-based identity system utilizes a blockchain network, it may switch to another blockchain network. This solves the ledger lock-in problem where a decentralized identifier is locked to a specific blockchain network.
- KERI is recoverable from a quantum attack. If a quantum suddenly becomes available and is used to attack a KERI-based identity system, the KERI protocol has the means to recover control from the attacker via a mechanism called pre-rotation.
- KERI supports the right to be forgotten. Transactions in blockchain are recorded in a shared totally ordered ledger, which makes it impossible to delete a transaction that contains personally identifiable information (PII). This is not a problem for KERI since KERI’s transactions—i.e., key events— are not shared in a single totally-ordered ledger.