Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for HID report sizes != 64 bytes #165

Closed
fmeum opened this issue May 2, 2020 · 4 comments
Closed

Implement support for HID report sizes != 64 bytes #165

fmeum opened this issue May 2, 2020 · 4 comments
Labels
feature request New feature or request

Comments

@fmeum
Copy link
Contributor

fmeum commented May 2, 2020

Describe the feature you would like.
The U2F/CTAPHID specs allow FIDO devices to use any HID report size, not just the very common value 64 bytes. The report size can be extracted from the HID report descriptor, which has to be parsed anyway to determine whether the device declares the FIDO usage (page).

Currently, libfido2 assumes that all FIDO devices understand HID reports of size 64 bytes, which e.g. is not the case with WearAuthn and in general limits the (underexplored) design space for Bluetooth HID authenticators. I would like to see libfido2 become fully spec compliant and support any (sensible) report size, as do the Windows 10 and Chrome implementations.

Describe the impact to existing functionality.
This new feature can be implemented in a backwards compatible manner. If the HID report descriptor cannot be parsed correctly, the implementation would fall back to the default 64 bytes. Fuzzing and tests could also easily be extended to cover arbitrary report sizes.

Describe how you are willing to help.
If it is reasonably likely that a PR adding this functionality, accompanied by tests and fuzzer integration, will be accepted, I would gladly start working on it.

@fmeum fmeum added the feature request New feature or request label May 2, 2020
@martelletto
Copy link
Contributor

Hi,

CC'ing @James-ZHANG, who might be interested in this.

A PR implementing this feature, in the lines described (tests, fuzzer integration), and without adding much complexity to existing code, would definitely be welcome. I unfortunately lack the time to work on it myself, but please count on me for help and support.

-p.

@fmeum
Copy link
Contributor Author

fmeum commented May 4, 2020

I found code style and in particular use of whitespace to be rather inconsistent between (and sometimes within) files. Is there an official policy on this or should I try to preserve the existing local structure as far as possible?

@martelletto
Copy link
Contributor

Hi,

We try to abide by https://man.openbsd.org/style.

-p.

@martelletto
Copy link
Contributor

Implemented in #172, #173, #180, and #182.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Development

No branches or pull requests

2 participants