A distributed ledger is a type of database that’s shared, copied, and synchronized within a decentralized network. The general principal is similar to the blockchain technology used by cryptocurrencies like Bitcoin. The distributed compliance ledger (DCL) developed by the Connectivity Standards Alliance (CSA), developers of Matter, is a type of distributed ledger used during the Matter installation and update processes to share and access safety- and security-relevant information.
This FAQ begins with an overview of blockchain technology, looks at how the CSA implements distributed ledgers, reviews the five databases that make up the CSA distributed compliance ledger, and closes by presenting the difference between the CSA’s DCL and the Matter-specific DCLs supported by individual CSA members.
Blockchain technology was developed to support secure digital interactions and provides the basis for cryptocurrencies (also called cyber currencies). It provides a tamper-resistant and collaborative ledger for transactional records. It’s called a blockchain since the data for the transactional records is grouped into blocks. A given block is connected to the previous block. The connection relies on a unique identifier (hash) based on the previous block’s data. If the data in one block changes, its hash changes. Any change causes a domino effect seen in all subsequent blocks and provides evidence of tampering. That structure of interdependencies makes a blockchain network very difficult to alter or destroy and supports collaborative and resilient recordkeeping. The block header includes (Figure 1):
- Previous Block Hash – Refers to the hash of the previous (parent) block in the chain.
- Timestamp – The creation time of this block (seconds from Unix Epoch)
- Nonce – A counter used for the proof-of-work algorithm, especially for ‘mining’ operations
Blockchains are relatively basic data structures that can be stored as a simple database or flat file. For example, Bitcoin stores its blockchain data using Google’s LevelDB database. The backward links and hash data are the key differentiators of blockchains. The hash identifiers for the individual block are generated using the SHA256 cryptographic hash algorithm on the block’s header. Each block includes the hash of the previous block (its “parent”) inside its header. The series of hashes linking each “child” block to its parent creates the blockchain that goes back to the original block, called the “genesis” block.
The previous block hash field is inside the block header and contributes to the current block’s hash. A child’s identity (hash) changes if the parent’s identity changes. Suppose a parent block is modified in any way; its hash changes. The parent’s new hash causes a change in the previous block hash pointer of the child and causes the child’s hash to change. That causes a change in the block hash pointer of the grandchild, changing the grandchild’s hash. A change to any hash forces a recalculation in all subsequent blocks. The blockchains used in cryptocurrency are very long, and any recalculation would demand a huge amount of computational effort making the blockchain essentially immutable and a key source of the security of cryptocurrencies. The use of distributed ledgers is another distinguishing characteristic of the blockchains used for cryptocurrencies.
Distributed ledgers
As the name implies, a distributed ledger relies on a decentralized structure. It’s a type of database shared, synchronized, and replicated in a decentralized network of users. It’s used to record transactions like exchanges of data or assets among network members. While blockchain networks for cryptocurrencies are very long with large numbers of entries (blocks), a distributed ledger can also be used for much smaller networks of entries.
A key element in a distributed ledger is that network members govern by consensus on any updates to ledger entries. Like the blocks in a blockchain, every record in a distributed ledger has a unique time stamp and a unique cryptographic hash (also called its signature’). The ledger provides an unchangeable and auditable history of all transactions without the need for central control.
Matter’s distributed compliance ledger
Matter’s distributed compliance ledger (DCL) is like a distributed ledger as described above, but in this case, it’s administrated and controlled by a centralized authority, the CSA. Matter’s DCL is designed to enable the Matter installation process for new devices on a network to access security and safety-related information and ensure network integrity.
Matter’s DCL is a network of independent servers operated by the CSA and its partners (Figure 2). Each DCL server includes a complete copy of the database. The original data is managed and controlled by the CSA. The DCL is implemented by connecting all the servers using a cryptographically secured protocol. The DCL makes it difficult to manipulate the data in the database and increases the security of Mater devices and networks.
Matter’s DCL contains extensive information about each device, including:
- Supplier information, including the company name, product brand, and internet address
- Device information, including its identification or serial number and whether it has passed tests for conformity
- A list of root certificates from product attestation authorities (PPA) from the certification process and the current version of the device’s software
The last bullet is important: manufacturers can use the DCL to update device firmware. When an update is available, the DCL is modified to provide a link to the manufacturer’s server, where new software can be downloaded, either automatically or manually, as appropriate.
The manufacturer writes the data to the database to add a new product to the DCL. It’s not ‘active’ until approved by the CSA. Once the device has passed certification and the CSA has received the confirmation from the PPA, the CSA adds “certified” to the status list letting all members of the Matter ecosystem know that this is an approved device and ready to be added to Matter networks.
Database access is restricted. Device makers can only add data for their own products that are linked to their vendor identification (VendorID) number. Software updates must also be linked to the VendorID, or they will be rejected. Official CSA PPA bodies or the CSA can confirm or revoke device compliance data. Every Matter user is granted read-only access to the DCL. The DCL is structured as a series of five databases called schemas:
- Vendor schema includes general information like the company’s legal name, primary brand name associated with the VendorID, the home page for the vendor website, and so on.
- Device Model schema has general information like ProductName, Product ID, PartNumber, Commissioning information, and so on, which is common across all software versions of the product.
- Device Software Version Model scheme includes detailed software version-specific information, like the Release Notes URL, Firmware Digests, OTA Software Image URL, and so on. The DCL only includes the URL; manufacturers must store the OTA images on their own server.
- Compliance Test Result schema includes the device’s compliance and test result data.
- PAA Schema is a list of approved Device Attestation Certificates (DACs) from the PAAs.
Participants in the Matter ecosystems consult the DCL for:
- Confirming device certification compliance status
- Verifying DAC status, including tracing back to the PAA
- Obtaining commissioning instructions, links to manuals, and product information
- Checking OTA software status and the available upgrade of the device to the latest firmware
Manufacturers are not required to have DCL servers. If they elect to have one, it must meet all CSA requirements, including only communicating using the approved cryptographically secure protocol. CSA provides DCL server setup services that allow public access to DCL information using a DCL client. It also provides CSA members with write access to add Matter device information to the DCL. A manufacturer’s DCL is different. The basic configuration allows access only to the manufacturer’s customers. However, a manufacturer can grant access to its DCL server to non-customers (Figure 3).
Summary
Matter’s DCL is based on principles underlying the blockchains used for cryptocurrencies. It’s a specialized form of distributed ledger designed to support the Matter installation process for new devices on a network by providing access to security and safety-related information and ensuring network integrity. It also supports OTA firmware updates for connected devices. The CSA maintains the primary DCL servers, and manufacturers can also maintain dedicated versions of the DCL on their own servers.
References
Benefits of matter #4 – Security and privacy, matter-smarthome
Blockchain, National Institute of Standards and Technology
Blockchain basics: Introduction to distributed ledgers, IBM
Connectivity Standards Alliance Distributed Compliance Ledger and the IoT, Connectivity Standards Alliance
The Blockchain, O’Reilly
When Distributed Ledger Technology meets Internet of Things – Benefits and Challenges, Institute of Computer Science Foundation for Research & Technology – Hellas