Add U2F (FIDO U2F-over-HID) as a Scapy contrib protocol layer#36
Draft
Copilot wants to merge 1 commit into
Draft
Add U2F (FIDO U2F-over-HID) as a Scapy contrib protocol layer#36Copilot wants to merge 1 commit into
Copilot wants to merge 1 commit into
Conversation
Agent-Logs-Url: https://github.com/polybassa/scapy-1/sessions/2eccc377-9d89-4047-a17c-1fcdfee95dfd Co-authored-by: polybassa <1676055+polybassa@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
polybassa
May 25, 2026 19:55
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new contrib implementation for the U2F protocol, focused on U2F HID framing and core command payload parsing. It enables Scapy to build/dissect U2F initialization, continuation, error/lock flows, and MSG-carried U2F APDU payloads.
New contrib layer:
scapy.contrib.u2fU2FHID(dispatcher)U2FHIDInit(init frame)U2FHIDCont(continuation frame)Command-specific payload decoding
U2FHIDInitReq(nonce request)U2FHIDInitResp(channel/version/capability response)U2FHIDLockU2FHIDErrorU2FHIDInit(INIT,LOCK,ERROR,MSG).U2F message payload support
U2FAPDUforCMD_MSGcontent:cla,ins,p1,p2,lc, and length-bounddataREGISTER,AUTHENTICATE,VERSION).Contrib campaign coverage
test/contrib/u2f.utswith focused build/dissect roundtrip checks for init request/response, error frame, APDU message frame, and continuation frame parsing.