327 Commits

Author SHA1 Message Date
Robin Krahl 4477192edb Update trussed
Fixes: https://github.com/trussed-dev/fido-authenticator/issues/58
2026-06-03 09:29:15 +02:00
Robin Krahl 9fa9c6d1d9 Reduce number of generated tests
This patch selects the test cases to run more carefully to reduce the
test execution time. Instead of testing all possible combinations in
one test case, the patch splits the tests into multiple test cases
where each test case covers one field exhaustively. The other fields
are either limited to all sensible values (if they seem relevant) or
chosen randomly (if they don’t seem relevant).
2026-06-02 23:17:39 +02:00
Robin Krahl bb39a18058 Release v0.4.0-rc.3 v0.4.0-rc.3 2026-06-01 17:38:10 +02:00
Emanuele Cesena 0084256898 ctap2: refactor make_credential / get_assertion to take &mut Response 2026-06-01 17:38:06 +02:00
Robin Krahl 4c38096af6 Release v0.4.0-rc.2 v0.4.0-rc.2 2026-06-01 13:26:12 +02:00
Robin Krahl f82effbf79 Make firmware version configurable depending on credential ID version 2026-06-01 13:26:07 +02:00
Robin Krahl 595629c9a5 Add CredentialIdVersion::V2 using AES-256-GCM 2026-06-01 13:26:02 +02:00
Robin Krahl b7becd0020 Make credential ID version configurable
This patch adds the credential_id_version field to Config, making it
possible to select the credential ID version for new credentials. To
avoid invalidating existing credentials, this value is only used on the
first boot or after a factory reset.
2026-06-01 13:18:44 +02:00
Robin Krahl 804588adbc Introduce CredentialIdVersion enum
Currently, the credential encoding and decoding is located in different
parts of the codebase. This patch introduces the CredentialIdVersion to
unify all relevant code in one place. It also introduces the
KeyEncryptionKey and KeyWrappingKey helper types to ensure that these
keys are only used for the designated steps and cannot be confused with
any other key.
2026-06-01 13:10:49 +02:00
Robin Krahl 92f3642345 Add tests for signature counter 2026-05-31 17:00:48 +02:00
Robin Krahl 95461d90ee Increment signature counter by a random number
As defined in Requirement 2.3.2 of the Security Requirements v1.5, we
have to use a random (positive) increment for a global signature
counter. This patch uses a random u8 + 1. As the signature counter is a
u32, this still gives us more than 16 million operations until the
counter can potentially overflow.
2026-05-31 15:11:24 +02:00
Robin Krahl a3ee89d091 Handle signature counter overflows
As described in Requirement 2.3.2 of the Security Requirements v1.5, a
signature counter value of zero indicates an error. If the authenticator
returns zero once, it may not return a non-zero value in subsequent
calls, so we have to stay in the error state if an overflow occurs.
2026-05-31 15:03:59 +02:00
Robin Krahl 731668e87a Set initial signature counter to 1
Returning the signature counter 0 would indicate that we don’t support
signature counters or that a counter error occured.
2026-05-31 14:58:45 +02:00
Robin Krahl 3187df78a8 Use explicit reset value for persistent state
This ensures that all fields are reset and makes it possible to use a
custom reset value that is different than the Default implementation.
2026-05-31 14:55:47 +02:00
Robin Krahl bafca338a2 make_credential: Increment signature counter only once 2026-05-31 14:46:46 +02:00
Robin Krahl 30c37bf412 Rename timestamp to signature_counter 2026-05-31 14:40:56 +02:00
Robin Krahl e87b61f03d Release v0.4.0-rc.1 v0.4.0-rc.1 2026-05-29 11:10:55 +02:00
Emanuele Cesena de69cd1ffc ctap2: accept up=true on MakeCredential; LargeBlobs Set accepts both PIN protocols 2026-05-28 22:56:20 +02:00
Emanuele Cesena 61326c4d61 ctap2.3: Reset clears all §6.7 feature flags 2026-05-28 22:56:11 +02:00
Emanuele Cesena d64976c5da ctap2.3: getinfo advertises FIDO_2_3 2026-05-28 22:56:08 +02:00
Emanuele Cesena e91fb4779f ctap2.3: advertise smart-card transport when CCID is enabled 2026-05-28 22:07:03 +02:00
Emanuele Cesena bcec723f1b ctap2.2: implement hmac-secret-mc extension at MakeCredential time
Fixes: https://github.com/trussed-dev/fido-authenticator/issues/52
2026-05-28 21:58:18 +02:00
Emanuele Cesena a7e869b8c5 ctap2.1: test user field in RK allowlist GetAssertion response 2026-05-28 19:24:40 +02:00
Emanuele Cesena e3c79dfd85 ctap2.1: §6.5.5 PIN management — code-point validation + reject same-PIN under forcePINChange + align setPin/getPinToken error codes
Fixes: https://github.com/trussed-dev/fido-authenticator/issues/43
2026-05-28 19:23:29 +02:00
Emanuele Cesena 96a96316f0 ctap2.1: alwaysUv + toggleAlwaysUv (CTAP 2.1 §6.4, §6.11.2, §7.2) — full implementation 2026-05-28 19:11:04 +02:00