Skip to content

This repository contains a pure Rust-based project focused on implementing the Matter protocol (formerly CHIP) for seamless smart home connectivity. Designed specifically for embedded devices, it leverages Rust’s memory safety and performance to ensure secure, efficient communication across IoT. Development started on 03. 03. 2024.

Notifications You must be signed in to change notification settings

MihaelBercic/rust-matter

Repository files navigation

rust tests Static Badge Static Badge Static Badge

Matter protocol implementation in Rust

Simple example (preview)

let device_information = DeviceInformation {
    ip,
    mac,
    device_name: "Matter Bulb".to_string(),
    device_type: DeviceType::Light,
    vendor_id: 0xFFF1,
    product_id: 0x8000,
};

let mut device = Device::new(device_information);
device.insert(1, OnOff, cluster::on_off::OnOffCluster::new());
let receiver = matter::start(interface, device);
loop {
    let event = receiver.recv();
    match event {
        OnOff::On => led_pin.enable(),
        OnOff::Off => led_pin.disable()
        _ => log_info!("We're ignoring the rest for now")
    }
}

Progress

Not all TODOs are listed due to the nature, size and complexity of the protocol.

✅ - Fully implemented
🏗️ - Currently working on

🏗️ Interaction Protocol

Status
Attribute Read & Response
Command Invoke & Response
p256 encryption
ASN.1 Encoding
x509 Certification request
Commissioning
MDNS advertisement change after commissioning
🏗️ MDNS efficiency improvements
🏗️ Efficiency oriented rewrite

✅ Session initialisation

Status
Insecure session computation (PASE)
Secure session encryption

✅ TLV

Status
Encoding
Decoding
Compression

✅ Message Protocol

Status
Matter message builder
Protocol message builder

✅ Discovery

Status
MulticastSocket
mDNS Packet Header
mDNS Packet Label compression
mDNS Packet Records
mDNS Packet building
mDNS Service advertising

✅ Cryptographic Primitives

Status
SPAKE2+ this was time consuming
Deterministic Random Bit Generator (DRBG)
True Random Number Generator (TRNG)
Keyed hash - HMAC
SHA 256 hashing
Public Key cryptography (NIST P256)
Message signing
Message signature verification
ECDH
Certificate validation

About

This repository contains a pure Rust-based project focused on implementing the Matter protocol (formerly CHIP) for seamless smart home connectivity. Designed specifically for embedded devices, it leverages Rust’s memory safety and performance to ensure secure, efficient communication across IoT. Development started on 03. 03. 2024.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Languages