Skip to main content

Module hid_descriptor

Module hid_descriptor 

Source
Expand description

HID report descriptor for the mini-HSM.

The descriptor declares a vendor-defined usage page (0xFF00) with one 128-byte IN report and one 128-byte OUT report. This is the same shape as a FIDO/U2F device (just with a larger report size), which keeps host-side support universal across Linux, macOS, and Windows: no kernel driver, no admin privileges, just hidapi or equivalent.

Byte breakdown:

06 00 FF       Usage Page (Vendor Defined 0xFF00)
09 01          Usage (Vendor Usage 1)
A1 01          Collection (Application)
09 20            Usage (Vendor Usage 0x20)         [for IN reports]
15 00            Logical Minimum (0)
26 FF 00         Logical Maximum (255)
75 08            Report Size (8 bits)
95 80            Report Count (128)
81 02            Input (Data, Variable, Absolute)
09 21            Usage (Vendor Usage 0x21)         [for OUT reports]
15 00            Logical Minimum (0)
26 FF 00         Logical Maximum (255)
75 08            Report Size (8 bits)
95 80            Report Count (128)
91 02            Output (Data, Variable, Absolute)
C0             End Collection

Reference: the FIDO U2F HID descriptor in https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-hid-protocol-v1.2-ps-20170411.html, section “HID Report Descriptor and Device Identification”. The U2F spec uses 64-byte reports; we bump that to 128 so a single ECDSA P-256 signature or public key fits in one report.

Constants§

HID_REPORT_DESCRIPTOR
HID report descriptor, exactly as sent to the host during USB enumeration.