From 31cbbefde822cb2e2099e6c1d6b7013cdbb8b941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 20 Apr 2021 11:18:25 +0200 Subject: [PATCH] PSA PBKDF2: add new key types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Question to reviewers: regarding the numeric values, I'm not sure I've incremented the right byte/nibble. Should this be 0x1201, 0x1202 instead, or something else? Is there a convention I should be aware of? Signed-off-by: Manuel Pégourié-Gonnard --- include/psa/crypto_values.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h index 5e865c931..2c247d068 100644 --- a/include/psa/crypto_values.h +++ b/include/psa/crypto_values.h @@ -414,6 +414,20 @@ */ #define PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x1200) +/** A low-entropy secret for password hashing or key derivation. + * + * The key policy determines which key derivation algorithm the key + * can be used for. + */ +#define PSA_KEY_TYPE_PASSWORD ((psa_key_type_t)0x1300) + +/** A secret value that can be mixed in when doing password hashing. + * + * The key policy determines which key derivation algorithm the key + * can be used for. + */ +#define PSA_KEY_TYPE_PEPPER ((psa_key_type_t)0x1400) + /** Key for a cipher, AEAD or MAC algorithm based on the AES block cipher. * * The size of the key can be 16 bytes (AES-128), 24 bytes (AES-192) or