Defer RSA, ECDH, and handshake completion until after each received packet
has been added to the authentication transcript, matching the upstream
workqueue ordering and preventing the controller from rejecting host secret.
Co-Authored-By: openai/gpt-5.6-luna: fixed GIP authentication ordering
Log incoming and outgoing authentication context, command, option, and
length fields to isolate the handshake failure before input reports begin.
Co-Authored-By: openai/gpt-5.6-luna: added authentication diagnostics
Port the GIP protocol and authentication layers from medusalix/xone
into the C++ stack:
- crypto: SHA-256/HMAC (CommonCrypto), RSA PKCS#1 (Security.framework),
and a self-contained P-256 ECDH validated against OpenSSL vectors
- auth: v1 (RSA) and v2 (ECDH) handshake state machine
- gip: header/varint/chunk handling and packet dispatch, with the kernel
device model replaced by transport + client_listener interfaces
Adds test_crypto, test_auth, and test_gip suites.
Co-Authored-By: deepseek (deepseek/deepseek-v4-pro-0813): ported crypto, auth, and GIP
Add the CMake build for the Swift + C++ macOS port, mirroring the
refix layout: deps/ modules (Platform, Flags, Sanitizers, FindUnity),
per-module static libraries (usb, auth, mt76, gip, hid, api), a Swift
app entry point with a pure C bridge header, and a Unity test suite
behind BUILD_TESTING.
Swift requires the Ninja or Xcode generator; a guard in
CMakeLists.txt rejects anything else.
Co-Authored-By: qwen (qwen/qwen3.8-27b@q2_k_xl): scaffolded CMake build + tests