Matter

DevLETi·2024년 1월 21일

Matter 개념

IoT

  • Internet of Things
  • 무선 통신을 통해 사물들을 연결하는 기술

Matter

  • open-source, application-layer, connectivity standard
  • Development Goals
    • Unifying(통합): 시장 테스트된 기존 기술들을 기반으로 build
    • Interoperable(상호 운용성): matter의 specification → User 권한 기반으로 Matter-certified device간 소통
    • Secure(안전): specification은 현대 보안 관례 & 프로토콜을 사용
    • User Control(유저 컨트롤): end user가 device간 상호작용 권한을 부여
    • Federated(연합): No single entity serves as a throttle or a single point of failure for root of trust. (?)
    • Robust(견고): protocol set이 device의 완전한 lifecycle을 특정지음 - 일련의 프로토콜은 완벽한 즉시 사용 가능한 환경에서부터 운영 프로토콜을 통해 변경 시 적절한 기능을 수행하는 데 필요한 장치 및 시스템 관리 사양에 이르기까지 장치의 전체 라이프사이클을 지정합니다.
    • Low Overhead: MCU와 같은 low compute-resource device에 실제로 구현 가능하다
    • Pervasive(실현 가능한): 이 프로토콜은 IP를 통해 광범위하게 배포되고 접근 가능함 - 낮은 성능 device(low-capability devices)에도 구현 가능
    • Easy to use: 쉽게 구현 가능한 경험 제공
    • Open: 이 project의 design은 public에 open되어 있음
  • Architecture Overview

Matter_Architecture_Overview

  • 와이파이
  • Thread: Wi-Fi 기반의 mesh 저전력 네트워크 프로토콜
  • IEEE 802.15.4: 근거리 무선 네트워크를 위한 단순 데이터 패킷 표준

Matter - Data Model

Device → Node → Endpoint → Cluster → Attribute/Command/Event
스마트폰/기기 → Google Home app → 전구 → 기본 정보/OnOff 등등 → Attribute/Command/Event

Device, Node, Endpoint

  • 스마트폰, 홈 어시스턴스
  • Node로 구성됨
    • Node는 unique하게 구별되고 자체 주소를 가진 네트워크에 있는 리소스
    • 유저가 기능을 전체적으로 인식할 수 있다
    • Matter의 네트워크는 Node로 시작해서 Node로 끝난다
    • Node는 Endpoints들로 구성됨
      • 각각의 Endpoints들은 기능 묶음을 가지고 있음
      • 한 Endpoint는 조명과 관련된 기능을 가질 수 있고, 모션감지 또는 OTA 유틸리티와 관련된 기능을 가질 수 있다.
        Matter_Data_Model
    • Node는 full product를 encapsulate
      • 구별되는 기능들
    • Endpoint는 one functionality를 encapsulate

Cluster

  • Endpoint안에는 하나 이상의 cluster가 있다
  • cluster는 특정한 기능을 그룹핑함
    • ex) smart plug on/off, 조명의 조도 조절

Cluster의 타입

  • Server or Client Cluster
  • Server Cluster
    • Stateful
    • attribute, event, command를 보유
  • Client Cluster
    • Stateless
    • interaction을 수행
    • 속성을 Read/Write

Attribute

  • 노드의 state를 나타냄
  • ex) level control cluster에서는 level을 나타냄
  • Attribute는 다양한 data type을 가짐
    • uint8, string, array 등등
      Attribute

Command

  • Command는 수행될 수 있는 하나의 action
  • Attribute와는 별개
  • Matter의 데이터 모델링의 remote procedure call과 동일
  • 동사 언어와 유사
    • lock door on door lock (도어락을 잠가라)
  • Response와 Results를 가짐
  • Response가 또 하나의 Command로 정의될 수 있으며, 이때 명령 방향은 반대방향(?)

Event

  • state 변화에 대한 기록
  • Attribute는 현재의 state를 나타낸다면 Event는 과거 기록이 남아있음
    Event

Device Type

제조사가 새로운 디바이스를 만들 때 어떤 클러스터 조합을 포함해야 하는가?
Device Type이라는 것을 상속 받거나 구현해야 한다.

  • Device Type: 필수 클러스터와 optional 클러스터의 집합체
  • cluster는 하나 이상의 Endpoint를 가짐
    • 이 Endpoint는 장치의 최상위 attribute
    • 조명 조도, 도어락 같은 attribute를 정의
  • 한 노드가 Device Type을 정의하는 경우
    • 반드시 특정한 통합 기능을 가진 클러스터를 하나 이상의 엔드포인트에 정의해야함

→ 한 Device Type에 대해서 필수 cluster → 최상위 attribute를 정의해야 한다는 의미

Node간의 관계

  • Date Model은 계층화 되어 있지만, Node와 Node 사이는 계층화 되어있지 않다.
    • 수직/지엽/lead follow 형태의 관계를 가지지 않는다.
  • Cluster는 Server 또는 Client Cluster일 수 있다.
    - 즉 Node A의 Server Cluster에 Node B의 Client Cluster가 접근하여 interaction을 할 수 있다는 의미.
    - ex) 전구 a와 전구 b가 있음
    - 전구 b의 OnOff Server Cluster에 전구 a의 OnOff Client Cluster를 사용해 접근, 전구를 컨트롤 할 수 있음. 서로 연결되어있고 계층화 되어있지 않기 때문
    - 이러한 속성 변경을 위해 cluster를 구현할 필요가 있음.
    Client and Server Clusters

Matter 유무의 통신 차이

Without Matter

Without_Matter

  • Client → Public Cloud → Light Control Service (예, light control 관련 서비스) → Public Cloud → Device
  • 통신은 API(HTTP)로 사용하고 보안은 HTTPS(TLS)를 사용

Without_Matter_Https

With Matter

With_Matter

  • 외부가 아닌 Local Network로 기기와 통신
  • 이를 위해 Application Layer에서 통신으로 Cluster(API같은 용도)로 필요한 기능들을 정의, Protocol로 Matter를 사용
  • 보안으로는 CASE/PASE 사용

CASE_PASE

기기 등록 및 통신 방법

  • Commissioning
    • Matter Accessory로 등록하기 위한 절차
    • Bluetooth를 사용
  • Device간 통신에는 Thread나 Wi-Fi로 사용
  • Bluetooth는 Commissioning에만 사용됨

→ Matter는 다양한 IoT Device를 쉽게 통합된 방법으로 Connect하고 상호간 통신하며 사용할 수 있도록 만들어진 Protocol


Security and Certificate

Device Authentication

Device_Authentication

PAA Certificate

  • Root CA같은 존재
  • PAA Certificate list는 DCL(Distributed Compliance Ledger, 분산 장부)로 저장됨

PAI Certificate

  • Product Attestation Intermediate
  • DAC를 sign하기 위해 사용되는 certificate
  • PAA에 의해 sign됨
  • DAC랑 PAI는 생산될 때 device의 영구 장치에 새겨짐

DAC Certificate

  • Device Attestation(증명) Certificate
  • 기기 증명 인증서
  • 이 certificate가 있으면
    • 인증된 제조업체에서 만듬
    • 정품 기기
    • Matter compliance test를 만족
    • 증명을 위해서 PKI (Public Key Infrastructure) 방식 사용
      • 비대칭 키로 encrypt와 decrypt 키가 다름

Node Operational Credential (NOC)

  • Peer(Device)간 authenticate & data의 privacy와 integrity 보장

NOC

  • Controller: matter device를 local network랑 internet에 연결하고 사용하는 device
  • Device: matter device
  • NOC는 ICA로 sign될 수 있고 RCA를 통해 직접적으로 sign 받을 수 있음
  • RCA는 보통 commisisioner로부터 생산됨
  • NOC랑 RCA는 device에 설치된다
  • app이나 다른 device가 연결되면 certificate information이 교환됨
  • 같은 root certificate라면 서로를 믿음 → matter fabric 형성
  • certificate information이 교환된 이후는 peer간 encrypted session이 생성됨

Commissioning (PASE, CASE)

  • commissioning은 out-of-the-box방식

    out-of-the-box : 즉시 사용할 수 있는, 별도의 설치가 구성이 필요 없이 바로 사용할 수 있는

Comissioning

  1. Device가 BLE/DNS-SD advertisement
    • 기기 발견 작업
    • BLE: Bluetooth Low Energy
    • DNS-SD: Domain Name System Service Discovery, DNS기반 서비스 발견
  2. User가 QR code를 Scan
    • PASE를 사용하기 위한 작업
    • PASE: Password Authenticated Session Establishment
    • controller가 advertisement를 받고 encrypted session을 구성하려 할 때 pairing code기반으로 시도함
    • QR Code를 Scan함으로 unique pairing code를 받음

→ 이후 step은 PASE 기반

  1. Device의 DAC 요청/확인
  2. NOC certificate를 device에 설치
  3. Thread나 Wi-Fi 관련 network를 device에 알림

→ PASE Session 끝

  1. CASE Session Negotiation
    • CASE: Certificate Authenticated Session Establishment
      • 인증 기반 session
    • salt와 함께 peer간 certificate information을 교환
    • symmetric encryption을 위한 authenticate과 negotiate를 진행 → 어떤 symmetric encryption?

→ 모든 Control command는 negotiated key를 통해 보호됨


기타 단어 개념

  • Wi-Fi Provisioning
    • Wi-Fi AP까지 연결해주는 것
  • Matter Commissioning
    • Pair가 되고 서로가 Matter임을 확인함

정보 출처 및 참고

profile
アイコン:https://x.com/xx_chon_xx

0개의 댓글