Added AES encryption/decryption.

However, I could not find any interface (neither opensc nor sc-hsm-embedded).
Needs further testing.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-03-06 01:28:29 +01:00
parent 37957dd8fd
commit 5e377cccaf
2 changed files with 48 additions and 0 deletions

View File

@@ -60,6 +60,12 @@ extern const uint8_t sc_hsm_aid[];
#define ALGO_EC_SHA256 0x73 /* ECDSA signature with SHA-256 hash */
#define ALGO_EC_DH 0x80 /* ECDH key derivation */
#define ALGO_EC_DERIVE 0x98 /* Derive EC key from EC key */
#define ALGO_AES_CBC_ENCRYPT 0x10
#define ALGO_AES_CBC_DECRYPT 0x11
#define ALGO_AES_CMAC 0x18
extern int pin_reset_retries(const file_t *pin, bool);
extern int pin_wrong_retry(const file_t *pin);