819 Commits
Author SHA1 Message Date
Pol Henarejos 87cbaac98e Clean hardware sha256 state on free
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-22 00:48:00 +02:00
Pol Henarejos 4d2e6c25af Reconstruct query params from core1 job
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-21 17:59:09 +02:00
Pol Henarejos 01eadc39e9 Fix rp2350 build
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-21 17:58:53 +02:00
Pol Henarejos 5e2178adcb Fix connection ownership when dispatched.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-21 13:27:57 +02:00
Pol Henarejos 9eedb0ef8d PicoKeys SDK 9
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-17 18:47:09 +02:00
Pol Henarejos f4b2743599 Fix ESP build
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-17 18:46:24 +02:00
Pol Henarejos 3fdd3608ed Set anti-rollback to 5
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-17 17:29:24 +02:00
Pol Henarejos 512de8c947 Harden command chaining
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-14 20:01:58 +02:00
Pol Henarejos 7844361ad2 Reject unsupported secure-messaging class bytes
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-14 19:57:22 +02:00
Pol Henarejos 4bcdaad49b Report chained APDU overflow as wrong length
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-14 19:56:22 +02:00
Pol Henarejos f0d58025e1 Fix FS record publication ordering (#35).
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-14 00:05:59 +02:00
Pol Henarejos 9b23d4b42d Parse only usb packets of 64 bytes.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-10 14:47:09 +02:00
Pol Henarejos 0a572e2ce7 Fix INIT allocation to sequential indices.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-10 14:46:54 +02:00
Pol Henarejos 192d324434 Do not copy fw to ram, as it increases in size and does not fit anymore.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-10 14:45:53 +02:00
Pol Henarejos d5b98db16d Add time counting when pressing bootsel button.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-08 18:39:03 +02:00
Pol Henarejos c2f612318d Fix require presence for rescue.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-08 01:47:15 +02:00
Pol Henarejos a118d4c136 Add build to ignore.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-02 15:56:40 +02:00
Pol Henarejos 3ffbcbb43a Add default RGB order to RGB.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-08-02 15:56:31 +02:00
Pol Henarejos c9bc351fef fix: use size_t in secure message LE parsing 2026-07-30 14:18:27 +02:00
Pol Henarejos 6f8fd64754 Make emulation build cleanly with MSVC
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-29 19:08:14 +02:00
Pol Henarejos 48974a6e24 RP2040 has no OTP, so we keep otp ptr to NULL.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-29 18:57:56 +02:00
Pol Henarejos 95e7540424 Fix build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-27 11:52:44 +02:00
Pol Henarejos 843a3dc593 Make byte buffers track their current length
Add a length field to byte_buffer_t and change output APIs to accept
mutable buffer pointers.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-27 11:25:45 +02:00
Pol Henarejos 267e5819a4 Merge remote-tracking branch 'origin/main'
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-27 03:12:27 +02:00
Pol Henarejos 40375578c5 Use byte-array spans across SDK APIs
Add byte_array_t, const_byte_array_t, and byte_buffer_t and migrate project-owned pointer/length interfaces across crypto, storage, TLV, USB, REST, OTP, and APDU code.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-27 03:09:30 +02:00
Pol Henarejos 749534369a Add object store tests.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-26 22:19:31 +02:00
Pol Henarejos a24137a2b8 Add reusable object container store lifecycle
Centralize A/B recovery, protected record I/O, updates, deletion, and lifecycle tests.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-26 20:45:49 +02:00
Pol Henarejos 9e39374f42 Make emulator CCID connectivity optional
Allow HID emulation without a vpcd listener and provide an explicit CCID opt-out for isolated tests.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-26 20:07:55 +02:00
Pol Henarejos e3ade9854d Support separate roots for public object integrity
Use an optional device-bound root for manifests and authenticated-public records

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-18 00:32:10 +02:00
Pol Henarejos b68cc7cfb6 Enforce HSM object policy when opening v1 private key material
Require verified PIN, SO/admin, or isolated firmware authorization without migrating legacy keys

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 23:16:18 +02:00
Pol Henarejos 5f4032fdfa Add bounded object-policy evaluation to the SDK
Validate operations, authorization facts, namespaces and session epochs with default-deny tests

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 22:14:38 +02:00
Pol Henarejos 5e2c0336d1 Add object_crypto_provider.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 19:31:19 +02:00
Pol Henarejos 0e864797cf Add provider-backed object record protection
Bind PKOR data to policy and identity with durable 64-bit record allocation

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 18:23:34 +02:00
Pol Henarejos 5da7212f39 Add bounded authenticated object container codec
Validate PKOC manifests and PKOR headers with 64-bit record identities

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 18:02:58 +02:00
Pol Henarejos 9056036bf4 Add authenticated atomic object transactions
Use double-slot records and commits with fault-injection recovery tests

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 16:42:30 +02:00
Pol Henarejos 93aa22703a Add namespace-aware opaque handles for stored objects
Detect stale generations and add identity, deletion, and capacity tests

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 15:41:34 +02:00
Pol Henarejos e21c098fc0 Add versioned filesystem object envelope API
Support strict object headers, generation tracking, bounded payload reads, and commit-aware metadata deletion while retaining optional legacy-object access.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-17 14:04:45 +02:00
Pol Henarejos 4390947b87 Support multi-sector flash files with 32-bit lengths and cache draining
Add boundary, large-write, readback, overwrite, and truncation stress tests

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 21:30:59 +02:00
Pol Henarejos e740b7be7d Fix esp32 build
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 21:29:32 +02:00
Pol Henarejos 5f3bfaf4a1 Rename file_metadata to file_static_entry to avoid confusion with EF_META.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 20:40:04 +02:00
Pol Henarejos c8e90824ae Expand dynamic file index to 2048 entries
Use a compact open-addressed hash table for fast lookup, stable deletion, and tombstone reuse without changing the flash format.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 20:37:35 +02:00
Pol Henarejos 31b4db939c Not necessary enter and leave since mutex stays held from the begining.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 01:36:39 +02:00
Pol Henarejos e4bad7453a RP2350 secure-boot key indices are restricted to slots 0..5 before OTP address/bit calculations.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-16 01:01:18 +02:00
Pol Henarejos 9d7fb8bd61 Rejected empty/misaligned secure-message ciphertext and bounded secure-message response/MAC buffers
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-15 22:36:51 +02:00
Pol Henarejos 09c61abe2d Fixed extended-APDU length arithmetic, chained final-fragment overflow, and stale GET RESPONSE continuation handling
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-15 22:36:32 +02:00
Pol Henarejos 5a56cebb22 Fix serial in CI builds.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-15 01:34:09 +02:00
Pol Henarejos 38079c3fef Add support for external device id for CI.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-14 16:10:02 +02:00
Pol Henarejos 1251b1e63a Merge remote-tracking branch 'origin/main' 2026-07-14 11:44:20 +02:00
Pol Henarejos a7991e0b5f Unpack lv_data and ec_curve_mbed_id.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-14 11:44:09 +02:00
Pol Henarejos b0c7faee9c Add board_millis for emulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-07-14 01:30:42 +02:00