Commit Graph

22 Commits

Author SHA1 Message Date
Pol Henarejos
9ab9d96af5 Add base64url routines.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-21 17:09:51 +02:00
Pol Henarejos
26de18608f A refactor.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-20 17:34:42 +02:00
Pol Henarejos
7db11c21f6 Rename random functions.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-20 13:01:14 +02:00
Pol Henarejos
f76bc631d2 Add macros for PIN KDF.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-04-01 16:20:22 +02:00
Pol Henarejos
89a8042634 Added v2 for encryption utilities.
Version 1 derives an encryption key without dependence on OTP.
Version 2 derives an encryption key with dependence on OTP.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-03-19 18:11:53 +01:00
Pol Henarejos
56f4fca657 Move crc to crypto utils.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2026-01-29 16:02:44 +01:00
Pol Henarejos
8f907b25ba 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:06:16 +01:00
Pol Henarejos
233e6594c6 Add casts to fix warnings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-12 18:52:07 +02:00
Pol Henarejos
c165ae4838 Add set 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.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-10-08 00:30:41 +02:00
Pol Henarejos
5048e07f81 Add hash functions using OTP as feed when available.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-28 20:28:28 +02:00
Pol Henarejos
4edc506759 Fix build for non-pico boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2025-09-22 23:35:46 +02:00
Pol Henarejos
6625678c30 Rename CCID_ codes to PICOKEY_
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-11-05 18:21:24 +01:00
Pol Henarejos
65fea84df1 Fix warnings.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-08-23 13:17:10 +02:00
Pol Henarejos
8d86a8c56b Add procedure to compute unique ID at startup.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-15 23:44:51 +02:00
Pol Henarejos
49f05e9e13 Now it builds the image.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-04-05 17:57:56 +02:00
Pol Henarejos
a9dc6fd7f8 Added support for building emulation in Windows.
It has not been tested but it should not break any linux build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2024-01-01 01:54:49 +01:00
Pol Henarejos
d0dc786f74 Rename project to Pico Keys SDK to avoid confusions with Pico Fido and Pico OpenPGP.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-11-06 13:32:28 +01:00
Pol Henarejos
43ef33d60b Switching to new style.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-02-15 00:10:00 +01:00
Pol Henarejos
12bdcbd1f9 Harmonizing coding style.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-02-14 23:23:57 +01:00
Pol Henarejos
4919eb980f Added a major refactoring to include Emulated interface.
It works in combination with virtualsmarcard module (vpcd). It properly installed, it creates a virtual reader that can be interfaced via PCSC+vcpd. At user app level, it has no difference of having a physical smart card.

At this moment, it only works emulating a CCID interface.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2023-01-09 18:06:21 +01:00
Pol Henarejos
28170100cc Adding support for Curve25519 and Curve448.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-11-09 16:49:45 +01:00
Pol Henarejos
40288a85f1 It's a major reorganization.
In order to add FIDO2 support, we need to reorganize some USB/CCID calls to specific area (named driver).
Thus, pico-hsm-sdk has two drivers:
- CCID driver implements APDU over USB/CCID ISO-7816 standard procedures.
- HID driver implements APDU over HID.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-08-30 02:00:11 +02:00