Commit Graph
184 Commits
Author SHA1 Message Date
Sosthène Guédon 7f98a71903 Improve speed of PIN validation
PIN validation on windows needs to be faster than 750ms.
The decryption operation of the user private key over HPKE is pretty slow

This PR moves this operation to future steps that need access to the key.
It's mostly moving the cost to later, non time-sensitive operations, but it also
saves computation for operations that need to be authenticated but don't need access to the key
2025-05-28 09:45:08 +02:00
Sosthène Guédonandsosthene-nitrokey 43fbc6211b Use callback-based API for UseValidKey 2025-05-28 09:44:46 +02:00
Sosthène Guédonandsosthene-nitrokey 7794d1e0ca Fix missing clear calls on UseValidKey
Fix https://github.com/trussed-dev/piv-authenticator/issues/29

I wish for a lint that can warn against any use of drop for a type
2025-05-28 09:44:46 +02:00
Sosthène Guédonandsosthene-nitrokey f840979162 Fix key history object
It should only count keys that are retired.

Also, off-card key certs are also not supported and therefore never counted
2025-04-29 14:27:22 +02:00
Sosthène Guédonandsosthene-nitrokey 9990a884e2 Add tests for ResetRetryCounter and fix it
Previously when using the PUK the user key was not  restored which
leads to failure when attempting to then perform pin-protected operations
since the user key would fail to decrypt the private keys.
2025-04-24 15:29:41 +02:00
Sosthène Guédonandsosthene-nitrokey 732b4fd973 Fix supported cryptographic algorithms list 2025-03-14 11:32:34 +01:00
Sosthène Guédonandsosthene-nitrokey d9d9cf2696 Comment out unusued algorithm IDs 2025-03-14 11:32:34 +01:00
Sosthène Guédonandsosthene-nitrokey 9bde6956ef Add RSA3072 algorithm 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey ce32d0b9db Add support for p384 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey e0ab337339 Fix review comments 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey b8a496f67c Fix clippy warnings 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey dcfc7b1686 Add command-response tests for mutual auth and bad keys 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey d12f1d06c4 Use debug instead of error for non-fatal logs 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 009ce99320 Fix tests 2025-03-06 09:55:34 +01:00
Robin Krahlandsosthene-nitrokey 809800224b Use trussed-core 2025-03-06 09:55:34 +01:00
Robin Krahlandsosthene-nitrokey 4fc8f32ce1 Update littlefs2 to v0.5.0 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 370d724b6b Remove usbip example and fix compilation with all features 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey dc41df2f20 Allow factory-reset when the state fails to load 2025-03-06 09:55:34 +01:00
Robin Krahlandsosthene-nitrokey 4deca70ec2 Use apdu-app instead of apdu-dispatch 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 04ba13f7c2 Return error instead of crash when the PIN is wrong 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 563fcafd00 Properly clear rather than delete keys 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 5ff9e592ec Add ecdh tests for multiple keys including unprotected ones 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey 433313a837 Add test for signature with multiple keys (including unprotected ones) 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey f6e46ef10d Remove unused derp module 2025-03-06 09:55:34 +01:00
Sosthène Guédonandsosthene-nitrokey bfcb406215 Fix clippy warnings 2025-03-06 09:55:34 +01:00