Commit Graph

428 Commits

Author SHA1 Message Date
Pol Henarejos
a59cdef8e6 Merge branch 'main' into development
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>

# Conflicts:
#	pico-keys-sdk
2025-10-26 20:12:26 +01:00
Pol Henarejos
d4f2d04487 Relicense project under the GNU Affero General Public License v3 (AGPLv3)
and add the Enterprise / Commercial licensing option.

Main changes:
- Replace GPLv3 headers with AGPLv3 headers in source files.
- Update LICENSE file to the full AGPLv3 text.
- Add ENTERPRISE.md describing the dual-licensing model:
  * Community Edition: AGPLv3 (strong copyleft, including network use).
  * Enterprise / Commercial Edition: proprietary license for production /
    multi-user / OEM use without the obligation to disclose derivative code.
- Update README with a new "License and Commercial Use" section pointing to
  ENTERPRISE.md and clarifying how companies can obtain a commercial license.

Why this change:
- AGPLv3 ensures that modified versions offered as a service or deployed
  in production environments must provide corresponding source code.
- The Enterprise / Commercial edition provides organizations with an
  alternative proprietary license that allows internal, large-scale, or OEM
  use (bulk provisioning, policy enforcement, inventory / revocation,
  custom attestation, signed builds) without AGPL disclosure obligations.

This commit formally marks the first release that is dual-licensed:
AGPLv3 for the Community Edition and a proprietary commercial license
for Enterprise customers.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-26 20:10:06 +01:00
Pol Henarejos
6b93938040 Fix warnings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-12 18:56:14 +02:00
Pol Henarejos
898c88dc6d Migration to the new system of secure functions to derive keys based on OTP, if available, and pico_serial as a fallback. PIN is also an input vector, which defines a separated domain.
PIN is used to derive encryption key, derive session key and derive verifier. From session key is derived encryption key. As a consequence, MKEK functionalities are not necessary anymore, since key device is handled by this new set directly. Some MKEK functions are left for compatibility purposes and for the silent migration to new format.  It also applies for double_hash_pin and hash_multi, which are deprecated.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-08 00:33:23 +02:00
Pol Henarejos
d424f0dea7 Add sanity check.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-07 21:11:50 +02:00
Pol Henarejos
6c85421eca Using new PIN format.
Now, PIN uses OTP as a seed to avoid memory dumps, when available (RP2350 / ESP32).

Related with #187.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-28 20:28:04 +02:00
Pol Henarejos
3e9d1a4eb4 Fix silent authentication with resident keys.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-28 00:05:25 +02:00
Pol Henarejos
c6dba5df43 Fix silent authentication with new resident key system.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-27 23:52:08 +02:00
Pol Henarejos
eae22a97fb Fix conditional build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-23 17:17:01 +02:00
Pol Henarejos
665f029593 Fix build for non-pico boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-22 23:41:55 +02:00
Pol Henarejos
b25e4bed6c Fix build for non-pico boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-22 23:35:55 +02:00
Pol Henarejos
56b6b4a8b9 Vendor Config cmds have to be < 0x8000000000000000
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-21 01:23:02 +02:00
Pol Henarejos
9b254a0738 Add support to PIN POLICY URL via VendorConfig.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 19:20:20 +02:00
Pol Henarejos
e4f8caa1ba Add VendorConfig upload EA command to get_info().
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 18:20:36 +02:00
Pol Henarejos
7e720e8c23 Enable enterprise attestation through VendorConfig.
Add a subcommand to enable through pico-tool.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 12:56:02 +02:00
Pol Henarejos
b3b3a5eecc Add other PHY commands to get_info().
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 12:23:45 +02:00
Pol Henarejos
6b636d0bf4 Fix CMD_CONFIG with VendorCmd.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 12:13:44 +02:00
Pol Henarejos
54fb02995f Add 4 pseudorandom bytes to allow indexing used by some RP entities.
Fixes #185

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-11 11:31:45 +02:00
Pol Henarejos
56d5c61044 Add compatibility of old resident key system with the new one.
Related to #184.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-06 19:14:27 +02:00
Pol Henarejos
1ac628d241 Major refactor on resident keys.
Now, credential ids have shorter and fixed length (40) to avoid issues with some servers, which have maximum credential id length constraints.

Fixes #184

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-04 21:57:53 +02:00
Pol Henarejos
48cc417546 Added support for Brainpool curves and Ed448.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-02 15:49:39 +02:00
Pol Henarejos
351242d377 Fix build for ESP.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-01 21:27:53 +02:00
Pol Henarejos
3fe3a9d2ec Fix build for emulation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-01 20:50:44 +02:00
Pol Henarejos
35a043f261 Fix automatic build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-01 20:41:23 +02:00
Pol Henarejos
44c5ad4adb Some VIDs do not support VENDOR_CONFIG values.
Fixes #172.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-01 20:38:07 +02:00
Pol Henarejos
f7ba3eec38 Fix crash APDU with CBOR.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-29 01:19:54 +02:00
Pol Henarejos
292a9e8d8a Add support for hmac-secret-mc extension.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-28 01:04:09 +02:00
Pol Henarejos
73a7856866 Add support for persistentPinUvAuthToken.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-28 00:17:57 +02:00
Pol Henarejos
2b640a5c36 Add support for FIDO 2.2
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-27 12:51:34 +02:00
Pol Henarejos
bf1072781b Fix build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-25 01:42:24 +02:00
Pol Henarejos
5facbf61cd NK compatibility improvements.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-08-25 01:34:34 +02:00
Pol Henarejos
be2ab59cd1 Fix ESP32 build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-06-22 20:12:08 +02:00
Pol Henarejos
9c28f72d17 Merge branch 'development' 2025-06-22 18:00:08 +02:00
Pol Henarejos
9b75c5c175 Check OpenPGP and PIV dynamically as it can be loaded separately.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-05-25 19:07:52 +02:00
Pol Henarejos
513642663b Move PRODUCT def to another file.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-05-24 14:49:15 +02:00
Pol Henarejos
e4ed703b6b Rename scan_files to scan_files_fido
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-05-24 14:25:33 +02:00
Pol Henarejos
91aaee5beb Force 8-digit serial number
Fixes #149.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-05-19 10:01:07 +02:00
Pol Henarejos
cfe1321d62 Upgrade to v6.6
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-04-10 18:37:48 +02:00
Pol Henarejos
b6bf2e6c66 Do not update CFG_FLAGS if slot is ChalResp.
Fixes #142

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-04-10 16:23:20 +02:00
Pol Henarejos
3212f95915 Fixes update OTP when LT_CHAL is enabled.
Fixes #141.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-04-08 18:59:50 +02:00
Pol Henarejos
c3ea413592 Do not return extensions if they are not requested OR are false.
Fixes #136

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-30 19:32:25 +02:00
Pol Henarejos
64f371e6e5 Despite it is described in the spec 2.1, do not return epAtt if is false, return only when it's true. It fixes a bug with Firefox and Linux that blocked the possibility to make credentials.
Fixes #129.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-30 18:13:58 +02:00
Pol Henarejos
fef46dc1c5 OATH Rename requires security validation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-23 23:55:50 +01:00
Pol Henarejos
23a45ac297 Rename returns error if new credential name is equal to previous.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-23 23:51:21 +01:00
Pol Henarejos
b152ff15a8 Fix challenge length calculation for LT64.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-23 23:27:52 +01:00
Pol Henarejos
751fcf0538 Fix HMAC-SHA1 calculation.
Fixes #127.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-23 23:13:21 +01:00
Pol Henarejos
4e4c28a479 Fix CONFIG_TOUCH status report.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-23 22:44:35 +01:00
Pol Henarejos
23b60beb2e When OTP interface is disabled, it also disables KEYBOARD interface to avoid incompatibilities with smart phones.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-22 23:26:19 +01:00
Pol Henarejos
37d7d7faeb OTP can flow through FIDO interface as a report type 3.
Fixes #123.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-19 19:05:06 +01:00
Pol Henarejos
49c0179ccf Fix swap files.
When a dynamic file is deleted, all scoped references to other dynamic files are invalidated.

Fixes #124

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-03-19 13:33:35 +01:00