Mbed OS Reference
Loading...
Searching...
No Matches
crypto_values.h File Reference

PSA cryptography module: macros to build and analyze integer values. More...

Go to the source code of this file.

Macros

#define PSA_SUCCESS   ((psa_status_t)0)
 The action was completed successfully. More...
 
#define PSA_ERROR_GENERIC_ERROR   ((psa_status_t)-132)
 An error occurred that does not correspond to any defined failure cause. More...
 
#define PSA_ERROR_NOT_SUPPORTED   ((psa_status_t)-134)
 The requested operation or a parameter is not supported by this implementation. More...
 
#define PSA_ERROR_NOT_PERMITTED   ((psa_status_t)-133)
 The requested action is denied by a policy. More...
 
#define PSA_ERROR_BUFFER_TOO_SMALL   ((psa_status_t)-138)
 An output buffer is too small. More...
 
#define PSA_ERROR_ALREADY_EXISTS   ((psa_status_t)-139)
 Asking for an item that already exists. More...
 
#define PSA_ERROR_DOES_NOT_EXIST   ((psa_status_t)-140)
 Asking for an item that doesn't exist. More...
 
#define PSA_ERROR_BAD_STATE   ((psa_status_t)-137)
 The requested action cannot be performed in the current state. More...
 
#define PSA_ERROR_INVALID_ARGUMENT   ((psa_status_t)-135)
 The parameters passed to the function are invalid. More...
 
#define PSA_ERROR_INSUFFICIENT_MEMORY   ((psa_status_t)-141)
 There is not enough runtime memory. More...
 
#define PSA_ERROR_INSUFFICIENT_STORAGE   ((psa_status_t)-142)
 There is not enough persistent storage. More...
 
#define PSA_ERROR_COMMUNICATION_FAILURE   ((psa_status_t)-145)
 There was a communication failure inside the implementation. More...
 
#define PSA_ERROR_STORAGE_FAILURE   ((psa_status_t)-146)
 There was a storage failure that may have led to data loss. More...
 
#define PSA_ERROR_HARDWARE_FAILURE   ((psa_status_t)-147)
 A hardware failure was detected. More...
 
#define PSA_ERROR_CORRUPTION_DETECTED   ((psa_status_t)-151)
 A tampering attempt was detected. More...
 
#define PSA_ERROR_INSUFFICIENT_ENTROPY   ((psa_status_t)-148)
 There is not enough entropy to generate random data needed for the requested action. More...
 
#define PSA_ERROR_INVALID_SIGNATURE   ((psa_status_t)-149)
 The signature, MAC or hash is incorrect. More...
 
#define PSA_ERROR_INVALID_PADDING   ((psa_status_t)-150)
 The decrypted padding is incorrect. More...
 
#define PSA_ERROR_INSUFFICIENT_DATA   ((psa_status_t)-143)
 Return this error when there's insufficient data when attempting to read from a resource. More...
 
#define PSA_ERROR_INVALID_HANDLE   ((psa_status_t)-136)
 The key identifier is not valid. More...
 
#define PSA_KEY_TYPE_NONE   ((psa_key_type_t)0x0000)
 An invalid key type value. More...
 
#define PSA_KEY_TYPE_VENDOR_FLAG   ((psa_key_type_t)0x8000)
 Vendor-defined key type flag. More...
 
#define PSA_KEY_TYPE_IS_VENDOR_DEFINED(type)    (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0)
 Whether a key type is vendor-defined. More...
 
#define PSA_KEY_TYPE_IS_UNSTRUCTURED(type)
 Whether a key type is an unstructured array of bytes. More...
 
#define PSA_KEY_TYPE_IS_ASYMMETRIC(type)
 Whether a key type is asymmetric: either a key pair or a public key. More...
 
#define PSA_KEY_TYPE_IS_PUBLIC_KEY(type)    (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_PUBLIC_KEY)
 Whether a key type is the public part of a key pair. More...
 
#define PSA_KEY_TYPE_IS_KEY_PAIR(type)    (((type) & PSA_KEY_TYPE_CATEGORY_MASK) == PSA_KEY_TYPE_CATEGORY_KEY_PAIR)
 Whether a key type is a key pair containing a private part and a public part. More...
 
#define PSA_KEY_TYPE_KEY_PAIR_OF_PUBLIC_KEY(type)    ((type) | PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)
 The key pair type corresponding to a public key type. More...
 
#define PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type)    ((type) & ~PSA_KEY_TYPE_CATEGORY_FLAG_PAIR)
 The public key type corresponding to a key pair type. More...
 
#define PSA_KEY_TYPE_RAW_DATA   ((psa_key_type_t)0x1001)
 Raw data. More...
 
#define PSA_KEY_TYPE_HMAC   ((psa_key_type_t)0x1100)
 HMAC key. More...
 
#define PSA_KEY_TYPE_DERIVE   ((psa_key_type_t)0x1200)
 A secret for key derivation. More...
 
#define PSA_KEY_TYPE_AES   ((psa_key_type_t)0x2400)
 Key for a cipher, AEAD or MAC algorithm based on the AES block cipher. More...
 
#define PSA_KEY_TYPE_DES   ((psa_key_type_t)0x2301)
 Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES). More...
 
#define PSA_KEY_TYPE_CAMELLIA   ((psa_key_type_t)0x2403)
 Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher. More...
 
#define PSA_KEY_TYPE_ARC4   ((psa_key_type_t)0x2002)
 Key for the RC4 stream cipher. More...
 
#define PSA_KEY_TYPE_CHACHA20   ((psa_key_type_t)0x2004)
 Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm. More...
 
#define PSA_KEY_TYPE_RSA_PUBLIC_KEY   ((psa_key_type_t)0x4001)
 RSA public key. More...
 
#define PSA_KEY_TYPE_RSA_KEY_PAIR   ((psa_key_type_t)0x7001)
 RSA key pair (private and public key). More...
 
#define PSA_KEY_TYPE_IS_RSA(type)    (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_RSA_PUBLIC_KEY)
 Whether a key type is an RSA key (pair or public-only). More...
 
#define PSA_KEY_TYPE_ECC_KEY_PAIR(curve)    (PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve))
 Elliptic curve key pair. More...
 
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve)    (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve))
 Elliptic curve public key. More...
 
#define PSA_KEY_TYPE_IS_ECC(type)
 Whether a key type is an elliptic curve key (pair or public-only). More...
 
#define PSA_KEY_TYPE_IS_ECC_KEY_PAIR(type)
 Whether a key type is an elliptic curve key pair. More...
 
#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY(type)
 Whether a key type is an elliptic curve public key. More...
 
#define PSA_KEY_TYPE_ECC_GET_FAMILY(type)
 Extract the curve from an elliptic curve key type. More...
 
#define PSA_ECC_FAMILY_SECP_K1   ((psa_ecc_family_t) 0x17)
 SEC Koblitz curves over prime fields. More...
 
#define PSA_ECC_FAMILY_SECP_R1   ((psa_ecc_family_t) 0x12)
 SEC random curves over prime fields. More...
 
#define PSA_ECC_FAMILY_SECT_K1   ((psa_ecc_family_t) 0x27)
 SEC Koblitz curves over binary fields. More...
 
#define PSA_ECC_FAMILY_SECT_R1   ((psa_ecc_family_t) 0x22)
 SEC random curves over binary fields. More...
 
#define PSA_ECC_FAMILY_SECT_R2   ((psa_ecc_family_t) 0x2b)
 SEC additional random curves over binary fields. More...
 
#define PSA_ECC_FAMILY_BRAINPOOL_P_R1   ((psa_ecc_family_t) 0x30)
 Brainpool P random curves. More...
 
#define PSA_ECC_FAMILY_MONTGOMERY   ((psa_ecc_family_t) 0x41)
 Curve25519 and Curve448. More...
 
#define PSA_KEY_TYPE_DH_KEY_PAIR(group)    (PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group))
 Diffie-Hellman key pair. More...
 
#define PSA_KEY_TYPE_DH_PUBLIC_KEY(group)    (PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group))
 Diffie-Hellman public key. More...
 
#define PSA_KEY_TYPE_IS_DH(type)
 Whether a key type is a Diffie-Hellman key (pair or public-only). More...
 
#define PSA_KEY_TYPE_IS_DH_KEY_PAIR(type)
 Whether a key type is a Diffie-Hellman key pair. More...
 
#define PSA_KEY_TYPE_IS_DH_PUBLIC_KEY(type)
 Whether a key type is a Diffie-Hellman public key. More...
 
#define PSA_KEY_TYPE_DH_GET_FAMILY(type)
 Extract the group from a Diffie-Hellman key type. More...
 
#define PSA_DH_FAMILY_RFC7919   ((psa_dh_family_t) 0x03)
 Diffie-Hellman groups defined in RFC 7919 Appendix A. More...
 
#define PSA_BLOCK_CIPHER_BLOCK_SIZE(type)
 The block size of a block cipher. More...
 
#define PSA_ALG_VENDOR_FLAG   ((psa_algorithm_t)0x80000000)
 Vendor-defined algorithm flag. More...
 
#define PSA_ALG_IS_VENDOR_DEFINED(alg)    (((alg) & PSA_ALG_VENDOR_FLAG) != 0)
 Whether an algorithm is vendor-defined. More...
 
#define PSA_ALG_IS_HASH(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH)
 Whether the specified algorithm is a hash algorithm. More...
 
#define PSA_ALG_IS_MAC(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC)
 Whether the specified algorithm is a MAC algorithm. More...
 
#define PSA_ALG_IS_CIPHER(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER)
 Whether the specified algorithm is a symmetric cipher algorithm. More...
 
#define PSA_ALG_IS_AEAD(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_AEAD)
 Whether the specified algorithm is an authenticated encryption with associated data (AEAD) algorithm. More...
 
#define PSA_ALG_IS_SIGN(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_SIGN)
 Whether the specified algorithm is an asymmetric signature algorithm, also known as public-key signature algorithm. More...
 
#define PSA_ALG_IS_ASYMMETRIC_ENCRYPTION(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION)
 Whether the specified algorithm is an asymmetric encryption algorithm, also known as public-key encryption algorithm. More...
 
#define PSA_ALG_IS_KEY_AGREEMENT(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_AGREEMENT)
 Whether the specified algorithm is a key agreement algorithm. More...
 
#define PSA_ALG_IS_KEY_DERIVATION(alg)    (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_KEY_DERIVATION)
 Whether the specified algorithm is a key derivation algorithm. More...
 
#define PSA_ALG_MD2   ((psa_algorithm_t)0x02000001)
 MD2. More...
 
#define PSA_ALG_MD4   ((psa_algorithm_t)0x02000002)
 MD4. More...
 
#define PSA_ALG_MD5   ((psa_algorithm_t)0x02000003)
 MD5. More...
 
#define PSA_ALG_RIPEMD160   ((psa_algorithm_t)0x02000004)
 PSA_ALG_RIPEMD160. More...
 
#define PSA_ALG_SHA_1   ((psa_algorithm_t)0x02000005)
 SHA1. More...
 
#define PSA_ALG_SHA_224   ((psa_algorithm_t)0x02000008)
 SHA2-224. More...
 
#define PSA_ALG_SHA_256   ((psa_algorithm_t)0x02000009)
 SHA2-256. More...
 
#define PSA_ALG_SHA_384   ((psa_algorithm_t)0x0200000a)
 SHA2-384. More...
 
#define PSA_ALG_SHA_512   ((psa_algorithm_t)0x0200000b)
 SHA2-512. More...
 
#define PSA_ALG_SHA_512_224   ((psa_algorithm_t)0x0200000c)
 SHA2-512/224. More...
 
#define PSA_ALG_SHA_512_256   ((psa_algorithm_t)0x0200000d)
 SHA2-512/256. More...
 
#define PSA_ALG_SHA3_224   ((psa_algorithm_t)0x02000010)
 SHA3-224. More...
 
#define PSA_ALG_SHA3_256   ((psa_algorithm_t)0x02000011)
 SHA3-256. More...
 
#define PSA_ALG_SHA3_384   ((psa_algorithm_t)0x02000012)
 SHA3-384. More...
 
#define PSA_ALG_SHA3_512   ((psa_algorithm_t)0x02000013)
 SHA3-512. More...
 
#define PSA_ALG_ANY_HASH   ((psa_algorithm_t)0x020000ff)
 In a hash-and-sign algorithm policy, allow any hash algorithm. More...
 
#define PSA_ALG_HMAC(hash_alg)    (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 Macro to build an HMAC algorithm. More...
 
#define PSA_ALG_IS_HMAC(alg)
 Whether the specified algorithm is an HMAC algorithm. More...
 
#define PSA_ALG_TRUNCATED_MAC(mac_alg, mac_length)
 Macro to build a truncated MAC algorithm. More...
 
#define PSA_ALG_FULL_LENGTH_MAC(mac_alg)    ((mac_alg) & ~PSA_ALG_MAC_TRUNCATION_MASK)
 Macro to build the base MAC algorithm corresponding to a truncated MAC algorithm. More...
 
#define PSA_MAC_TRUNCATED_LENGTH(mac_alg)    (((mac_alg) & PSA_ALG_MAC_TRUNCATION_MASK) >> PSA_MAC_TRUNCATION_OFFSET)
 Length to which a MAC algorithm is truncated. More...
 
#define PSA_ALG_CBC_MAC   ((psa_algorithm_t)0x03c00100)
 The CBC-MAC construction over a block cipher. More...
 
#define PSA_ALG_CMAC   ((psa_algorithm_t)0x03c00200)
 The CMAC construction over a block cipher. More...
 
#define PSA_ALG_IS_BLOCK_CIPHER_MAC(alg)
 Whether the specified algorithm is a MAC algorithm based on a block cipher. More...
 
#define PSA_ALG_IS_STREAM_CIPHER(alg)
 Whether the specified algorithm is a stream cipher. More...
 
#define PSA_ALG_STREAM_CIPHER   ((psa_algorithm_t)0x04800100)
 The stream cipher mode of a stream cipher algorithm. More...
 
#define PSA_ALG_CTR   ((psa_algorithm_t)0x04c01000)
 The CTR stream cipher mode. More...
 
#define PSA_ALG_CFB   ((psa_algorithm_t)0x04c01100)
 The CFB stream cipher mode. More...
 
#define PSA_ALG_OFB   ((psa_algorithm_t)0x04c01200)
 The OFB stream cipher mode. More...
 
#define PSA_ALG_XTS   ((psa_algorithm_t)0x0440ff00)
 The XTS cipher mode. More...
 
#define PSA_ALG_ECB_NO_PADDING   ((psa_algorithm_t)0x04404400)
 The Electronic Code Book (ECB) mode of a block cipher, with no padding. More...
 
#define PSA_ALG_CBC_NO_PADDING   ((psa_algorithm_t)0x04404000)
 The CBC block cipher chaining mode, with no padding. More...
 
#define PSA_ALG_CBC_PKCS7   ((psa_algorithm_t)0x04404100)
 The CBC block cipher chaining mode with PKCS#7 padding. More...
 
#define PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER(alg)
 Whether the specified algorithm is an AEAD mode on a block cipher. More...
 
#define PSA_ALG_CCM   ((psa_algorithm_t)0x05500100)
 The CCM authenticated encryption algorithm. More...
 
#define PSA_ALG_GCM   ((psa_algorithm_t)0x05500200)
 The GCM authenticated encryption algorithm. More...
 
#define PSA_ALG_CHACHA20_POLY1305   ((psa_algorithm_t)0x05100500)
 The Chacha20-Poly1305 AEAD algorithm. More...
 
#define PSA_ALG_AEAD_WITH_TAG_LENGTH(aead_alg, tag_length)
 Macro to build a shortened AEAD algorithm. More...
 
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH(aead_alg)
 Calculate the corresponding AEAD algorithm with the default tag length. More...
 
#define PSA_ALG_RSA_PKCS1V15_SIGN(hash_alg)    (PSA_ALG_RSA_PKCS1V15_SIGN_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 RSA PKCS#1 v1.5 signature with hashing. More...
 
#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW   PSA_ALG_RSA_PKCS1V15_SIGN_BASE
 Raw PKCS#1 v1.5 signature. More...
 
#define PSA_ALG_RSA_PSS(hash_alg)    (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 RSA PSS signature with hashing. More...
 
#define PSA_ALG_ECDSA(hash_alg)    (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 ECDSA signature with hashing. More...
 
#define PSA_ALG_ECDSA_ANY   PSA_ALG_ECDSA_BASE
 ECDSA signature without hashing. More...
 
#define PSA_ALG_DETERMINISTIC_ECDSA(hash_alg)    (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 Deterministic ECDSA signature with hashing. More...
 
#define PSA_ALG_IS_HASH_AND_SIGN(alg)
 Whether the specified algorithm is a hash-and-sign algorithm. More...
 
#define PSA_ALG_SIGN_GET_HASH(alg)
 Get the hash used by a hash-and-sign signature algorithm. More...
 
#define PSA_ALG_RSA_PKCS1V15_CRYPT   ((psa_algorithm_t)0x07000200)
 RSA PKCS#1 v1.5 encryption. More...
 
#define PSA_ALG_RSA_OAEP(hash_alg)    (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 RSA OAEP encryption. More...
 
#define PSA_ALG_HKDF(hash_alg)    (PSA_ALG_HKDF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 Macro to build an HKDF algorithm. More...
 
#define PSA_ALG_IS_HKDF(alg)    (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE)
 Whether the specified algorithm is an HKDF algorithm. More...
 
#define PSA_ALG_TLS12_PRF(hash_alg)    (PSA_ALG_TLS12_PRF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 Macro to build a TLS-1.2 PRF algorithm. More...
 
#define PSA_ALG_IS_TLS12_PRF(alg)    (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PRF_BASE)
 Whether the specified algorithm is a TLS-1.2 PRF algorithm. More...
 
#define PSA_ALG_TLS12_PSK_TO_MS(hash_alg)    (PSA_ALG_TLS12_PSK_TO_MS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK))
 Macro to build a TLS-1.2 PSK-to-MasterSecret algorithm. More...
 
#define PSA_ALG_IS_TLS12_PSK_TO_MS(alg)    (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_TLS12_PSK_TO_MS_BASE)
 Whether the specified algorithm is a TLS-1.2 PSK to MS algorithm. More...
 
#define PSA_ALG_KEY_AGREEMENT(ka_alg, kdf_alg)    ((ka_alg) | (kdf_alg))
 Macro to build a combined algorithm that chains a key agreement with a key derivation. More...
 
#define PSA_ALG_IS_RAW_KEY_AGREEMENT(alg)
 Whether the specified algorithm is a raw key agreement algorithm. More...
 
#define PSA_ALG_FFDH   ((psa_algorithm_t)0x09010000)
 The finite-field Diffie-Hellman (DH) key agreement algorithm. More...
 
#define PSA_ALG_IS_FFDH(alg)    (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_FFDH)
 Whether the specified algorithm is a finite field Diffie-Hellman algorithm. More...
 
#define PSA_ALG_ECDH   ((psa_algorithm_t)0x09020000)
 The elliptic curve Diffie-Hellman (ECDH) key agreement algorithm. More...
 
#define PSA_ALG_IS_ECDH(alg)    (PSA_ALG_KEY_AGREEMENT_GET_BASE(alg) == PSA_ALG_ECDH)
 Whether the specified algorithm is an elliptic curve Diffie-Hellman algorithm. More...
 
#define PSA_ALG_IS_WILDCARD(alg)
 Whether the specified algorithm encoding is a wildcard. More...
 
#define PSA_KEY_LIFETIME_VOLATILE   ((psa_key_lifetime_t)0x00000000)
 The default lifetime for volatile keys. More...
 
#define PSA_KEY_LIFETIME_PERSISTENT   ((psa_key_lifetime_t)0x00000001)
 The default lifetime for persistent keys. More...
 
#define PSA_KEY_PERSISTENCE_VOLATILE   ((psa_key_persistence_t)0x00)
 The persistence level of volatile keys. More...
 
#define PSA_KEY_PERSISTENCE_DEFAULT   ((psa_key_persistence_t)0x01)
 The default persistence level for persistent keys. More...
 
#define PSA_KEY_PERSISTENCE_READ_ONLY   ((psa_key_persistence_t)0xff)
 A persistence level indicating that a key is never destroyed. More...
 
#define PSA_KEY_LIFETIME_GET_PERSISTENCE(lifetime)    ((psa_key_persistence_t)((lifetime) & 0x000000ff))
 Get the persistence (see psa_key_persistence_t) from a psa_key_lifetime_t. More...
 
#define PSA_KEY_LIFETIME_GET_LOCATION(lifetime)    ((psa_key_location_t)((lifetime) >> 8))
 Get the location (see psa_key_location_t) from a psa_key_lifetime_t. More...
 
#define PSA_KEY_LIFETIME_IS_VOLATILE(lifetime)
 Whether a key lifetime indicates that the key is volatile. More...
 
#define PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(persistence, location)    ((location) << 8 | (persistence))
 Construct a lifetime from a persistence level and a location. More...
 
#define PSA_KEY_LOCATION_LOCAL_STORAGE   ((psa_key_location_t)0x000000)
 The local storage area for persistent keys. More...
 
#define PSA_KEY_ID_USER_MIN   ((psa_key_id_t)0x00000001)
 The minimum value for a key identifier chosen by the application. More...
 
#define PSA_KEY_ID_USER_MAX   ((psa_key_id_t)0x3fffffff)
 The maximum value for a key identifier chosen by the application. More...
 
#define PSA_KEY_ID_VENDOR_MIN   ((psa_key_id_t)0x40000000)
 The minimum value for a key identifier chosen by the implementation. More...
 
#define PSA_KEY_ID_VENDOR_MAX   ((psa_key_id_t)0x7fffffff)
 The maximum value for a key identifier chosen by the implementation. More...
 
#define PSA_KEY_USAGE_EXPORT   ((psa_key_usage_t)0x00000001)
 Whether the key may be exported. More...
 
#define PSA_KEY_USAGE_COPY   ((psa_key_usage_t)0x00000002)
 Whether the key may be copied. More...
 
#define PSA_KEY_USAGE_ENCRYPT   ((psa_key_usage_t)0x00000100)
 Whether the key may be used to encrypt a message. More...
 
#define PSA_KEY_USAGE_DECRYPT   ((psa_key_usage_t)0x00000200)
 Whether the key may be used to decrypt a message. More...
 
#define PSA_KEY_USAGE_SIGN_HASH   ((psa_key_usage_t)0x00001000)
 Whether the key may be used to sign a message. More...
 
#define PSA_KEY_USAGE_VERIFY_HASH   ((psa_key_usage_t)0x00002000)
 Whether the key may be used to verify a message signature. More...
 
#define PSA_KEY_USAGE_DERIVE   ((psa_key_usage_t)0x00004000)
 Whether the key may be used to derive other keys. More...
 
#define PSA_KEY_DERIVATION_INPUT_SECRET   ((psa_key_derivation_step_t)0x0101)
 A secret input for key derivation. More...
 
#define PSA_KEY_DERIVATION_INPUT_LABEL   ((psa_key_derivation_step_t)0x0201)
 A label for key derivation. More...
 
#define PSA_KEY_DERIVATION_INPUT_SALT   ((psa_key_derivation_step_t)0x0202)
 A salt for key derivation. More...
 
#define PSA_KEY_DERIVATION_INPUT_INFO   ((psa_key_derivation_step_t)0x0203)
 An information string for key derivation. More...
 
#define PSA_KEY_DERIVATION_INPUT_SEED   ((psa_key_derivation_step_t)0x0204)
 A seed for key derivation. More...
 

Detailed Description

PSA cryptography module: macros to build and analyze integer values.

Note
This file may not be included directly. Applications must include psa/crypto.h. Drivers must include the appropriate driver header file.

This file contains portable definitions of macros to build and analyze values of integral types that encode properties of cryptographic keys, designations of cryptographic algorithms, and error codes returned by the library.

This header file only defines preprocessor macros.

Definition in file crypto_values.h.