Added support for AES 512 bit keys (for XTS).

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-03-19 20:00:59 +01:00
parent ec9eb7c436
commit b12e66a057
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -25,12 +25,17 @@
#include "mbedtls/ecp.h"
#include "mbedtls/md.h"
#define HSM_KEY_RSA 0x1
#define HSM_KEY_EC 0x10
#define HSM_KEY_AES 0x100
#define HSM_KEY_AES_128 0x300
#define HSM_KEY_AES_192 0x500
#define HSM_KEY_AES_256 0x900
#define HSM_KEY_RSA 0x000f // It is a mask
#define HSM_KEY_RSA_1K 0x0001
#define HSM_KEY_RSA_2K 0x0002
#define HSM_KEY_RSA_3K 0x0004
#define HSM_KEY_RSA_4k 0x0008
#define HSM_KEY_EC 0x0010
#define HSM_KEY_AES 0x0f00 // It is a mask
#define HSM_KEY_AES_128 0x0100
#define HSM_KEY_AES_192 0x0200
#define HSM_KEY_AES_256 0x0400
#define HSM_KEY_AES_512 0x0800 /* For AES XTS */
#define HSM_AES_MODE_CBC 1
#define HSM_AES_MODE_CFB 2