-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Webpage description infinite web credentials? #82
Comments
This figure is orientative. For ESP32 it is fixed as it depends on a predefined partition. In Raspberry Pico it depends on the flash size. The larger, the more keys can host. The real number of avilable keys depends on the firmware size, information of the credentials and other parameters. But for a typical 4MB flash it can host thousands of resident keys. |
Ah I see. |
It is hard to say as it depends on the length of userId, the number of extensions and options or the rpId. Assuming that all string values are around 32 chars, without extensions, it spans around 224 bytes. There's room for the maximum credential length, which is 1024. |
Would it be possible to add something to the tooling so that at one could determine the amount of the current entries or percentage usage and the overall space still available? |
Yes, but it will show the free available space in Kb, not the number of available keys. |
Awesome. |
…" command. Fixes #82. Signed-off-by: Pol Henarejos <[email protected]>
I added it to pico-fido-tool. Note that, regardless the size of flash, the maximum number of resident credentials is Besides all of these numbers, I do not know how the overall system performs when all memory/files are occupied. If you will, you can check it. It will be released in v6.2 but you can try nightly development build. |
The limit of |
Ok. After glancing (very fast) at the fs implementation I guess the reason for this limitation is that you can not know how big the program will become and you somehow must make sure that a new program version is not overwriting the space of the fs. As nice as U2F is it will not protect against this. I am unsure if 256 entries will eventually become an issue. I think the Yubikeys only support 100 entries. It surely will not become an issue very soon. Maybe I leave some of my thoughts here for you to consider which includes just ignoring them. As you can not avoid that the program will eventually get bigger/too big we need to accept that it eventually might overwrite the fs. Users can be at least made aware of this e.g. by allowing the tooling to calculate if a new version would be a problem. The tool could check the latest github release and size and use this for the calculation. Maybe also showing which entries will be lost so that the user can prepare to register a different passkey before the update. |
This is a compromise. I don't know how big will be the firmware but I can have a barely idea. Currently it spans near 500 kB in the flash and I don't think it will increase very much unless I implement something bigger. So, assuming 1 MB of firmware is really conservative and probably very far from the future.
Except for RP2040, Instead of having a single partition to use the maximum space, I prefer having partitions to avoid problems like overlapping areas. With partitions, the data partition is never overwritten by the fw. So, no need for integrity check. The only problem about integrity could happen if a power cut happens between the clear and the program stages. When you want to write a block to flash, you first clear that region and then you program it. If a power cut happens in between, you'll clear but nothing will be stored. Usually, you only write the flash when you generate a key, so in this improbable case, you'd get an error and regenerate the key again. The only critical case is when you change the PIN in Pico HSM/OpenPGP since the data is encrypted using this PIN. But this is specific to a project and not to the hardware itself. In this sense, Pico Fido is safe. In this sense, I remark that for ESP32-S3 and RP2350 no overwrite will ever happen between data and firmware; and for RP2040 it will eventually become obsolete. The FS scheme is really rudimentary. It doesn't have anti-corruption mechanism, integrity checks or similar. The data is saved sequentially with a pair of pointers for previous-next entries, a header for permissions (rarely used BTW), type of file, type of access, the parent node (rarely used) and the pointer to the data. To summarize, there's a room to expand the number of supported keys by far without worries. It might penalize the performance, but nothing far from this. |
Ah I see. |
Hi,
might it be possible to elaborate on that a bit more detailed?
As I understood there is a physical limit for the number of resident keys of 256. Doesn't this mean that a pico-fido can then only store this amount of (discoverable) web credentials aka passkey logins? And if so, might larger flashs support even more?
I might have missunderstood some basic principles though.
Thanks.
The text was updated successfully, but these errors were encountered: