Commit Graph

207 Commits

Author SHA1 Message Date
Pol Henarejos
d12d18261f
Changing name of generic pico.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-27 12:26:35 +02:00
Pol Henarejos
525b4439c9
Update README.md 2022-03-25 16:56:53 +01:00
Pol Henarejos
43ec92ddc5
Added script to build all boards.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-25 12:51:34 +01:00
Pol Henarejos
74127a038f
Changing label name.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-25 12:09:32 +01:00
Pol Henarejos
a01bd39f21
Adding license headers.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-25 12:08:48 +01:00
Pol Henarejos
9c707df93b
Create LICENSE 2022-03-25 11:32:52 +01:00
Pol Henarejos
4bdb189f10
Update README.md 2022-03-25 09:53:54 +01:00
Pol Henarejos
c2a474df98
Fix an overflow in EC key derivation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-24 20:42:43 +01:00
Pol Henarejos
483dc5e953
- Fixed a random bug when generating EC keys.
- Removed cvc_req. Now it is encapsulated from the previous existing cvc.
- All tests passed (sc-hsm-pkcs11-test invasive)

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-24 00:34:29 +01:00
Pol Henarejos
f490f073b0
When updating an EF, if it does not exist, we create it.
Added support for CA and CD certificates update.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 16:04:40 +01:00
Pol Henarejos
2eab8eba09
Added asymmetric key derivation. Only for EC.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 15:37:34 +01:00
Pol Henarejos
783c901567
Replaced EC load private key with read_key, which performs sanity checks.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 14:25:00 +01:00
Pol Henarejos
90d1fa0f9b
If modulusSize is used, the test will fail as it is an unexpected field. It does not seems necessary.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 11:37:05 +01:00
Pol Henarejos
96b791b3b9
- Fixed bug where PublicKD was saved in EE_CERTIFICATE_PREFIX. We save there the CSR instead in CVC format.
- We put the CHR and CAR into the CSR if provided during the keypair generation.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 11:31:24 +01:00
Pol Henarejos
78d71a6d9c
Upgrading to version 1.4.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 00:55:50 +01:00
Pol Henarejos
0a2740fbab
Added AES derive support based on HKDF.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 00:54:59 +01:00
Pol Henarejos
3192e928ff
Fixed a bug with deleting intermediate EF on flash. A new field on EF flash structure is added. Thus, the old structure must be erased.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-21 00:16:00 +01:00
Pol Henarejos
ae1e2ac111
Fix storing public key description when generating a new keypair.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-19 19:11:09 +01:00
Pol Henarejos
d87073f4cc
Auth status should not be removed when apple is reselected. Auth status is removed when the reader disconnects the card (unloads it).
With this fix, it is possible to login first and send immediate low level APDU command that requires authentification (such as login+CMAC).

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-17 23:37:02 +01:00
Pol Henarejos
36a8f78313
Added support for AES-CMAC.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-17 23:35:07 +01:00
Pol Henarejos
0628d5015c
Update asymmetric-ciphering.md 2022-03-17 00:44:38 +01:00
Pol Henarejos
daf0f98660
Update asymmetric-ciphering.md
Adding examples for ECDH key derivation.
2022-03-17 00:43:44 +01:00
Pol Henarejos
1f06c44a89
Adding ecdh support with MBEDTLS.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-17 00:28:40 +01:00
Pol Henarejos
ab1490a50b
Added ECDH key derivation.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-17 00:28:16 +01:00
Pol Henarejos
23f53a6095
Added some free on bad return.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 23:40:09 +01:00
Pol Henarejos
920cf3a1c5
Upgrading to v1.2
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 23:31:17 +01:00
Pol Henarejos
74f2a80fb4
Update README.md 2022-03-16 18:51:16 +01:00
Pol Henarejos
29361fa110
Update usage.md 2022-03-16 18:50:29 +01:00
Pol Henarejos
679486d38c
Update sign-verify.md
Added examples for ECDSA and ECDSA-SHA signature and verification.
2022-03-16 18:22:11 +01:00
Pol Henarejos
8988d1cf15
Fix support for ECDSA and ECDSA-SHAx signatures.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 18:20:17 +01:00
Pol Henarejos
693c890663
Update asymmetric-ciphering.md
Added OAEP encryption and decryption examples.
2022-03-16 15:13:23 +01:00
Pol Henarejos
591b02804e
Fix for HASH PSS and HASH PKCS.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 12:02:49 +01:00
Pol Henarejos
37c3028b1c
Adding code for AES derive
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 12:02:09 +01:00
Pol Henarejos
2cedf65f1a
Update sign-verify.md 2022-03-16 11:33:00 +01:00
Pol Henarejos
c31e4f8c2b
Update sign-verify.md 2022-03-16 10:04:04 +01:00
Pol Henarejos
c756e756b6
Update sign-verify.md
Added SHA1-RSA-PKCS-PSS and RSA-PKCS-PSS examples.
2022-03-16 10:03:24 +01:00
Pol Henarejos
73bc2ede6b
Fixed a bug with RSA-PKCS-PSS. Surprisingly, PKCS_V21 signature takes in place (input buffer = output buffer) and, for a strange reason, it does not work for res_APDU.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
2022-03-16 00:27:07 +01:00
Pol Henarejos
dcae71a4e8
Create asymmetric-ciphering.md 2022-03-15 01:04:27 +01:00
Pol Henarejos
71a5a456c5
Update sign-verify.md 2022-03-15 01:00:00 +01:00
Pol Henarejos
e1f88acb17
Create sign-verify.md 2022-03-15 00:53:18 +01:00
Pol Henarejos
5a2ec221b7
Update usage.md 2022-03-15 00:02:49 +01:00
Pol Henarejos
a018699283
Update README.md 2022-03-14 01:04:50 +01:00
Pol Henarejos
0a10fa4fbb
Update README.md 2022-03-14 01:03:38 +01:00
Pol Henarejos
c609cec441
Update usage.md 2022-03-14 00:59:22 +01:00
Pol Henarejos
587ead4ad9
Update README.md 2022-03-14 00:58:42 +01:00
Pol Henarejos
e3d809ae7f
Create aes.md 2022-03-14 00:55:32 +01:00
Pol Henarejos
4f142d1b93
Create backup-and-restore.md 2022-03-13 23:54:15 +01:00
Pol Henarejos
1f7e7aa14c
Update usage.md 2022-03-13 22:14:56 +01:00
Pol Henarejos
a4baa99fce
Update usage.md 2022-03-13 20:21:54 +01:00
Pol Henarejos
df020efa46
Update usage.md
Added keypair generation.
2022-03-12 20:24:55 +01:00