{"id":35447846,"url":"https://github.com/anssi-fr/usb_authentication","last_synced_at":"2026-01-03T02:03:34.462Z","repository":{"id":300179144,"uuid":"966631494","full_name":"ANSSI-FR/usb_authentication","owner":"ANSSI-FR","description":"Home of the USB Authentication project.  USB authentication allows for a USB Host to authenticate a USB device.","archived":false,"fork":false,"pushed_at":"2025-07-11T08:37:49.000Z","size":86,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-11T11:46:24.596Z","etag":null,"topics":["authentication","kernel","linux","qemu","usb"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ANSSI-FR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-15T08:08:34.000Z","updated_at":"2025-07-11T08:37:52.000Z","dependencies_parsed_at":"2025-06-20T09:22:19.214Z","dependency_job_id":"27a11eff-873d-43f1-ae22-347013c1d7f5","html_url":"https://github.com/ANSSI-FR/usb_authentication","commit_stats":null,"previous_names":["anssi-fr/usb_authentication"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ANSSI-FR/usb_authentication","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSSI-FR%2Fusb_authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSSI-FR%2Fusb_authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSSI-FR%2Fusb_authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSSI-FR%2Fusb_authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ANSSI-FR","download_url":"https://codeload.github.com/ANSSI-FR/usb_authentication/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ANSSI-FR%2Fusb_authentication/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28182371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-03T02:00:06.471Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","kernel","linux","qemu","usb"],"created_at":"2026-01-03T02:02:43.540Z","updated_at":"2026-01-03T02:03:34.457Z","avatar_url":"https://github.com/ANSSI-FR.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# USB Authentication\n\nThis repository is the home of the USB Authentication project.\n\nUSB authentication allows for a USB Host to authenticate a USB device.\n\nThe protocol is defined in:\n- [Universal Serial Bus Security Specification, rev 1.0 with ECN 219](https://www.usb.org/document-library/usb-authentication-specification-rev-10-ecn-and-errata-through-january-7-2019)\n- Universal Serial Bus Type-C Authentication Specification, rev 1.0 with ECN 2019\n\nIt concerns both Power Delivery devices and USB peripherals.\n\nThe project contains the following subprojects:\n\n- Linux kernel host implementation and a userspace policy engine\n- QEMU device implementation\n- A tool to create a simple test PKI\n\nThe entirety of this work is released under the GPL-2.0 license.\n\n## How to build?\n\n### Dependencies\n\n- virtme-ng\n- podman\n- make\n- libnl-genl-3\n\n### Makefile\n\nThe testbed Makefile defines three commands.\n\nThe `build` command builds a podman container embedding every dependencies to\ncompile Qemu, the Linux kernel and the demo policy engine. It builds a virtme-ng\nmicro-vm that can be executed with the `run` command.\n\nThe `test` commands runs the micro-vm and executes the policy engine to start\nauthentication of a qemu-emulated authenticated USB device.\n\nIf everything works as supposed, device authentication debug logs should appear\nand end with the `device has been authorized` message. \n\nSince the authenticated emulated qemu device does not implement a fully working\ndevice the following messages will then appear :\n\n```\nusbhid 1-1:1.0: can't add hid device: -32\nusbhid 1-1:1.0: probe with driver usbhid failed with error -32\n```\n\nThe test environment has been tested on Archlinux, Debian 12 and Fedora 42.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanssi-fr%2Fusb_authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanssi-fr%2Fusb_authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanssi-fr%2Fusb_authentication/lists"}