Pol Henarejos
dba614ed36
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:18:45 +01:00
Pol Henarejos
21b6a7782a
Add EdDSA support as a conditional build.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2025-02-21 20:20:43 +01:00
Pol Henarejos
c6b03e54ca
Fix TX/RX buffers to align them with USB buffers and avoid overflows.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-12-24 02:06:15 +01:00
Pol Henarejos
73232b6de4
Add LE/BE functions for uint16, 32 and 64.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-12-23 20:39:03 +01:00
Pol Henarejos
39a5af8649
Free hd_context if error.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-08-25 20:00:16 +02:00
Pol Henarejos
7cb0bbf982
Merge branch 'development' into esp32
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-06-03 13:06:39 +02:00
Pol Henarejos
35d5d5e94e
Use search_file() method.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-04-17 19:19:45 +02:00
Pol Henarejos
d6456b4dde
First attempt to add support to ESP32.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-04-08 19:41:39 +02:00
Pol Henarejos
c3b66773e8
Use new asn1 structs.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-03-13 18:11:28 +01:00
Pol Henarejos
9fad920c3b
Fix Windows emulation build.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-01-09 11:43:46 +01:00
Pol Henarejos
2b92d89ab7
Fix size_t casting.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2024-01-02 19:56:38 +01:00
Pol Henarejos
d82affa880
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:55:49 +01:00
Pol Henarejos
88ff27f354
Fix mbedTLS 3.5 build.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-11-06 17:01:27 +01:00
Pol Henarejos
f880ee6c93
Added support for HD symmetric ciphering.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-07-17 12:55:14 +02:00
Pol Henarejos
fe315e7326
Fix AES derivation (HKDF).
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-05-27 19:00:04 +02:00
Pol Henarejos
371ae93fcd
Added support for AES CCM.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-23 19:20:33 +01:00
Pol Henarejos
f5e875a6b7
Added support for AES CTR.
...
Note: the OID used by CTR does not exist.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-23 18:47:32 +01:00
Pol Henarejos
4d647ba3c8
Add sanity check if wrong oid is provided.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-22 23:28:55 +01:00
Pol Henarejos
008db87fa7
Fix AES XTS call.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-22 23:28:22 +01:00
Pol Henarejos
17560034ec
Fix AES extended encoding call.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-22 23:23:12 +01:00
Pol Henarejos
0990805fb6
More code style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-20 20:08:29 +01:00
Pol Henarejos
efba39adc5
Add SW_WRONG_DATA return on bad tag for Chachapoly.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-20 17:58:01 +01:00
Pol Henarejos
a69d06b2d9
Fixed chachapoly crypt algorithm.
...
It missed setkey function. So, no key was used at any moment.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-19 20:24:32 +01:00
Pol Henarejos
1c7bc18161
Added support for AES 512 bit key size.
...
AES XTS uses two keys. Therefore, XTS with 2 AES 256 implies 64 bytes key length.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-19 20:22:40 +01:00
Pol Henarejos
86ce01cac2
Added AES XTS via AES_EXT command.
...
Note that it requires 32 bytes or 64 bytes key length.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-19 19:42:37 +01:00
Pol Henarejos
9cb60ba420
Added AES ECB (insecure), CBC (with custom IV), OFB, CFB and GCM (with 16-byte tag) via AES_EXT command.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-19 19:34:34 +01:00
Pol Henarejos
fa60ed5049
Update code style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-03-04 14:05:51 +01:00
Pol Henarejos
20c01eb08d
Fix name of x963 function.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-17 23:54:06 +01:00
Pol Henarejos
420e55901c
Fix HMAC computation.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-17 22:43:09 +01:00
Pol Henarejos
7b62ca5327
Upgrade to mbedtls v3.3.0
2023-02-16 23:33:13 +01:00
Pol Henarejos
cd6e280f4f
Switching to new style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-15 00:10:35 +01:00
Pol Henarejos
daaa5bf402
Harmonize coding style.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-02-14 23:13:46 +01:00
Pol Henarejos
9793977ffc
Fixed double counter increment.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2023-01-12 20:04:05 +01:00
Pol Henarejos
4113f6a65d
Fix parsing PBKDF2 params.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-15 00:14:39 +01:00
Pol Henarejos
f98d744076
Add apdu.ne check for large buffers.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-14 18:04:44 +01:00
Pol Henarejos
aa8b1e6efe
Added support for X963 KDF.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-14 15:38:16 +01:00
Pol Henarejos
0cb2e8ec2e
Added PBES2 key derivation with encryption and decryption support.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-14 13:07:49 +01:00
Pol Henarejos
0e96753ccb
Added support for PBKDF2.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-14 12:01:27 +01:00
Pol Henarejos
2b2df22d75
Added support for configurable HKDF.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-14 10:14:54 +01:00
Pol Henarejos
6bf72e5a59
Added support for HMAC-SHA1, HMAC-SHA224, HMAC-SHA256, HMAC-SHA384 and HMAC-SHA512.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-08 17:26:32 +01:00
Pol Henarejos
a7682d2639
Adding Extended Cipher feature.
...
With this new subcommand, Pico HSM will support newer cipher algorithms.
ChaCha20-Poly1305 is the first. It will be based on a custom P2 subcommand to support an arbitrary structure with multiple parameters (AAD, IV, etc.)
pico-hsm-tool.py shall be used.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-11-07 21:37:11 +01:00
Pol Henarejos
62c72c48a5
Moving to new pico-hsm-sdk.
2022-08-30 17:55:42 +02:00
Pol Henarejos
aebb68724a
Removing trailing spaces.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-19 01:44:27 +02:00
Pol Henarejos
e6f082d512
Splitting cmd_xxx() functions in separate files.
...
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es >
2022-08-13 14:59:27 +02:00