Skip to main content
Challenges Matter QR onboarding payload
IoT Medium IoT standards: decoding a Matter Base38 QR code, its bit fields and TLV tags Solves: 11

Matter QR onboarding payload

Author: CyberSamSU
Points
40

A list of Matter commissioning QR strings was copied from the packaging labels of smart home devices in a warehouse: onboarding.txt. Each string consists of a Base38-encoded byte stream with the MT:... prefix (Matter Core Specification 5.1.3 and 5.1.4).

1. The Base38 rule: Alphabet: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. (38 characters, 0..37). Every 5 Base38 characters represent a 3-byte little-endian (LE) integer, the 4 characters left at the end represent a 2-byte LE number, and 2 characters represent 1 byte (in each group the first character is the least significant place: v = c0 + c1*38 + c2*38^2 + ...).

2. 88-bit (11-byte) bit fields (LSB-first): The first 11 bytes decoded (88 bits, starting from bit 0) are laid out in the following order:
• Version: 3 bits (must be 0)
• Vendor ID: 16 bits (SamSU SmartHome identifier = 0x1337)
• Product ID: 16 bits
• Custom Flow: 2 bits (custom flow = 2)
• Discovery Capabilities: an 8-bit bitmask (the BLE bit — 0x04 must be set)
• Discriminator: 12 bits
• Passcode: 27 bits
• Padding: 4 bits (must be 0)

3. Optional Matter TLV data (after byte 11): Between 0x15 (the start of the Structure) and 0x18 (its end) are the 0x2C <tag: 1 bayt> <len: 1 bayt> <UTF-8 satr> elements. From the list, find the device that satisfies all the bit conditions above (VendorID=0x1337, CustomFlow=2, DiscoveryCaps & 0x04 != 0, Padding=0) and take BAYROQ{...} from its 0x82 (active provisioning token) TLV tag (do not be fooled by the 0x80 test tag!). (Flag format: BAYROQ{MATTER_QR_<16 kichik hex>}).

Attached files
onboarding.txt Log in to download
Hints 3
Opening a hint reduces the points you get for solving this challenge.
Hint 1 −4 pts Log in
Hint 2 −8 pts Log in
Hint 3 −12 pts Log in
To submit a flag, log in.

First solvers

1. Mirjaxon Qaxxarov 24.11.2026
2. Asmaa Mottery 25.11.2026
3. Odam 25.11.2026
4. Alex 27.11.2026
5. Andrei Mileshkin 27.11.2026
6. kkkkkk 27.11.2026
7. Гек 27.11.2026
8. Anna Zhig 27.11.2026
9. Gleb Zhuravlev 27.11.2026
10. leshiy 27.11.2026