This saves a lot of memory since each directory takes at least one block
We are starting to see this as an issue because the filesystems are now
much deeper due to the SE050
This structure is meant to be used with the attestation feature,
It is therefore unused, and unuseable due to a missing contructor and
being commented out in the `TbsCertificate` struct
If needed we can add it back in the future.
Most key deletions are for volatile public keys (temporary keys for FIDO pin protocol, PIN keys from trussed-auth etc...).
In any cases, persistent keys are more rarely deleted, and volatile is the fastest storage,
so it being first is overall a performance improvement.
I think long term (once we have the builder-pattern based syscall implementation maybe?)
we should add optional location and secrecy arguments to the syscall. It is rare that the caller
would not know the kind of key it is deleting.
Backends can be activated at runtime depending on the configuration or
execution environment. This patch adds an OptionalBackend wrapper that
implements Backend and ExtensionImpl but returns a RequestNotAvailable
error if the inner backend is not set.
In fido-authenticator, if we change the paths of RK to be:
"rp_id.rk_id" instead of the current "rp_id/rk_id", we still want to be able
to iterate over the keys even though we only know the "rp_id" and not the
"rk_id". Therefore we need to be able to stop at "rp_id.***" when giving "rp_id" in `not_before`
This is technically a breaking change because now, given the files:
- "aaa"
- "aaabbb"
"read_dir_first" with "aaa" as `not_before` would only yield "aaa"
due to https://github.com/littlefs-project/littlefs/issues/923.
Now this will yield both files, and yield "aaabbb" first.
I beleive this behaviour is technically more correct as it is likely what
would be expected to be yield expecting alphabetical order
(though the order of the entries is still incorrect).
CounterClient and CryptoClient::attest are not currently used by the
solo2 or nk3 firmwares, but due to the indirect dispatch of Trussed
requests, they cannot be optimized out by the linker. This patch
introduces feature flags for these syscalls that are enabled by default.
This can be useful for backends which can use it to encode additional information inside of the KeyId itself (128 bits is a lot)
This is already possible to acheive through the serde implementation, so this doesn't really add any unavailable functionality.
This patch adds a rename syscall to the FilesystemClient that allows
applications to move a file within the same storage location and within
the client namespace.
This syscall does the same as `delete` for a key.
The only difference is that it is designed to allow re-import of the key
if it was exported with `WrapKey`.
With the core trussed backend this does not change anything, as nothing is needed to
allow the re-import. However the same mechansim in the SE050 work differently, and
being able to differenciate permanent deletion and deletion with intent to re-import is crucial.
Similar to 5af424e7ec, this patch updates
the `keystore` method to be able to create a keystore with a custom path.
This can be useful for backends that want to have a keystore distinct from
the core one.