<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MArcilla</id>
	<title>Elvis Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://elvis.hcw.ac.at/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=MArcilla"/>
	<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php/Special:Contributions/MArcilla"/>
	<updated>2026-09-10T16:34:22Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.5</generator>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14374</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14374"/>
		<updated>2024-02-06T11:23:19Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; is an open standard that has been developed by the &amp;quot;Project Connected Home over IP&amp;quot; (CHIP) working group since 2019 and was first published in October 2022. It is intended to enable communication between devices from various manufacturers such as Google, Samsung, Apple and Amazon, thereby extending the boundaries of existing smart home networks.&lt;br /&gt;
&lt;br /&gt;
== Protocol ==&lt;br /&gt;
&lt;br /&gt;
It is an application layer protocol that is based on network protocols such as IPv6, Thread and BLE. Bridges are required to translate the network layers in order to be able to access Thread- or BLE-based devices from IP networks. &lt;br /&gt;
&lt;br /&gt;
The Google Developer Center offers general documentation&amp;lt;ref name=&amp;quot;matter-info&amp;quot; /&amp;gt; for Matter, which explains, for example, how a new device can connect to the Matter network.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
The Google Developer Center provides resources for the development of Matter-based devices such as a sample app for connecting Matter devices &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; or virtual Matter devices &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; for testing the interfaces.&lt;br /&gt;
&lt;br /&gt;
A Matter Virtual Device (MVD) is an emulation of a Matter device and simulates the behavior of a device, e.g. switching a light switch on/off.&lt;br /&gt;
&lt;br /&gt;
=== Possibilities ===&lt;br /&gt;
The virtual device can be built and started in several ways. A total of three possibilities have been found:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
It turned out that the standalone is the best way to quickly set up an MVD. This requires an environment with a 64-bit x86 processor and at least Debian 11, Ubuntu 20.04 or MacOS.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialize the Matter project using &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
This variant was not pursued further, as the repository is resolved recursively and execution takes a lot of time.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
This approach downloads a Docker image that is larger than 10GB. Unpacked, it then has more than 30GB and is therefore also not suitable as a fast approach for development with Matter devices.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
The standalone Matter device was published relatively recently by Google, but is very easy to set up. Due to its comparatively small size of less than 70MB, it is easy to download and can be up and running within a few minutes.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installation steps (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
A GUI opens with which you can create an MVD.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
In the new window, you can configure some settings for the device:&lt;br /&gt;
&lt;br /&gt;
# Device Type - You can simulate several types of smart home devices&lt;br /&gt;
# Vendor ID - Unique certified ID for the vendor (possible values in development: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Unique certified ID for the product (possible values in development: &amp;lt;b&amp;gt;0x8000 to 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - If the same product occurs several times in the network, the discriminator can be used to differentiate between them.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
A GUI is required to communicate with the Matter device. There are two options for this:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI via RPC ====&lt;br /&gt;
The standalone MVD is supplied with an integrated GUI, whereby the device is addressed on a different port (RPC port: 33000) than the Matter port (Matter port: 5540).&lt;br /&gt;
As soon as the MVD has been created, the control UI for the simulated device opens.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI via Mobile App ====&lt;br /&gt;
The Google Developer Center has provided a CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; with which you can develop a simple Kotlin app for controlling Matter devices.&lt;br /&gt;
You can download a skeleton and the tutorial accompanies the developer to implement any missing code sections, which are marked with the comment &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot;.&lt;br /&gt;
They also offer a fully comprehensive solution to compare one&#039;s own implementation.&lt;br /&gt;
&lt;br /&gt;
This app was then launched onto a mobile phone using USB debugging.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
To connect to a Matter device on your mobile phone, you need the following prerequisites:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installed&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;To check whether the mobile phone is ready to connect Matter devices, check whether the selection &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; exists under &amp;lt;b&amp;gt;Settings -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt;. &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;If not, you should try reinstalling the Google Home app, as downloading this app also downloads the dependencies required to connect to a Matter device.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;If this step has been completed, a QR code will be generated in the MVD controller GUI.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Click on the + symbol on the app and a new window will open where you can scan the QR code with the camera.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When connecting the device it should say that Matter Credentials have been created, commissioned and finally connected.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=== Security aspect ===&lt;br /&gt;
&lt;br /&gt;
This topic was presented as part of elective project 2. The task was to recreate an attack using the MVD and show that it could be detected and mitigated during development. However, due to the newness of the standard, it is not yet widely established and therefore few vulnerabilities and exploits are known. Therefore, we could only try a DoS attack and thus prevent access to the MVD. It was not possible to evaluate whether a DoS occurred on the device itself or on the executing platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;matter-info&amp;quot;&amp;gt;https://developers.home.google.com/matter/primer&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14119</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14119"/>
		<updated>2024-01-28T20:12:03Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Protokoll */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen. &lt;br /&gt;
&lt;br /&gt;
Das Google Developer Center bietet dabei eine allgemeine Dokumentation&amp;lt;ref name=&amp;quot;matter-info&amp;quot; /&amp;gt; für Matter an, wo unter anderem erläutert wird, wie sich z.B. ein neues Gerät mit dem Matter Netzwerk verbinden kann.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Interne GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
=== Security Aspekt ===&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;matter-info&amp;quot;&amp;gt;https://developers.home.google.com/matter/primer&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14118</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14118"/>
		<updated>2024-01-28T20:09:11Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Matter Virtual Device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Interne GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
=== Security Aspekt ===&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;matter-info&amp;quot;&amp;gt;https://developers.home.google.com/matter/primer&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14117</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14117"/>
		<updated>2024-01-28T20:07:22Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Matter Virtual Device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit. Das Developer Center bietet auch eine allgemeine Dokumentation für Matter an.&amp;lt;ref name=&amp;quot;matter-info&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Interne GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
=== Security Aspekt ===&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;matter-info&amp;quot;&amp;gt;https://developers.home.google.com/matter/primer&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14116</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14116"/>
		<updated>2024-01-28T20:07:09Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Matter Virtual Device */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit. Das Developer Center bietet auch eine allgemeine Dokumentation für Matter an.&amp;lt;ref name=&amp;quot;matter-info&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
=== Security Aspekt ===&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;matter-info&amp;quot;&amp;gt;https://developers.home.google.com/matter/primer&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14115</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14115"/>
		<updated>2024-01-28T07:52:22Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Security Aspekt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
=== Security Aspekt ===&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14114</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14114"/>
		<updated>2024-01-28T07:52:09Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Security Aspekt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
== Security Aspekt ==&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14113</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14113"/>
		<updated>2024-01-27T22:32:20Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/Rjqabwb.png&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Installationsschritte (Debian/Ubuntu)&amp;lt;/b&amp;gt;&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
Es öffnet sich eine GUI, womit man ein MVD erstellen kann.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-Create.png|500px]]&lt;br /&gt;
&lt;br /&gt;
Beim neuen Fenster kann man einige Einstellungen bezüglich des Gerätes konfigurieren:&lt;br /&gt;
&lt;br /&gt;
# Device Type - Man kann mehrere Arten von Smart Home Geräten simulieren&lt;br /&gt;
# Vendor ID - Eindeutige zertifierte ID für den Händler (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0xFFF1, 0xFFF2, 0xFFF3 and 0xFFF4&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Product ID - Eindeutige zertifizierte ID für das Produkt (Mögliche Werte in der Entwicklung: &amp;lt;b&amp;gt;0x8000 bis 0x801F&amp;lt;/b&amp;gt;)&lt;br /&gt;
# Discriminator - Im Fall, dass im Netzwerk das gleiche Produkt mehrmals auftritt, kann über den Discriminator unterschieden werden.&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
Sobald das MVD erstellt wurde, öffnet sich die Control-UI für das simulierte Gerät.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-GUI.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Das Google Developer Center hat ein CodeLab&amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; zur Verfügung gestellt, womit man eine simple Kotlin-App für die Steuerung von Matter Geräten entwickeln kann.&lt;br /&gt;
Dazu kann man ein Skeleton herunterladen und das Tutorial begleitet den Entwickler, um etwaige fehlende Code-Stellen zu implementieren, die mit dem Kommentar &amp;quot;&amp;lt;b&amp;gt;// CODELAB:&amp;lt;/b&amp;gt;&amp;quot; versehen sind.&lt;br /&gt;
&lt;br /&gt;
Diese App wurde dann mittels USB-Debugging auf ein Handy gestartet.&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-KotlinCode.png|500px]]&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/req0VHX.png&lt;br /&gt;
&lt;br /&gt;
https://i.imgur.com/8jGIO3T.png&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
Um sich am Handy mit einem Matter Gerät zu verbinden, braucht man folgende Voraussetzungen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Android Version - Version &amp;gt;= 8.1&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Play Service - Version &amp;gt;= 22.36.15&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Google Home App - Installiert&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
&amp;lt;li&amp;gt;Zur Überprüfung, ob das Handy bereit ist, Matter Geräte zu verbinden, wird geschaut ob unter &amp;lt;b&amp;gt;Einstellungen -&amp;gt; Google -&amp;gt; Devices and Sharing&amp;lt;/b&amp;gt; die Auswahl &amp;lt;b&amp;gt;Matter devices&amp;lt;/b&amp;gt; existiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Falls nicht, sollte man versuchen die Google Home App neu zu installieren, da beim Download von dieser App gleichzeitig auch die benötigten Dependencies heruntergeladen werden, um sich mit einem Matter Gerät zu verbinden.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-DevicesAndSharing.png|250px]]&lt;br /&gt;
[[File:Matter-Devices.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Sofern dieser Schritt geschafft worden ist, wird im MVD-Controller GUI ein QR-Code generiert.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:MVD-QR.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Auf der App wird auf das + Symbol geklickt und es öffnet sich ein neues Fenster, wo man mit der Kamera den QR-Code scannen kann.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Scan.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Beim Verbinden des Gerätes sollte stehen, dass es Matter Credentials erstellt, Commissioned und schlussendlich auch verbunden ist.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Matter-Connected.png|250px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
==== Security Aspekt ====&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-QR.png&amp;diff=14112</id>
		<title>File:MVD-QR.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-QR.png&amp;diff=14112"/>
		<updated>2024-01-27T22:21:33Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Connected.png&amp;diff=14111</id>
		<title>File:Matter-Connected.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Connected.png&amp;diff=14111"/>
		<updated>2024-01-27T22:16:54Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Scan.png&amp;diff=14110</id>
		<title>File:Matter-Scan.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Scan.png&amp;diff=14110"/>
		<updated>2024-01-27T22:15:26Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Devices.png&amp;diff=14109</id>
		<title>File:Matter-Devices.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-Devices.png&amp;diff=14109"/>
		<updated>2024-01-27T22:12:12Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-DevicesAndSharing.png&amp;diff=14108</id>
		<title>File:Matter-DevicesAndSharing.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Matter-DevicesAndSharing.png&amp;diff=14108"/>
		<updated>2024-01-27T22:11:28Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-GUI.png&amp;diff=14107</id>
		<title>File:MVD-GUI.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-GUI.png&amp;diff=14107"/>
		<updated>2024-01-27T22:01:50Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-Create.png&amp;diff=14106</id>
		<title>File:MVD-Create.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-Create.png&amp;diff=14106"/>
		<updated>2024-01-27T22:01:03Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-KotlinCode.png&amp;diff=14105</id>
		<title>File:MVD-KotlinCode.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:MVD-KotlinCode.png&amp;diff=14105"/>
		<updated>2024-01-27T21:59:10Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14104</id>
		<title>Matter</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=Matter&amp;diff=14104"/>
		<updated>2024-01-27T21:29:55Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Security Aspekt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:Matter_logo.jpg|thumb|Logo of Matter&amp;lt;ref name=&amp;quot;logo&amp;quot;/&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Matter&#039;&#039;&#039; ist ein offener Standard, der von der Arbeitsgruppe &amp;quot;Project Connected Home over IP&amp;quot; (kurz CHIP) seit 2019 entwickelt und im Oktober 2022 erstmals publiziert wurde. Er soll die Kommunikation zwischen Geräten diverser Hersteller wie Google, Samsung, Apple und Amazon ermöglichen und damit die Grenzen bestehender Smart-Home Netze erweitern.&lt;br /&gt;
&lt;br /&gt;
== Protokoll ==&lt;br /&gt;
&lt;br /&gt;
Es handelt sich um ein Application-Layer-Protokoll, welches auf Netzwerkprotokolle wie IPv6, Thread und BLE aufsetzt. Um von IP-Netzwerken auf z.B. Thread- oder BLE-basierte Geräte zugreifen zu können werden Bridges benötigt, welche die Netzwerklayer übersetzen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Primer-matter-architecture.png|The Matter Stack in the TCP/IP and OSI Model]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Matter Virtual Device ==&lt;br /&gt;
Das Google Developer Center stellt Resourcen zur Entwicklung von Matter-basierten Geräten wie einer Sample App zum Verbinden von Matter-Geräten &amp;lt;ref name=&amp;quot;sample-app&amp;quot; /&amp;gt; oder virtuellen Matter-Geräten &amp;lt;ref name=&amp;quot;virtual-device&amp;quot; /&amp;gt; zum Testen der Schnittstellen bereit.&lt;br /&gt;
&lt;br /&gt;
Ein Matter Virtual Device (MVD) ist eine Emulation eines Matter Devices und simuliert das Verhalten eines Gerätes z.B. das Ein-/Ausschalten eines Lichtschalters.&lt;br /&gt;
&lt;br /&gt;
=== Möglichkeiten ===&lt;br /&gt;
Das Virtual Device kann man über mehrere Wege bauen und starten. Dazu wurden insgesamt drei Möglichkeiten gefunden:&lt;br /&gt;
&lt;br /&gt;
* Standalone&lt;br /&gt;
* Docker Image&lt;br /&gt;
* GitHub Repository&lt;br /&gt;
&lt;br /&gt;
Es hat sich herausgestellt, dass das Standalone am Besten geeignet ist, um schnell ein MVD einzurichten. Dazu wird eine Umgebung mit einem 64-bit x86 Prozessor und mindestens Debian 11, Ubuntu 20.04 oder MacOS benötigt.&lt;br /&gt;
&lt;br /&gt;
==== GitHub Repository ====&lt;br /&gt;
&lt;br /&gt;
# git clone https://github.com/project-chip/connectedhomeip&lt;br /&gt;
# Initialisieren des Matter-Projektes durch &amp;quot;source scripts/activate.sh&amp;quot;&lt;br /&gt;
Diese Variante wurde nicht weiter verfolgt, da das Repository rekursiv aufgelöst wird und das Klonen und Ausführen daher sehr viel Zeit in Anspruch nimmt.&lt;br /&gt;
&lt;br /&gt;
==== Docker Image Repository ====&lt;br /&gt;
&lt;br /&gt;
# docker pull us-docker.pkg.dev/nest-matter/docker-repo/virtual-device-image:latest&lt;br /&gt;
Dieser Ansatz lädt ein Docker Image herunter, welches größer als 10GB ist. Entpackt hat es dann mehr als 30GB und ist daher als schneller Ansatz für die Entwicklung mit Matter-Geräten ebenfalls nicht tauglich.&lt;br /&gt;
&lt;br /&gt;
==== Standalone ====&lt;br /&gt;
Das Standalone-Matter-Device wurde relativ neu von Google publiziert, lässt sich aber sehr einfach aufsetzen. Durch seine vergleichsweise geringe Größe mit weniger als 70MB ist es einfach herunterzuladen und ist innerhalb weniger Minuten lauffähig.&lt;br /&gt;
&lt;br /&gt;
![](https://i.imgur.com/Rjqabwb.png)&lt;br /&gt;
&lt;br /&gt;
Installationsschritte (Debian/Ubuntu)&lt;br /&gt;
# wget https://dl.google.com/mvd/mvd_1.3.0_amd64.deb&lt;br /&gt;
# sudo dpkg -i mvd_1.3.0_amd64.deb&lt;br /&gt;
# mvd&lt;br /&gt;
&lt;br /&gt;
=== Controller GUI ===&lt;br /&gt;
Um mit dem Matter Device zu kommunizieren, wird eine GUI benötigt. Dazu gibt es wieder zwei Möglichkeiten:&lt;br /&gt;
&lt;br /&gt;
==== Internal GUI über RPC ====&lt;br /&gt;
Das Standalone MVD wird mit einer integrierten GUI geliefert, wobei das Gerät auf einem anderen Port (RPC-Port: 33000) angesprochen wird, als den Matter Port (Matter-Port: 5540).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bild&lt;br /&gt;
&lt;br /&gt;
==== GUI über Mobile App ====&lt;br /&gt;
Lorem Ipsum&lt;br /&gt;
Kotlin&lt;br /&gt;
Codelab&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Connection ===&lt;br /&gt;
==== Prerequisites ====&lt;br /&gt;
Android Version&lt;br /&gt;
Google Play Version&lt;br /&gt;
Google Home App&lt;br /&gt;
&lt;br /&gt;
==== Steps ====&lt;br /&gt;
Get QR Code or Code from Logs&lt;br /&gt;
Scan QR or put in manual Code&lt;br /&gt;
Connected&lt;br /&gt;
&lt;br /&gt;
==== Security Aspekt ====&lt;br /&gt;
&lt;br /&gt;
Dieses Thema wurde im Rahmen des Wahlfachprojektes 2 vorgestellt. Die Aufgabe bestand darin, mit dem MVD einen Angriff nachzustellen und zu zeigen, dass dieser daher bereits während der Entwicklung erkennt und mitigiert werden könnte. Aufgrund der Neuheit des Standards ist dieser aber noch nicht in der Breite etabliert und daher sind auch noch wenige Vulnerabilities und Exploits bekannt. Daher konnten wir nur eine DoS Attacke ausprobieren und damit den Zugriff auf das MVD verhindern. Eine Differenzierung, ob es dabei zu einem DoS des Gerätes selbst oder der ausführenden Plattform kam, konnte nicht evaluiert werden.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;logo&amp;quot;&amp;gt;https://commons.wikimedia.org/wiki/File:Matter_logo.jpg&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sample-app&amp;quot;&amp;gt;https://developers.home.google.com/codelabs/matter-sample-app#1&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;virtual-device&amp;quot;&amp;gt;https://developers.home.google.com/tools/virtual-device&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;/references&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=PandwaRF&amp;diff=13685</id>
		<title>PandwaRF</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=PandwaRF&amp;diff=13685"/>
		<updated>2024-01-07T08:35:51Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[File:PandwaRF.png]]&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
PandwaRF is a family of pocket-sized, portable RF analysis tools operating the sub-1&lt;br /&gt;
GHz range produced by the Comthings, a French startup focused on the PandwaRF&lt;br /&gt;
analysis tool and custom RF penetration testing tools for professionals and law enforcement agencies. &amp;lt;ref&amp;gt;Tania. Home: https://www.comthings.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
analysis and re-transmission of RF via an Android device or a Linux PC.&lt;br /&gt;
&lt;br /&gt;
It can be connected to an Android smartphone using BLE or USB, and to Linux using USB. &lt;br /&gt;
It is based on the well-known RfCat and Yard Stick One tools with the Texas&lt;br /&gt;
Instruments CC1111 RF transceiver &amp;lt;ref&amp;gt;Texas Instruments. instruments guide, https://www.ti.com/product/CC1110-CC1111 ,&lt;br /&gt;
2013.&amp;lt;/ref&amp;gt;, but with a lot of new features, making&lt;br /&gt;
PandwaRF the perfect portable RF analysis tool. Practically, it removes the&lt;br /&gt;
‘standard SDR Grind’ of capturing, demodulating, analyzing, modifying and replaying&lt;br /&gt;
by hand – replacing it with a simple but powerful interface.&lt;br /&gt;
&lt;br /&gt;
The PandwaRF system consists of two elements: the hardware device and the software controller, either an Android device or a PC. &lt;br /&gt;
The hardware is a very capable&lt;br /&gt;
device, tailored for beginners and advanced users alike.&lt;br /&gt;
Beyond the functionality provided by the Android interface, the PandwaRF can be&lt;br /&gt;
easily controlled and customized. No need to risk bricking your device or writing in C,&lt;br /&gt;
the PandwaRF can be controlled by JavaScript, directly on the smartphone.&lt;br /&gt;
The Rogue Pro was designed for advanced users like pentesters or security professionals and it is specialized on brute forcing wireless devices in order to test their&lt;br /&gt;
security.&lt;br /&gt;
&lt;br /&gt;
==General Overview==&lt;br /&gt;
PandwaRF is a Radio Frequency hacking tool used to:&amp;lt;ref&amp;gt;https://www.comthings.com/&amp;lt;/ref&amp;gt;&lt;br /&gt;
===Receive===&lt;br /&gt;
&amp;lt;li&amp;gt;Capture any data in ASK/OOK/MSK/2-FSK/GFSK modulation from the frequency range: 300-348 MHz, 391-464 MHz and 782-928 MHz&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Transfer the captured data to your smartphone &amp;amp; save/share it&lt;br /&gt;
&amp;lt;li&amp;gt;Send the captured data in JSON to your own server for post-processing&lt;br /&gt;
&amp;lt;li&amp;gt;Write your own scripts or use a provided one&lt;br /&gt;
===Transmit===&lt;br /&gt;
&amp;lt;li&amp;gt;Transmit previously captured data or write your own&lt;br /&gt;
&amp;lt;li&amp;gt;Transmit data from a smartphone or directly from PandwaRF&lt;br /&gt;
&amp;lt;li&amp;gt;Brute force with a predefined transmission pattern (encoders or devices)&lt;br /&gt;
&amp;lt;li&amp;gt;Transmit power: +10dBm&lt;br /&gt;
===Analyze===&lt;br /&gt;
&amp;lt;li&amp;gt;Visualize the frequency used by any device using the PandwaRF built-in Spectrum Analyzer&lt;br /&gt;
&amp;lt;li&amp;gt;Directly show the maximum and average RSSI for a specific frequency band&lt;br /&gt;
&lt;br /&gt;
==Technical Overview==&lt;br /&gt;
PandwaRF is composed of 2 elements:&lt;br /&gt;
&amp;lt;li&amp;gt;PandwaRF HW dongle&lt;br /&gt;
&amp;lt;li&amp;gt;PandwaRF Android application&lt;br /&gt;
&lt;br /&gt;
===PandwaRF HW dongle===&lt;br /&gt;
The PandwaRF dongle contains&amp;lt;ref&amp;gt; https://pandwarf.com/pandwarf-rogue-pro/ &amp;lt;/ref&amp;gt;:&lt;br /&gt;
&amp;lt;li&amp;gt;Bluetooth Smart Module ISP130301, based on nRF51&lt;br /&gt;
&amp;lt;li&amp;gt;CC1111 Low-Power SoC with Sub-1 GHz RF Transceiver&lt;br /&gt;
&amp;lt;li&amp;gt;16 Mbit Flash Memory to save custom RF protocols&lt;br /&gt;
&amp;lt;li&amp;gt;Rechargeable battery powered for stand-alone operation&lt;br /&gt;
&amp;lt;li&amp;gt;Battery fuel gauge&lt;br /&gt;
&amp;lt;li&amp;gt;SMA connector&lt;br /&gt;
&amp;lt;li&amp;gt;4 buttons&lt;br /&gt;
&amp;lt;li&amp;gt;4 Status LEDs&lt;br /&gt;
&amp;lt;li&amp;gt;Debug connectors &amp;amp; GPIOs&lt;br /&gt;
&lt;br /&gt;
==Possible applications==&lt;br /&gt;
&amp;lt;li&amp;gt;Receive keyfobs transmission (car, alarm, gate opener, …)&lt;br /&gt;
&amp;lt;li&amp;gt;Replay captured transmission from keyfobs&lt;br /&gt;
&amp;lt;li&amp;gt;Replay a modified captured transmission&lt;br /&gt;
&amp;lt;li&amp;gt;Transmit your own custom payload&lt;br /&gt;
&amp;lt;li&amp;gt;Capture RF data and transmit it on another frequency&lt;br /&gt;
&amp;lt;li&amp;gt;Brute force wireless devices (alarms, gate openers etc)&amp;lt;ref&amp;gt;https://github.com/ComThings/PandwaRF/wiki&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Spectrum Analyzer&lt;br /&gt;
&amp;lt;li&amp;gt;Find the frequency used by a RF device&lt;br /&gt;
&amp;lt;li&amp;gt;Reverse engineer unknown protocols&lt;br /&gt;
&amp;lt;li&amp;gt;Measure the data rate of a transmission&lt;br /&gt;
&amp;lt;li&amp;gt;Check the RF jam-resistance of your own devices&lt;br /&gt;
&amp;lt;li&amp;gt;Send captured data to a server for post-processing&lt;br /&gt;
&amp;lt;li&amp;gt;Write custom Javascript scenarios&lt;br /&gt;
&amp;lt;li&amp;gt;Develop your own Android application&lt;br /&gt;
&lt;br /&gt;
==Hardware Antennas==&lt;br /&gt;
&lt;br /&gt;
In its antenna pack version, PandwaRF is shipped with 3 miniature SMA antennas (315/433/868-915 MHz).&lt;br /&gt;
 &lt;br /&gt;
Using the proper antenna is critical to have good RF performance.&lt;br /&gt;
Antennas are labelled with the first digit of their frequency band:&lt;br /&gt;
&amp;lt;li&amp;gt;3 for 315 MHz,&lt;br /&gt;
&amp;lt;li&amp;gt;4 for 433 MHz,&lt;br /&gt;
&amp;lt;li&amp;gt;8/9 for 868/915 MHz&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Warning===&lt;br /&gt;
PandwaRF is a test equipment for RF systems. It has not been tested for compliance with the regulations governing the transmission of radio signals. You are responsible for using your PandwaRF legally. The intentional jamming of RF signals is ILLEGAL. PandwaRF should only be used for testing the robustness of your own devices.&lt;br /&gt;
&lt;br /&gt;
== Mobile App ==&lt;br /&gt;
PandwaRF offers a smartphone app to provide many tools for analysing RF signals:&lt;br /&gt;
&lt;br /&gt;
=== Pairing ===&lt;br /&gt;
In order to use the PandwaRF, the device has to be connected to the mobile device via Bluetooth.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFPairing.png|300px]]&lt;br /&gt;
&lt;br /&gt;
=== Spectrum Analyser ===&lt;br /&gt;
The spectrum analyser helps measuring the frequency at which a device&#039;s signal is exactly operating at. It is also possible to discern the modulation, distortion, noise and bandwidth.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFSpecAnalyse.png|300px]]&lt;br /&gt;
&lt;br /&gt;
=== Rx/Tx Data Transmission ===&lt;br /&gt;
This tab is for capturing or transmitting the data of the device to be intercepted. It has two different modes: a beginner-friendly easy mode and hard mode designed for radio experts in order to fine-tune the eavesdropping. The easy mode needs three inputs: Device frequency operation, modulation type, and lastly the data rate. &lt;br /&gt;
&lt;br /&gt;
The operating frequency can be either manually or automatically filled in by the results of the spectrum analyser. The next parameter is the modulation type and it is usually in the device&#039;s technical manual. Last but not least, the data rate can be filled in manually or have the rate measured by sending an RF signal.&lt;br /&gt;
&lt;br /&gt;
Once set, the user can start the capture of the transmission and eavesdrop on the message. After having received data it will show in the mobile app as a hex or binary stream.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFRxTx.png|300px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Brute Force ===&lt;br /&gt;
Another tool the app provides is the brute forcing code words on RF devices. With this feature the user can send multiple RF codes to the receiver after having configured the baselines for the code word. In order to start brute-forcing the code word and set-up the analysis tool, the user must gain insight on missing information first such as the RF parameters, codeword settings, etc &amp;lt;ref&amp;gt;https://github.com/ComThings/PandwaRF/wiki&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFBruteForce.png|300px]]&lt;br /&gt;
&lt;br /&gt;
== Kaiju ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Kaiju is an online rolling code analyser and generator. It uses the captured payload of the RF signal, processes it, tries to break its encryption on a remote server by ComThings and returns several information including metadata about the victim such as &amp;lt;ref&amp;gt;https://rolling.pandwarf.com&amp;lt;/ref&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Brand/Model&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Serial Number&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Encryption Scheme&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:Kaiju.png]]&lt;br /&gt;
&lt;br /&gt;
=== Rolling Code ===&lt;br /&gt;
One of the commonly used techniques when trying to securely gain access on vehicles or garage door openers is a rolling code implementation. This is also known as hopping code. It is an authentication scheme in order for the user to be able to remotely open up their car as an example. Therefore, no physical key is needed for systems using this technique but rather remote keys in the form of remote controls e.g. car key fobs.&lt;br /&gt;
 &lt;br /&gt;
In general, this protocol operates on generating a code and having it validated by the receiving device. The transmitter and receiver using this protocol must, however, be synchronised first. The generation of this code happens on the sender side and must be unique. The uniqueness can be guaranteed by having the sender device hold an internal counter and increment it on every code generation.&lt;br /&gt;
Every time the user presses the button on their transmission device, it will create a new code. That remote has a unique identifier (UID), which the receiver knows since the first step is to synchronise both devices. The message can be validated by the receiving end as it contains the UID of the remote control. Once accepted, the receiver marks the newly generated code to its list and increments its own counter &amp;lt;ref&amp;gt;https://ieeexplore.ieee.org/document/9851991&amp;lt;/ref&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A good visualization can be found at https://harryli0088.github.io/rolling-code/&lt;br /&gt;
&lt;br /&gt;
==== License required ====&lt;br /&gt;
However, to enable the rolling code generation against devices such as garage door openers, a Kaiju license has to be bought from the PandwaRF shop. Once bought, it has to be bound to a Kaiju account and the MAC address of a PandwaRF device. This association cannot be changed unless a request ticket is made to the support e-mail of the PandwaRF team &amp;lt;ref&amp;gt;https://pandwarf.com/product/kaiju-gate-openers-pack-pro-license/&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Example: Rolling Code Attack ==&lt;br /&gt;
The following section presents an attempt to hack a garage door opener - the Chamberlain ML700EV Comfort &amp;lt;ref&amp;gt;https://stuff.elvis.science/hardware/489&amp;lt;/ref&amp;gt; - with the help of the PandwaRF Rogue Pro.&lt;br /&gt;
This device consists of a motor, several metal rails for the garage door and two remote controls to operate it. The motor acts as a receiver. The minimal required set-up for the opener to work is to plug in the motor and the remote control can send RF signals to open and close the gate by pressing a button.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFSetup.jpg|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 1: Setup RF Parameters ===&lt;br /&gt;
In the first step it is important to know what RF parameters the device operates in. &lt;br /&gt;
The RF parameters needed to capture in PandwaRF are the following:&lt;br /&gt;
    &amp;lt;li&amp;gt;Frequency&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Modulation&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Data rate&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the RF connectivity on the PandwaRF, it can connect two different antennas to its board. One is in the area of 433 MHz while the other operates on around 868 MHz. To find out the &amp;lt;b&amp;gt;operating frequency&amp;lt;/b&amp;gt; of the device, there are multiple ways to figure it out. The simplest way to find out the frequency is to look at the vendor&#039;s shopping page and the product&#039;s technical details. Browsing the manual provided by the packaging is an alternative. Lastly, if the device has an Federal Communications Commission (FCC) ID &amp;lt;ref&amp;gt;https://www.fcc.gov/oet/ea/fccid&amp;lt;/ref&amp;gt;, it is possible to search for the necessary data online. The operating frequency has been found inside the manual and it can operate on both the 433 MHz and the 868 MHz bands. &lt;br /&gt;
&lt;br /&gt;
For this example the antenna with the 868 MHz has been screwed in the PandwaRF.&lt;br /&gt;
&lt;br /&gt;
In order to start hacking, the data needs to be recorded and sent to Kaiju. &lt;br /&gt;
The capturing of the data can be started in the Rx/Tx tab and have the capture displayed as either a binary or a hex data stream. Before we can start eavesdropping, the two remaining RF parameters (modulation and data rate) have to be found out. The &amp;lt;b&amp;gt;data rate&amp;lt;/b&amp;gt; can be simply measured from the current tab whilst the &amp;lt;b&amp;gt;modulation&amp;lt;/b&amp;gt; has to be figured out via trial and error.&lt;br /&gt;
&lt;br /&gt;
=== Step 2: Capturing the Data ===&lt;br /&gt;
The eavesdrop can now start by initiating the capture in the app and then sending an RF signal from the remote control.&lt;br /&gt;
&lt;br /&gt;
The RF parameters are as follows:&lt;br /&gt;
    &amp;lt;li&amp;gt;Frequency - &amp;lt;b&amp;gt;868.225 MHz&amp;lt;/b&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Modulation - &amp;lt;b&amp;gt;ASK/OOK&amp;lt;/b&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Data rate - &amp;lt;b&amp;gt;3.999 Bit/s&amp;lt;/b&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFRxTx.png|300px]]&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFRxTx-Eavesdropped.png|300px]]&lt;br /&gt;
&lt;br /&gt;
=== Step 3: Send to Kaiju ===&lt;br /&gt;
&lt;br /&gt;
After a successful interception, the payload has already been evaluated and it is shown that the captured signal has a pattern that resembles a rolling code implementation. To have Kaiju correctly break through the encryption it is required to change the found Pattern to the &amp;lt;b&amp;gt;Chamberlain Security+ 2.0 (rolling code)&amp;lt;/b&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The button on the bottom left will send the selected payload to Kaiju and will automatically generate 10 new rolling codes to use.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRF-Patterns.jpg|300px]]&lt;br /&gt;
[[File:PandwaRFTransmitToKaiju.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Step 4: Use Rolling Codes ===&lt;br /&gt;
The payload is sent to the Kaiju servers and they process the data and try to break the encryption. The process behind how it attempt to break it is not stated on the Kaiju website. It cracks the input stream and returns a positive result. The signal has been figured out. Kaiju will automatically generate ten new rolling codes for each payload that was sent to it to be analysed. It is now possible to send these codes from the mobile app to the PandwaRF. The analysis tool will act as an impostor remote control and trigger an action from the actuator.&lt;br /&gt;
&lt;br /&gt;
[[File:PandwaRFTransmitRollingCodes.png|500px]]&lt;br /&gt;
&lt;br /&gt;
=== Evaluation on the Kaiju Website ===&lt;br /&gt;
[[File:KaijuHistory.png|500px]]&lt;br /&gt;
[[File:KaijuMetadata.png|500px]]&lt;br /&gt;
[[File:KaijuRollingCodes.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuRollingCodes.png&amp;diff=13684</id>
		<title>File:KaijuRollingCodes.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuRollingCodes.png&amp;diff=13684"/>
		<updated>2024-01-07T08:34:35Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuMetadata.png&amp;diff=13683</id>
		<title>File:KaijuMetadata.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuMetadata.png&amp;diff=13683"/>
		<updated>2024-01-07T08:34:27Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRF-Patterns.jpg&amp;diff=13682</id>
		<title>File:PandwaRF-Patterns.jpg</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRF-Patterns.jpg&amp;diff=13682"/>
		<updated>2024-01-07T08:25:32Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuHistory.png&amp;diff=13681</id>
		<title>File:KaijuHistory.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:KaijuHistory.png&amp;diff=13681"/>
		<updated>2024-01-07T08:03:14Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFTransmitToKaiju.png&amp;diff=13680</id>
		<title>File:PandwaRFTransmitToKaiju.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFTransmitToKaiju.png&amp;diff=13680"/>
		<updated>2024-01-07T08:01:00Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Kaiju.png&amp;diff=13679</id>
		<title>File:Kaiju.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Kaiju.png&amp;diff=13679"/>
		<updated>2024-01-07T07:57:19Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFPairing.png&amp;diff=13678</id>
		<title>File:PandwaRFPairing.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFPairing.png&amp;diff=13678"/>
		<updated>2024-01-07T07:47:36Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFSetup.jpg&amp;diff=13677</id>
		<title>File:PandwaRFSetup.jpg</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFSetup.jpg&amp;diff=13677"/>
		<updated>2024-01-07T07:38:12Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFTransmitRollingCodes.png&amp;diff=13676</id>
		<title>File:PandwaRFTransmitRollingCodes.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFTransmitRollingCodes.png&amp;diff=13676"/>
		<updated>2024-01-07T07:37:22Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFRxTx-Eavesdropped.png&amp;diff=13675</id>
		<title>File:PandwaRFRxTx-Eavesdropped.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFRxTx-Eavesdropped.png&amp;diff=13675"/>
		<updated>2024-01-07T07:36:40Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFRxTx.png&amp;diff=13674</id>
		<title>File:PandwaRFRxTx.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFRxTx.png&amp;diff=13674"/>
		<updated>2024-01-07T07:36:19Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFBruteForce.png&amp;diff=13673</id>
		<title>File:PandwaRFBruteForce.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFBruteForce.png&amp;diff=13673"/>
		<updated>2024-01-07T07:34:18Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFSpecAnalyse.png&amp;diff=13672</id>
		<title>File:PandwaRFSpecAnalyse.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:PandwaRFSpecAnalyse.png&amp;diff=13672"/>
		<updated>2024-01-07T07:33:35Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11669</id>
		<title>File:Unittest-OSCORE.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11669"/>
		<updated>2023-07-04T19:08:07Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: MArcilla uploaded a new version of File:Unittest-OSCORE.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11668</id>
		<title>File:Unittest-OSCORE.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11668"/>
		<updated>2023-07-04T19:06:53Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: MArcilla uploaded a new version of File:Unittest-OSCORE.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11667</id>
		<title>File:Unittest-OSCORE.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11667"/>
		<updated>2023-07-04T19:03:55Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: MArcilla uploaded a new version of File:Unittest-OSCORE.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11662</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11662"/>
		<updated>2023-07-04T07:31:00Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Gateway */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
=== Imports ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
=== Main ===&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
[[File:CoMatrix-Gateway-OSCORE.png]]&lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
[[File:Unittest-OSCORE.png]]&lt;br /&gt;
&lt;br /&gt;
=== Wireshark Capture ===&lt;br /&gt;
&lt;br /&gt;
The Wireshark Capture can be downloaded here:&lt;br /&gt;
[[Media:OSCORE-wireshark-capture.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:OSCORE-wireshark.png]]&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* (optional) Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11661</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11661"/>
		<updated>2023-07-04T07:30:22Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Wireshark Capture */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
=== Imports ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
=== Main ===&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
=== Wireshark Capture ===&lt;br /&gt;
&lt;br /&gt;
The Wireshark Capture can be downloaded here:&lt;br /&gt;
[[Media:OSCORE-wireshark-capture.zip]]&lt;br /&gt;
&lt;br /&gt;
[[File:OSCORE-wireshark.png]]&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* (optional) Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:OSCORE-wireshark-capture.zip&amp;diff=11660</id>
		<title>File:OSCORE-wireshark-capture.zip</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:OSCORE-wireshark-capture.zip&amp;diff=11660"/>
		<updated>2023-07-04T07:29:07Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:OSCORE-wireshark.png&amp;diff=11659</id>
		<title>File:OSCORE-wireshark.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:OSCORE-wireshark.png&amp;diff=11659"/>
		<updated>2023-07-04T07:16:38Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11658</id>
		<title>File:Unittest-OSCORE.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:Unittest-OSCORE.png&amp;diff=11658"/>
		<updated>2023-07-04T07:04:35Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=File:CoMatrix-Gateway-OSCORE.png&amp;diff=11657</id>
		<title>File:CoMatrix-Gateway-OSCORE.png</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=File:CoMatrix-Gateway-OSCORE.png&amp;diff=11657"/>
		<updated>2023-07-04T07:02:18Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11656</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11656"/>
		<updated>2023-07-04T06:58:23Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Gateway */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
=== Imports ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
=== Main ===&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
=== Wireshark Capture ===&lt;br /&gt;
&lt;br /&gt;
// TODO How to add a picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* (optional) Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11655</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11655"/>
		<updated>2023-07-04T06:57:51Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
== Gateway ==&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
=== Imports ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
=== Main ===&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* (optional) Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11654</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11654"/>
		<updated>2023-07-04T06:55:44Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Used Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* (optional) Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11653</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11653"/>
		<updated>2023-07-04T06:55:20Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [[#Used Hardware]]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11652</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11652"/>
		<updated>2023-07-04T06:55:02Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* See [#Used Hardware]&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11651</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11651"/>
		<updated>2023-07-04T06:54:44Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* Hardware&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11650</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11650"/>
		<updated>2023-07-04T06:54:28Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: /* Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* Hardware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;USAGE:&#039;&#039;&#039; ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
	<entry>
		<id>https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11649</id>
		<title>CoMatrix: OSCORE</title>
		<link rel="alternate" type="text/html" href="https://elvis.hcw.ac.at/wiki/index.php?title=CoMatrix:_OSCORE&amp;diff=11649"/>
		<updated>2023-07-04T06:53:27Z</updated>

		<summary type="html">&lt;p&gt;MArcilla: Created page with &amp;quot;== Summary ==   This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].   == Requirements ==  * Operating system:  ** Ubuntu 22.04 (Gateway) ** RIOT OS (Client) * Hardware   In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.  == Description ==  OSCORE is a se...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary == &lt;br /&gt;
&lt;br /&gt;
This documentation describes the usage of an application-layer protocol OSCORE to provide end-to-end protection between the [https://comatrix.eu/setup/architecture_and_testbed CoMatrix Gateway and CoMatrix Client].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
* Operating system: &lt;br /&gt;
** Ubuntu 22.04 (Gateway)&lt;br /&gt;
** RIOT OS (Client)&lt;br /&gt;
* Hardware&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to complete these steps, you must set up the [https://comatrix.eu/setup/ CoMatrix project] before.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
OSCORE is a security protocol designed to provide end-to-end protection between endpoints communicating using CoAP.&lt;br /&gt;
&lt;br /&gt;
A key exchange protocol does not exist OSCORE and the keys are pre-shared between Gateway and Client. However, there is ongoing work with key exchanges such as EDHOC or [https://datatracker.ietf.org/doc/html/draft-ietf-ace-oscore-profile-11 ACE-OSCORE]&lt;br /&gt;
&lt;br /&gt;
=== Gateway ===&lt;br /&gt;
&lt;br /&gt;
The Python library aiocoap provided the OSCORE functionality and was implemented in order for the gateway to talk in OSCORE&lt;br /&gt;
&lt;br /&gt;
==== Imports ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following imports were added&lt;br /&gt;
&lt;br /&gt;
 from aiocoap.oscore_sitewrapper import OscoreSiteWrapper&lt;br /&gt;
 from aiocoap.credentials import CredentialsMap&lt;br /&gt;
 from plugtest_common import *&lt;br /&gt;
 from aiocoap.cli.common import server_context_from_arguments, add_server_arguments&lt;br /&gt;
&lt;br /&gt;
* The plugtest_common import was extracted from the aiocoap OSCORE plugtest and provides verification for external AADs and returning the security context.&lt;br /&gt;
&lt;br /&gt;
==== Main ====&lt;br /&gt;
&lt;br /&gt;
When starting the gateway, new parameters have been added to list the directory where the pre-shared secrets are held and sequence numbers will be saved. These sequence numbers are necessary for replay protection.&lt;br /&gt;
&lt;br /&gt;
 parser.add_argument(&amp;quot;contextdir&amp;quot;, help=&amp;quot;Directory name where to persist sequence numbers and the location of the secrets&amp;quot;, type=Path)&lt;br /&gt;
 &lt;br /&gt;
 // Necessary to add these arguments provided by the aiocoap library in order for the server to start correctly. More info under aiocoap/cli/common.py&lt;br /&gt;
 add_server_arguments(parser)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The context directory may contain two files:&lt;br /&gt;
* secrets.json&lt;br /&gt;
* settings.json&lt;br /&gt;
As per implementation it is sufficient to only have one of these files in the directory.&lt;br /&gt;
&lt;br /&gt;
The format of the file is the following JSON:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
Important properties are:&lt;br /&gt;
* sender-id&lt;br /&gt;
* recipient-id&lt;br /&gt;
* secret&lt;br /&gt;
&lt;br /&gt;
These three properties must be appended with either _hex or _ascii and have the values according to the suffix.&lt;br /&gt;
&lt;br /&gt;
Assume that the file above was for the server and for our client we would need the following file:&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;sender-id_ascii&amp;quot;: &amp;quot;file&amp;quot;,&lt;br /&gt;
   &amp;quot;recipient-id_hex&amp;quot;: &amp;quot;01&amp;quot;,&lt;br /&gt;
   &amp;quot;secret_ascii&amp;quot;: &amp;quot;Correct Horse Battery Staple&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Notice how sender-id and recipient-id had to be swapped.&lt;br /&gt;
With these two secret files it is now possible to start a gateway and a client each using a different JSON file with the ids flipped.&lt;br /&gt;
&lt;br /&gt;
For further information see [https://aiocoap.readthedocs.io/en/latest/stateofoscore.html#oscore-credentials aiocoap-OSCORE]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Loading these in the code was done in the following way - For testing purposes there were two pairs of credentials a / b and c / d whereas the first one is used for the test client and the latter for the gateway:&lt;br /&gt;
 &lt;br /&gt;
 // Loading the pre-shared secrets&lt;br /&gt;
 server_credentials = CredentialsMap()&lt;br /&gt;
 // the first parameter states the name of the context in this case it&#039;s b but can be named in any way and the second parameter is the path to the folder e.g. the file would be located in /contextdir/b/settings.json&lt;br /&gt;
 server_credentials[&#039;:b&#039;] = get_security_context(&#039;b&#039;, args.contextdir / &amp;quot;b&amp;quot;)&lt;br /&gt;
 server_credentials[&#039;:d&#039;] = get_security_context(&#039;d&#039;, args.contextdir / &amp;quot;d&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
To enable OSCORE for the server now the following code was added/adjusted:&lt;br /&gt;
 // root is the variable for the site&lt;br /&gt;
 // Enable the site to talK OSCORE with the credentials loaded from before&lt;br /&gt;
 root = OscoreSiteWrapper(root, server_credentials)&lt;br /&gt;
 args.bind = bind&lt;br /&gt;
 // Now we create a server context with arguments added&lt;br /&gt;
 asyncio.Task(server_context_from_arguments(root, args))&lt;br /&gt;
&lt;br /&gt;
USAGE: ./comatrix_gateway.py contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO How to add picture in &lt;br /&gt;
&lt;br /&gt;
To test if the gateway actually talks in OSCORE the plugtest-client from the aiocoap library was adjusted to meet our needs for comatrix.&lt;br /&gt;
&lt;br /&gt;
USAGE: ./unit-tests.py host contextdir&lt;br /&gt;
&lt;br /&gt;
// TODO Picture&lt;br /&gt;
&lt;br /&gt;
== Client ==&lt;br /&gt;
// Await docs&lt;br /&gt;
&lt;br /&gt;
== Used Hardware ==&lt;br /&gt;
&lt;br /&gt;
* Raspberry Pi 3B+ Model (CoMatrix Gateway)&lt;br /&gt;
* OpenLabs 802.15.4. radio module&lt;br /&gt;
* SAMR21-xpro (CoMatrix Client)&lt;br /&gt;
* Raspberry Pi 4 (Matrix Homeserver)&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* https://comatrix.eu&lt;br /&gt;
* https://aiocoap.readthedocs.io&lt;br /&gt;
* https://github.com/chrysn/liboscore&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>MArcilla</name></author>
	</entry>
</feed>