Macros | |
#define | PSA_KEY_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t)0x4002) |
DSA public key. More... | |
#define | PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) |
DSA key pair (private and public key). More... | |
#define | PSA_KEY_TYPE_IS_DSA(type) (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) |
Whether a key type is an DSA key (pair or public-only). More... | |
#define | PSA_ALG_DSA(hash_alg) (PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
DSA signature with hashing. More... | |
#define | PSA_ALG_DETERMINISTIC_DSA(hash_alg) (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Deterministic DSA signature with hashing. 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_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t)0x4002) |
DSA public key. More... | |
#define | PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) |
DSA key pair (private and public key). 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_PASSWORD ((psa_key_type_t)0x1203) |
A low-entropy secret for password hashing or key derivation. More... | |
#define | PSA_KEY_TYPE_PASSWORD_HASH ((psa_key_type_t)0x1205) |
A secret value that can be used to verify a password hash. More... | |
#define | PSA_KEY_TYPE_PEPPER ((psa_key_type_t)0x1206) |
A secret value that can be used in when computing a password hash. 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_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_ECC_FAMILY_TWISTED_EDWARDS ((psa_ecc_family_t) 0x42) |
The twisted Edwards curves Ed25519 and Ed448. 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_LENGTH(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_IS_KEY_DERIVATION_STRETCHING(alg) |
Whether the specified algorithm is a key stretching / password hashing algorithm. 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_SHAKE256_512 ((psa_algorithm_t)0x02000015) |
The first 512 bits (64 bytes) of the SHAKE256 output. 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) |
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_AT_LEAST_THIS_LENGTH_MAC(mac_alg, min_mac_length) |
Macro to build a MAC minimum-MAC-length wildcard algorithm. 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_SHORTENED_TAG(aead_alg, tag_length) |
Macro to build a shortened AEAD algorithm. More... | |
#define | PSA_ALG_AEAD_GET_TAG_LENGTH(aead_alg) |
Retrieve the tag length of a specified AEAD algorithm. More... | |
#define | PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG(aead_alg) |
Calculate the corresponding AEAD algorithm with the default tag length. More... | |
#define | PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG(aead_alg, min_tag_length) |
Macro to build an AEAD minimum-tag-length wildcard algorithm. 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_PURE_EDDSA ((psa_algorithm_t)0x06000800) |
Edwards-curve digital signature algorithm without prehashing (PureEdDSA), using standard parameters. More... | |
#define | PSA_ALG_ED25519PH (PSA_ALG_HASH_EDDSA_BASE | (PSA_ALG_SHA_512 & PSA_ALG_HASH_MASK)) |
Edwards-curve digital signature algorithm with prehashing (HashEdDSA), using SHA-512 and the Edwards25519 curve. More... | |
#define | PSA_ALG_ED448PH (PSA_ALG_HASH_EDDSA_BASE | (PSA_ALG_SHAKE256_512 & PSA_ALG_HASH_MASK)) |
Edwards-curve digital signature algorithm with prehashing (HashEdDSA), using SHAKE256 and the Edwards448 curve. More... | |
#define | PSA_ALG_IS_HASH_AND_SIGN(alg) |
Whether the specified algorithm is a hash-and-sign algorithm. More... | |
#define | PSA_ALG_IS_SIGN_MESSAGE(alg) (PSA_ALG_IS_HASH_AND_SIGN(alg) || (alg) == PSA_ALG_PURE_EDDSA ) |
Whether the specified algorithm is a signature algorithm that can be used with psa_sign_message() and psa_verify_message(). 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_PBKDF2_HMAC(hash_alg) (PSA_ALG_PBKDF2_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build a PBKDF2-HMAC password hashing / key stretching algorithm. More... | |
#define | PSA_ALG_IS_PBKDF2_HMAC(alg) (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_PBKDF2_HMAC_BASE) |
Whether the specified algorithm is a PBKDF2-HMAC algorithm. More... | |
#define | PSA_ALG_PBKDF2_AES_CMAC_PRF_128 ((psa_algorithm_t)0x08800200) |
The PBKDF2-AES-CMAC-PRF-128 password hashing / key stretching 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_ALG_GET_HASH(alg) (((alg) & 0x000000ff) == 0 ? ((psa_algorithm_t)0) : 0x02000000 | ((alg) & 0x000000ff)) |
Get the hash used by a composite algorithm. More... | |
#define | PSA_KEY_TYPE_NONE ((psa_key_type_t)0x00000000) |
An invalid key type value. More... | |
#define | PSA_KEY_TYPE_VENDOR_FLAG ((psa_key_type_t)0x80000000) |
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)0x50000001) |
Raw data. More... | |
#define | PSA_KEY_TYPE_HMAC ((psa_key_type_t)0x51000000) |
HMAC key. More... | |
#define | PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x52000000) |
A secret for key derivation. More... | |
#define | PSA_KEY_TYPE_AES ((psa_key_type_t)0x40000001) |
Key for a cipher, AEAD or MAC algorithm based on the AES block cipher. More... | |
#define | PSA_KEY_TYPE_DES ((psa_key_type_t)0x40000002) |
Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES). More... | |
#define | PSA_KEY_TYPE_CAMELLIA ((psa_key_type_t)0x40000003) |
Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher. More... | |
#define | PSA_KEY_TYPE_ARC4 ((psa_key_type_t)0x40000004) |
Key for the RC4 stream cipher. More... | |
#define | PSA_KEY_TYPE_CHACHA20 ((psa_key_type_t)0x40000005) |
Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm. More... | |
#define | PSA_KEY_TYPE_RSA_PUBLIC_KEY ((psa_key_type_t)0x60010000) |
RSA public key. More... | |
#define | PSA_KEY_TYPE_RSA_KEY_PAIR ((psa_key_type_t)0x70010000) |
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_GET_CURVE(type) |
Extract the curve from an elliptic curve key type. More... | |
#define | PSA_ECC_CURVE_CURVE25519 ((psa_ecc_curve_t) 0x001d) |
Curve25519. More... | |
#define | PSA_ECC_CURVE_CURVE448 ((psa_ecc_curve_t) 0x001e) |
Curve448. More... | |
#define | PSA_ECC_CURVE_VENDOR_MIN ((psa_ecc_curve_t) 0xfe00) |
Minimum value for a vendor-defined ECC curve identifier. More... | |
#define | PSA_ECC_CURVE_VENDOR_MAX ((psa_ecc_curve_t) 0xfe7f) |
Maximum value for a vendor-defined ECC curve identifier. 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_GET_GROUP(type) |
Extract the group from a Diffie-Hellman key type. More... | |
#define | PSA_DH_GROUP_VENDOR_MIN ((psa_dh_group_t) 0x01fc) |
Minimum value for a vendor-defined Diffie Hellman group identifier. More... | |
#define | PSA_DH_GROUP_VENDOR_MAX ((psa_dh_group_t) 0x01fd) |
Maximum value for a vendor-defined Diffie Hellman group identifier. 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 a 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 a 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)0x01000001) |
MD2. More... | |
#define | PSA_ALG_MD4 ((psa_algorithm_t)0x01000002) |
MD4. More... | |
#define | PSA_ALG_MD5 ((psa_algorithm_t)0x01000003) |
MD5. More... | |
#define | PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x01000004) |
PSA_ALG_RIPEMD160. More... | |
#define | PSA_ALG_SHA_1 ((psa_algorithm_t)0x01000005) |
SHA1. More... | |
#define | PSA_ALG_SHA_224 ((psa_algorithm_t)0x01000008) |
SHA2-224. More... | |
#define | PSA_ALG_SHA_256 ((psa_algorithm_t)0x01000009) |
SHA2-256. More... | |
#define | PSA_ALG_SHA_384 ((psa_algorithm_t)0x0100000a) |
SHA2-384. More... | |
#define | PSA_ALG_SHA_512 ((psa_algorithm_t)0x0100000b) |
SHA2-512. More... | |
#define | PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0100000c) |
SHA2-512/224. More... | |
#define | PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0100000d) |
SHA2-512/256. More... | |
#define | PSA_ALG_SHA3_224 ((psa_algorithm_t)0x01000010) |
SHA3-224. More... | |
#define | PSA_ALG_SHA3_256 ((psa_algorithm_t)0x01000011) |
SHA3-256. More... | |
#define | PSA_ALG_SHA3_384 ((psa_algorithm_t)0x01000012) |
SHA3-384. More... | |
#define | PSA_ALG_SHA3_512 ((psa_algorithm_t)0x01000013) |
SHA3-512. More... | |
#define | PSA_ALG_ANY_HASH ((psa_algorithm_t)0x010000ff) |
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)0x02c00001) |
The CBC-MAC construction over a block cipher. More... | |
#define | PSA_ALG_CMAC ((psa_algorithm_t)0x02c00002) |
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_ARC4 ((psa_algorithm_t)0x04800001) |
The ARC4 stream cipher algorithm. More... | |
#define | PSA_ALG_CHACHA20 ((psa_algorithm_t)0x04800005) |
The ChaCha20 stream cipher. More... | |
#define | PSA_ALG_CTR ((psa_algorithm_t)0x04c00001) |
The CTR stream cipher mode. More... | |
#define | PSA_ALG_CFB ((psa_algorithm_t)0x04c00002) |
The CFB stream cipher mode. More... | |
#define | PSA_ALG_OFB ((psa_algorithm_t)0x04c00003) |
The OFB stream cipher mode. More... | |
#define | PSA_ALG_XTS ((psa_algorithm_t)0x044000ff) |
The XTS cipher mode. More... | |
#define | PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04600100) |
The CBC block cipher chaining mode, with no padding. 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_PKCS7 ((psa_algorithm_t)0x04600101) |
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)0x06401001) |
The CCM authenticated encryption algorithm. More... | |
#define | PSA_ALG_GCM ((psa_algorithm_t)0x06401002) |
The GCM authenticated encryption algorithm. More... | |
#define | PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x06001005) |
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)0x12020000) |
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)0x30100000) |
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)0x30200000) |
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... | |
Typedefs | |
typedef uint16_t | psa_key_type_t |
Encoding of a key type. More... | |
typedef uint8_t | psa_ecc_family_t |
The type of PSA elliptic curve family identifiers. More... | |
typedef uint8_t | psa_dh_family_t |
The type of PSA Diffie-Hellman group family identifiers. More... | |
typedef uint32_t | psa_algorithm_t |
Encoding of a cryptographic algorithm. More... | |
typedef uint16_t | psa_key_type_t |
Encoding of a key type. More... | |
typedef uint8_t | psa_ecc_family_t |
The type of PSA elliptic curve family identifiers. More... | |
typedef uint8_t | psa_dh_family_t |
The type of PSA Diffie-Hellman group family identifiers. More... | |
typedef uint32_t | psa_algorithm_t |
Encoding of a cryptographic algorithm. More... | |
typedef uint32_t | psa_key_type_t |
Encoding of a key type. More... | |
typedef uint8_t | psa_ecc_family_t |
The type of PSA elliptic curve family identifiers. More... | |
typedef uint16_t | psa_ecc_curve_t |
The type of PSA elliptic curve identifiers. More... | |
typedef uint16_t | psa_dh_group_t |
The type of PSA Diffie-Hellman group identifiers. More... | |
typedef uint32_t | psa_algorithm_t |
Encoding of a cryptographic algorithm. More... | |
#define PSA_ALG_AEAD_GET_TAG_LENGTH | ( | aead_alg | ) |
Retrieve the tag length of a specified AEAD algorithm.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(aead_alg ) is true). |
aead_alg
is not a supported AEAD algorithm. Definition at line 1280 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_AT_LEAST_THIS_LENGTH_TAG | ( | aead_alg, | |
min_tag_length | |||
) |
Macro to build an AEAD minimum-tag-length wildcard algorithm.
A minimum-tag-length AEAD wildcard algorithm permits all AEAD algorithms sharing the same base algorithm, and where the tag length of the specific algorithm is equal to or larger then the minimum tag length specified by the wildcard algorithm.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(aead_alg ) is true). |
min_tag_length | Desired minimum length of the authentication tag in bytes. This must be at least 1 and at most the largest allowed tag length of the algorithm. |
aead_alg
is not a supported AEAD algorithm or if min_tag_length
is less than 1 or too large for the specified AEAD algorithm. Definition at line 1327 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_DEFAULT_LENGTH_TAG | ( | aead_alg | ) |
Calculate the corresponding AEAD algorithm with the default tag length.
aead_alg | An AEAD algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_AEAD(aead_alg ) is true). |
Definition at line 1292 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH | ( | aead_alg | ) |
Calculate the corresponding AEAD algorithm with the default tag length.
aead_alg | An AEAD algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_AEAD(alg ) is true). |
Definition at line 1086 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH | ( | aead_alg | ) |
Calculate the corresponding AEAD algorithm with the default tag length.
aead_alg | An AEAD algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_AEAD(alg ) is true). |
Definition at line 1092 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_SHORTENED_TAG | ( | aead_alg, | |
tag_length | |||
) |
Macro to build a shortened AEAD algorithm.
A shortened AEAD algorithm is similar to the corresponding AEAD algorithm, but has an authentication tag that consists of fewer bytes. Depending on the algorithm, the tag length may affect the calculation of the ciphertext.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(aead_alg ) is true). |
tag_length | Desired length of the authentication tag in bytes. |
aead_alg
is not a supported AEAD algorithm or if tag_length
is not valid for the specified AEAD algorithm. Definition at line 1264 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_TAG_LENGTH | ( | aead_alg, | |
tag_length | |||
) |
Macro to build a shortened AEAD algorithm.
A shortened AEAD algorithm is similar to the corresponding AEAD algorithm, but has an authentication tag that consists of fewer bytes. Depending on the algorithm, the tag length may affect the calculation of the ciphertext.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg ) is true). |
tag_length | Desired length of the authentication tag in bytes. |
alg
is not a supported AEAD algorithm or if tag_length
is not valid for the specified AEAD algorithm. Definition at line 1073 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_TAG_LENGTH | ( | aead_alg, | |
tag_length | |||
) |
Macro to build a shortened AEAD algorithm.
A shortened AEAD algorithm is similar to the corresponding AEAD algorithm, but has an authentication tag that consists of fewer bytes. Depending on the algorithm, the tag length may affect the calculation of the ciphertext.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg ) is true). |
tag_length | Desired length of the authentication tag in bytes. |
alg
is not a supported AEAD algorithm or if tag_length
is not valid for the specified AEAD algorithm. Definition at line 1079 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_AEAD_WITH_TAG_LENGTH | ( | aead_alg, | |
tag_length | |||
) |
Macro to build a shortened AEAD algorithm.
A shortened AEAD algorithm is similar to the corresponding AEAD algorithm, but has an authentication tag that consists of fewer bytes. Depending on the algorithm, the tag length may affect the calculation of the ciphertext.
aead_alg | An AEAD algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_AEAD(alg ) is true). |
tag_length | Desired length of the authentication tag in bytes. |
alg
is not a supported AEAD algorithm or if tag_length
is not valid for the specified AEAD algorithm. Definition at line 1241 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ANY_HASH ((psa_algorithm_t)0x010000ff) |
In a hash-and-sign algorithm policy, allow any hash algorithm.
This value may be used to form the algorithm usage field of a policy for a signature algorithm that is parametrized by a hash. The key may then be used to perform operations using the same signature algorithm parametrized with any supported hash.
That is, suppose that PSA_xxx_SIGNATURE
is one of the following macros:
PSA_xxx_SIGNATURE
and a specific hash. Each call to sign or verify a message may use a different hash. This value may not be used to build other algorithms that are parametrized over a hash. For any valid use of this macro to build an algorithm alg
, PSA_ALG_IS_HASH_AND_SIGN(alg
) is true.
This value may not be used to build an algorithm specification to perform an operation. It is only valid to build policies.
Definition at line 782 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_ANY_HASH ((psa_algorithm_t)0x020000ff) |
In a hash-and-sign algorithm policy, allow any hash algorithm.
This value may be used to form the algorithm usage field of a policy for a signature algorithm that is parametrized by a hash. The key may then be used to perform operations using the same signature algorithm parametrized with any supported hash.
That is, suppose that PSA_xxx_SIGNATURE
is one of the following macros:
PSA_xxx_SIGNATURE
and a specific hash. Each call to sign or verify a message may use a different hash. This value may not be used to build other algorithms that are parametrized over a hash. For any valid use of this macro to build an algorithm alg
, PSA_ALG_IS_HASH_AND_SIGN(alg
) is true.
This value may not be used to build an algorithm specification to perform an operation. It is only valid to build policies.
Definition at line 784 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_ANY_HASH ((psa_algorithm_t)0x020000ff) |
In a hash-and-sign algorithm policy, allow any hash algorithm.
This value may be used to form the algorithm usage field of a policy for a signature algorithm that is parametrized by a hash. The key may then be used to perform operations using the same signature algorithm parametrized with any supported hash.
That is, suppose that PSA_xxx_SIGNATURE
is one of the following macros:
PSA_xxx_SIGNATURE
and a specific hash. Each call to sign or verify a message may use a different hash. This value may not be used to build other algorithms that are parametrized over a hash. For any valid use of this macro to build an algorithm alg
, PSA_ALG_IS_HASH_AND_SIGN(alg
) is true.
This value may not be used to build an algorithm specification to perform an operation. It is only valid to build policies.
Definition at line 907 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800001) |
The ARC4 stream cipher algorithm.
Definition at line 936 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_AT_LEAST_THIS_LENGTH_MAC | ( | mac_alg, | |
min_mac_length | |||
) |
Macro to build a MAC minimum-MAC-length wildcard algorithm.
A minimum-MAC-length MAC wildcard algorithm permits all MAC algorithms sharing the same base algorithm, and where the (potentially truncated) MAC length of the specific algorithm is equal to or larger then the wildcard algorithm's minimum MAC length.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(mac_alg ) is true). |
min_mac_length | Desired minimum length of the message authentication code in bytes. This must be at most the untruncated length of the MAC and must be at least 1. |
mac_alg
is not a supported MAC algorithm or if min_mac_length
is less than 1 or too large for the specified MAC algorithm. Definition at line 1052 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CBC_MAC ((psa_algorithm_t)0x02c00001) |
The CBC-MAC construction over a block cipher.
Definition at line 899 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CBC_MAC ((psa_algorithm_t)0x03c00100) |
The CBC-MAC construction over a block cipher.
Definition at line 901 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CBC_MAC ((psa_algorithm_t)0x03c00100) |
The CBC-MAC construction over a block cipher.
Definition at line 1062 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04600100) |
The CBC block cipher chaining mode, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are whole number of blocks for the chosen block cipher.
Definition at line 986 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04404000) |
The CBC block cipher chaining mode, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are whole number of blocks for the chosen block cipher.
Definition at line 1000 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CBC_NO_PADDING ((psa_algorithm_t)0x04404000) |
The CBC block cipher chaining mode, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are whole number of blocks for the chosen block cipher.
Definition at line 1160 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04404100) |
The CBC block cipher chaining mode with PKCS#7 padding.
The underlying block cipher is determined by the key type.
This is the padding method defined by PKCS#7 (RFC 2315) §10.3.
Definition at line 1008 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04600101) |
The CBC block cipher chaining mode with PKCS#7 padding.
The underlying block cipher is determined by the key type.
This is the padding method defined by PKCS#7 (RFC 2315) §10.3.
Definition at line 1014 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CBC_PKCS7 ((psa_algorithm_t)0x04404100) |
The CBC block cipher chaining mode with PKCS#7 padding.
The underlying block cipher is determined by the key type.
This is the padding method defined by PKCS#7 (RFC 2315) §10.3.
Definition at line 1168 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CCM ((psa_algorithm_t)0x05500100) |
The CCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1029 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CCM ((psa_algorithm_t)0x06401001) |
The CCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1035 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CCM ((psa_algorithm_t)0x05500100) |
The CCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1189 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CFB ((psa_algorithm_t)0x04c01100) |
The CFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 957 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CFB ((psa_algorithm_t)0x04c00002) |
The CFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 963 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CFB ((psa_algorithm_t)0x04c01100) |
The CFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 1117 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CHACHA20 ((psa_algorithm_t)0x04800005) |
The ChaCha20 stream cipher.
ChaCha20 is defined in RFC 7539.
The nonce size for psa_cipher_set_iv() or psa_cipher_generate_iv() must be 12.
The initial block counter is always 0.
Definition at line 948 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) |
The Chacha20-Poly1305 AEAD algorithm.
The ChaCha20_Poly1305 construction is defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Implementations must support 16-byte tags and should reject other sizes.
Definition at line 1046 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x06001005) |
The Chacha20-Poly1305 AEAD algorithm.
The ChaCha20_Poly1305 construction is defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Implementations must support 16-byte tags and should reject other sizes.
Definition at line 1052 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CHACHA20_POLY1305 ((psa_algorithm_t)0x05100500) |
The Chacha20-Poly1305 AEAD algorithm.
The ChaCha20_Poly1305 construction is defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Implementations must support 16-byte tags and should reject other sizes.
Definition at line 1206 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CMAC ((psa_algorithm_t)0x02c00002) |
The CMAC construction over a block cipher.
Definition at line 901 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CMAC ((psa_algorithm_t)0x03c00200) |
The CMAC construction over a block cipher.
Definition at line 903 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CMAC ((psa_algorithm_t)0x03c00200) |
The CMAC construction over a block cipher.
Definition at line 1064 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_CTR ((psa_algorithm_t)0x04c01000) |
The CTR stream cipher mode.
CTR is a stream cipher which is built from a block cipher. The underlying block cipher is determined by the key type. For example, to use AES-128-CTR, use this algorithm with a key of type PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
Definition at line 951 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_CTR ((psa_algorithm_t)0x04c00001) |
The CTR stream cipher mode.
CTR is a stream cipher which is built from a block cipher. The underlying block cipher is determined by the key type. For example, to use AES-128-CTR, use this algorithm with a key of type PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
Definition at line 957 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_CTR ((psa_algorithm_t)0x04c01000) |
The CTR stream cipher mode.
CTR is a stream cipher which is built from a block cipher. The underlying block cipher is determined by the key type. For example, to use AES-128-CTR, use this algorithm with a key of type PSA_KEY_TYPE_AES and a length of 128 bits (16 bytes).
Definition at line 1111 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_DETERMINISTIC_DSA | ( | hash_alg | ) | (PSA_ALG_DETERMINISTIC_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Deterministic DSA signature with hashing.
This is the deterministic variant defined by RFC 6979 of the signature scheme defined by FIPS 186-4.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 389 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h.
#define PSA_ALG_DETERMINISTIC_ECDSA | ( | hash_alg | ) | (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Deterministic ECDSA signature with hashing.
This is the deterministic ECDSA signature scheme defined by RFC 6979.
The representation of a signature is the same as with PSA_ALG_ECDSA().
Note that when this algorithm is used for verification, signatures made with randomized ECDSA (PSA_ALG_ECDSA(hash_alg
)) with the same private key are accepted. In other words, PSA_ALG_DETERMINISTIC_ECDSA(hash_alg
) differs from PSA_ALG_ECDSA(hash_alg
) only for signature, not for verification.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1205 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_DETERMINISTIC_ECDSA | ( | hash_alg | ) | (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Deterministic ECDSA signature with hashing.
This is the deterministic ECDSA signature scheme defined by RFC 6979.
The representation of a signature is the same as with PSA_ALG_ECDSA().
Note that when this algorithm is used for verification, signatures made with randomized ECDSA (PSA_ALG_ECDSA(hash_alg
)) with the same private key are accepted. In other words, PSA_ALG_DETERMINISTIC_ECDSA(hash_alg
) differs from PSA_ALG_ECDSA(hash_alg
) only for signature, not for verification.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1211 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_DETERMINISTIC_ECDSA | ( | hash_alg | ) | (PSA_ALG_DETERMINISTIC_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Deterministic ECDSA signature with hashing.
This is the deterministic ECDSA signature scheme defined by RFC 6979.
The representation of a signature is the same as with PSA_ALG_ECDSA().
Note that when this algorithm is used for verification, signatures made with randomized ECDSA (PSA_ALG_ECDSA(hash_alg
)) with the same private key are accepted. In other words, PSA_ALG_DETERMINISTIC_ECDSA(hash_alg
) differs from PSA_ALG_ECDSA(hash_alg
) only for signature, not for verification.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1439 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_DSA | ( | hash_alg | ) | (PSA_ALG_DSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
DSA signature with hashing.
This is the signature scheme defined by FIPS 186-4, with a random per-message secret number (k).
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 371 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h.
#define PSA_ALG_ECB_NO_PADDING ((psa_algorithm_t)0x04404400) |
The Electronic Code Book (ECB) mode of a block cipher, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are a multiple of the block size of the chosen block cipher.
ECB mode does not accept an initialization vector (IV). When using a multi-part cipher operation with this algorithm, psa_cipher_generate_iv() and psa_cipher_set_iv() must not be called.
Definition at line 991 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_ECB_NO_PADDING ((psa_algorithm_t)0x04404400) |
The Electronic Code Book (ECB) mode of a block cipher, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are a multiple of the block size of the chosen block cipher.
ECB mode does not accept an initialization vector (IV). When using a multi-part cipher operation with this algorithm, psa_cipher_generate_iv() and psa_cipher_set_iv() must not be called.
Definition at line 1006 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_ECB_NO_PADDING ((psa_algorithm_t)0x04404400) |
The Electronic Code Book (ECB) mode of a block cipher, with no padding.
The underlying block cipher is determined by the key type.
This symmetric cipher mode can only be used with messages whose lengths are a multiple of the block size of the chosen block cipher.
ECB mode does not accept an initialization vector (IV). When using a multi-part cipher operation with this algorithm, psa_cipher_generate_iv() and psa_cipher_set_iv() must not be called.
Definition at line 1151 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ECDH ((psa_algorithm_t)0x09020000) |
The elliptic curve Diffie-Hellman (ECDH) key agreement algorithm.
The shared secret produced by key agreement is the x-coordinate of the shared secret point. It is always ceiling(m / 8)
bytes long where m
is the bit size associated with the curve, i.e. the bit size of the order of the curve's coordinate field. When m
is not a multiple of 8, the byte containing the most significant bit of the shared secret is padded with zero bits. The byte order is either little-endian or big-endian depending on the curve type.
PSA_ECC_FAMILY_CURVEXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in little-endian byte order. The bit size is 448 for Curve448 and 255 for Curve25519.PSA_ECC_FAMILY_SECPXXX
and PSA_ECC_FAMILY_BRAINPOOL_PXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m = ceiling(log_2(p))
for the field F_p
.PSA_ECC_FAMILY_SECTXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m
for the field F_{2^m}
. Definition at line 1511 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_ECDH ((psa_algorithm_t)0x30200000) |
The elliptic curve Diffie-Hellman (ECDH) key agreement algorithm.
The shared secret produced by key agreement is the x-coordinate of the shared secret point. It is always ceiling(m / 8)
bytes long where m
is the bit size associated with the curve, i.e. the bit size of the order of the curve's coordinate field. When m
is not a multiple of 8, the byte containing the most significant bit of the shared secret is padded with zero bits. The byte order is either little-endian or big-endian depending on the curve type.
PSA_ECC_CURVE_CURVEXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in little-endian byte order. The bit size is 448 for Curve448 and 255 for Curve25519.PSA_ECC_CURVE_SECPXXX
and PSA_ECC_CURVE_BRAINPOOL_PXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m = ceiling(log_2(p))
for the field F_p
.PSA_ECC_CURVE_SECTXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m
for the field F_{2^m}
. Definition at line 1517 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_ECDH ((psa_algorithm_t)0x09020000) |
The elliptic curve Diffie-Hellman (ECDH) key agreement algorithm.
The shared secret produced by key agreement is the x-coordinate of the shared secret point. It is always ceiling(m / 8)
bytes long where m
is the bit size associated with the curve, i.e. the bit size of the order of the curve's coordinate field. When m
is not a multiple of 8, the byte containing the most significant bit of the shared secret is padded with zero bits. The byte order is either little-endian or big-endian depending on the curve type.
PSA_ECC_FAMILY_CURVEXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in little-endian byte order. The bit size is 448 for Curve448 and 255 for Curve25519.PSA_ECC_FAMILY_SECPXXX
and PSA_ECC_FAMILY_BRAINPOOL_PXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m = ceiling(log_2(p))
for the field F_p
.PSA_ECC_FAMILY_SECTXXX
), the shared secret is the x-coordinate of d_A Q_B = d_B Q_A
in big-endian byte order. The bit size is m
for the field F_{2^m}
. Definition at line 1909 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ECDSA | ( | hash_alg | ) | (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
ECDSA signature with hashing.
This is the ECDSA signature scheme defined by ANSI X9.62, with a random per-message secret number (k).
The representation of the signature as a byte string consists of the concatentation of the signature values r and s. Each of r and s is encoded as an N-octet string, where N is the length of the base point of the curve in octets. Each value is represented in big-endian order (most significant octet first).
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1170 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_ECDSA | ( | hash_alg | ) | (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
ECDSA signature with hashing.
This is the ECDSA signature scheme defined by ANSI X9.62, with a random per-message secret number (k).
The representation of the signature as a byte string consists of the concatentation of the signature values r and s. Each of r and s is encoded as an N-octet string, where N is the length of the base point of the curve in octets. Each value is represented in big-endian order (most significant octet first).
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1176 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_ECDSA | ( | hash_alg | ) | (PSA_ALG_ECDSA_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
ECDSA signature with hashing.
This is the ECDSA signature scheme defined by ANSI X9.62, with a random per-message secret number (k).
The representation of the signature as a byte string consists of the concatentation of the signature values r and s. Each of r and s is encoded as an N-octet string, where N is the length of the base point of the curve in octets. Each value is represented in big-endian order (most significant octet first).
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1404 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE |
ECDSA signature without hashing.
This is the same signature scheme as PSA_ALG_ECDSA(), but without specifying a hash algorithm. This algorithm may only be used to sign or verify a sequence of bytes that should be an already-calculated hash. Note that the input is padded with zeros on the left or truncated on the left as required to fit the curve size.
Definition at line 1181 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE |
ECDSA signature without hashing.
This is the same signature scheme as PSA_ALG_ECDSA(), but without specifying a hash algorithm. This algorithm may only be used to sign or verify a sequence of bytes that should be an already-calculated hash. Note that the input is padded with zeros on the left or truncated on the left as required to fit the curve size.
Definition at line 1187 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_ECDSA_ANY PSA_ALG_ECDSA_BASE |
ECDSA signature without hashing.
This is the same signature scheme as PSA_ALG_ECDSA(), but without specifying a hash algorithm. This algorithm may only be used to sign or verify a sequence of bytes that should be an already-calculated hash. Note that the input is padded with zeros on the left or truncated on the left as required to fit the curve size.
Definition at line 1415 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ED25519PH (PSA_ALG_HASH_EDDSA_BASE | (PSA_ALG_SHA_512 & PSA_ALG_HASH_MASK)) |
Edwards-curve digital signature algorithm with prehashing (HashEdDSA), using SHA-512 and the Edwards25519 curve.
See PSA_ALG_PURE_EDDSA regarding context support and the signature format.
This algorithm is Ed25519 as specified in RFC 8032. The curve is Edwards25519. The prehash is SHA-512. The hash function used internally is SHA-512.
This is a hash-and-sign algorithm: to calculate a signature, you can either:
Definition at line 1507 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_ED448PH (PSA_ALG_HASH_EDDSA_BASE | (PSA_ALG_SHAKE256_512 & PSA_ALG_HASH_MASK)) |
Edwards-curve digital signature algorithm with prehashing (HashEdDSA), using SHAKE256 and the Edwards448 curve.
See PSA_ALG_PURE_EDDSA regarding context support and the signature format.
This algorithm is Ed448 as specified in RFC 8032. The curve is Edwards448. The prehash is the first 64 bytes of the SHAKE256 output. The hash function used internally is the first 114 bytes of the SHAKE256 output.
This is a hash-and-sign algorithm: to calculate a signature, you can either:
Definition at line 1532 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_FFDH ((psa_algorithm_t)0x09010000) |
The finite-field Diffie-Hellman (DH) key agreement algorithm.
The shared secret produced by key agreement is g^{ab}
in big-endian format. It is ceiling(m / 8)
bytes long where m
is the size of the prime p
in bits.
Definition at line 1469 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_FFDH ((psa_algorithm_t)0x30100000) |
The finite-field Diffie-Hellman (DH) key agreement algorithm.
The shared secret produced by key agreement is g^{ab}
in big-endian format. It is ceiling(m / 8)
bytes long where m
is the size of the prime p
in bits.
Definition at line 1475 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_FFDH ((psa_algorithm_t)0x09010000) |
The finite-field Diffie-Hellman (DH) key agreement algorithm.
The shared secret produced by key agreement is g^{ab}
in big-endian format. It is ceiling(m / 8)
bytes long where m
is the size of the prime p
in bits.
Definition at line 1867 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). This may be a truncated or untruncated MAC algorithm. |
alg
is not a supported MAC algorithm. Definition at line 876 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). This may be a truncated or untruncated MAC algorithm. |
alg
is not a supported MAC algorithm. Definition at line 878 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_FULL_LENGTH_MAC | ( | mac_alg | ) |
Macro to build the base MAC algorithm corresponding to a truncated MAC algorithm.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(mac_alg ) is true). This may be a truncated or untruncated MAC algorithm. |
mac_alg
is not a supported MAC algorithm. Definition at line 1010 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_GCM ((psa_algorithm_t)0x05500200) |
The GCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1035 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_GCM ((psa_algorithm_t)0x06401002) |
The GCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1041 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_GCM ((psa_algorithm_t)0x05500200) |
The GCM authenticated encryption algorithm.
The underlying block cipher is determined by the key type.
Definition at line 1195 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_GET_HASH | ( | alg | ) | (((alg) & 0x000000ff) == 0 ? ((psa_algorithm_t)0) : 0x02000000 | ((alg) & 0x000000ff)) |
Get the hash used by a composite algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
0
if alg is not a composite algorithm that uses a hash. Definition at line 1959 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_HKDF | ( | hash_alg | ) | (PSA_ALG_HKDF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HKDF algorithm.
For example, PSA_ALG_HKDF(PSA_ALG_SHA256)
is HKDF using HMAC-SHA-256.
This key derivation algorithm uses the following inputs:
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1308 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_HKDF | ( | hash_alg | ) | (PSA_ALG_HKDF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HKDF algorithm.
For example, PSA_ALG_HKDF(PSA_ALG_SHA256)
is HKDF using HMAC-SHA-256.
This key derivation algorithm uses the following inputs:
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1314 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_HKDF | ( | hash_alg | ) | (PSA_ALG_HKDF_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HKDF algorithm.
For example, PSA_ALG_HKDF(PSA_ALG_SHA256)
is HKDF using HMAC-SHA-256.
This key derivation algorithm uses the following inputs:
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1645 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_HMAC | ( | hash_alg | ) | (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HMAC algorithm.
For example, PSA_ALG_HMAC(PSA_ALG_SHA_256) is HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 797 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_HMAC | ( | hash_alg | ) | (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HMAC algorithm.
For example, PSA_ALG_HMAC(PSA_ALG_SHA_256) is HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 799 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_HMAC | ( | hash_alg | ) | (PSA_ALG_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build an HMAC algorithm.
For example, PSA_ALG_HMAC(PSA_ALG_SHA_256) is HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 922 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 670 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 670 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 772 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER | ( | alg | ) |
Whether the specified algorithm is an AEAD mode on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm which is an AEAD mode based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1021 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER | ( | alg | ) |
Whether the specified algorithm is an AEAD mode on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm which is an AEAD mode based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1027 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_AEAD_ON_BLOCK_CIPHER | ( | alg | ) |
Whether the specified algorithm is an AEAD mode on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an AEAD algorithm which is an AEAD mode based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1181 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_ASYMMETRIC_ENCRYPTION | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION) |
Whether the specified algorithm is a public-key encryption algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a public-key encryption algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 692 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an asymmetric encryption algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 694 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an asymmetric encryption algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 796 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_BLOCK_CIPHER_MAC | ( | alg | ) |
Whether the specified algorithm is a MAC algorithm based on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 911 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_BLOCK_CIPHER_MAC | ( | alg | ) |
Whether the specified algorithm is a MAC algorithm based on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 913 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_BLOCK_CIPHER_MAC | ( | alg | ) |
Whether the specified algorithm is a MAC algorithm based on a block cipher.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm based on a block cipher, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1074 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_CIPHER | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER) |
Whether the specified algorithm is a symmetric cipher algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a symmetric cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 658 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_CIPHER | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER) |
Whether the specified algorithm is a symmetric cipher algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a symmetric cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 658 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_CIPHER | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_CIPHER) |
Whether the specified algorithm is a symmetric cipher algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a symmetric cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 760 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
This includes the raw elliptic curve Diffie-Hellman algorithm as well as elliptic curve Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an elliptic curve Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1527 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
This includes the raw elliptic curve Diffie-Hellman algorithm as well as elliptic curve Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an elliptic curve Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1533 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
This includes the raw elliptic curve Diffie-Hellman algorithm as well as elliptic curve Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an elliptic curve Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1925 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
This includes the raw finite field Diffie-Hellman algorithm as well as finite-field Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a finite field Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1483 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
This includes the raw finite field Diffie-Hellman algorithm as well as finite-field Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a finite field Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1489 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
This includes the raw finite field Diffie-Hellman algorithm as well as finite-field Diffie-Hellman followed by any supporter key derivation algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a finite field Diffie-Hellman algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key agreement algorithm identifier. Definition at line 1881 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_HASH | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH) |
Whether the specified algorithm is a hash algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 636 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_HASH | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH) |
Whether the specified algorithm is a hash algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 636 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_HASH | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH) |
Whether the specified algorithm is a hash algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 738 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_HASH_AND_SIGN | ( | alg | ) |
Whether the specified algorithm is a hash-and-sign algorithm.
Hash-and-sign algorithms are asymmetric (public-key) signature algorithms structured in two parts: first the calculation of a hash in a way that does not depend on the key, then the calculation of a signature from the hash value and the key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash-and-sign algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1231 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_HASH_AND_SIGN | ( | alg | ) |
Whether the specified algorithm is a hash-and-sign algorithm.
Hash-and-sign algorithms are public-key signature algorithms structured in two parts: first the calculation of a hash in a way that does not depend on the key, then the calculation of a signature from the hash value and the key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash-and-sign algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1237 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_HASH_AND_SIGN | ( | alg | ) |
Whether the specified algorithm is a hash-and-sign algorithm.
Hash-and-sign algorithms are asymmetric (public-key) signature algorithms structured in two parts: first the calculation of a hash in a way that does not depend on the key, then the calculation of a signature from the hash value and the key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a hash-and-sign algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1553 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_HKDF | ( | alg | ) | (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE) |
Whether the specified algorithm is an HKDF algorithm.
HKDF is a family of key derivation algorithms that are based on a hash function and the HMAC construction.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HKDF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1321 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_HKDF | ( | alg | ) | (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE) |
Whether the specified algorithm is an HKDF algorithm.
HKDF is a family of key derivation algorithms that are based on a hash function and the HMAC construction.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HKDF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1327 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_HKDF | ( | alg | ) | (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_HKDF_BASE) |
Whether the specified algorithm is an HKDF algorithm.
HKDF is a family of key derivation algorithms that are based on a hash function and the HMAC construction.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HKDF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1658 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_HMAC | ( | alg | ) |
Whether the specified algorithm is an HMAC algorithm.
HMAC is a family of MAC algorithms that are based on a hash function.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HMAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 813 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_HMAC | ( | alg | ) |
Whether the specified algorithm is an HMAC algorithm.
HMAC is a family of MAC algorithms that are based on a hash function.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HMAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 815 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_HMAC | ( | alg | ) |
Whether the specified algorithm is an HMAC algorithm.
HMAC is a family of MAC algorithms that are based on a hash function.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an HMAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 938 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 703 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 705 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 807 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key derivation algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 714 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key derivation algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 716 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key derivation algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 818 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_KEY_DERIVATION_STRETCHING | ( | alg | ) |
Whether the specified algorithm is a key stretching / password hashing algorithm.
A key stretching / password hashing algorithm is a key derivation algorithm that is suitable for use with a low-entropy secret such as a password. Equivalently, it's a key derivation algorithm that uses a PSA_KEY_DERIVATION_INPUT_PASSWORD input step.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a key stretching / password hashing algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 835 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_MAC | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC) |
Whether the specified algorithm is a MAC algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 647 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_MAC | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC) |
Whether the specified algorithm is a MAC algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 647 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_MAC | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_MAC) |
Whether the specified algorithm is a MAC algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a MAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 749 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_PBKDF2_HMAC | ( | alg | ) | (((alg) & ~PSA_ALG_HASH_MASK) == PSA_ALG_PBKDF2_HMAC_BASE) |
Whether the specified algorithm is a PBKDF2-HMAC algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a PBKDF2-HMAC algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1799 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_RAW_KEY_AGREEMENT | ( | alg | ) |
Whether the specified algorithm is a raw key agreement algorithm.
A raw key agreement algorithm is one that does not specify a key derivation function. Usually, raw key agreement algorithms are constructed directly with a PSA_ALG_xxx
macro while non-raw key agreement algorithms are constructed with PSA_ALG_KEY_AGREEMENT().
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a raw key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1455 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_RAW_KEY_AGREEMENT | ( | alg | ) |
Whether the specified algorithm is a raw key agreement algorithm.
A raw key agreement algorithm is one that does not specify a key derivation function. Usually, raw key agreement algorithms are constructed directly with a PSA_ALG_xxx
macro while non-raw key agreement algorithms are constructed with PSA_ALG_KEY_AGREEMENT().
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a raw key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1461 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_RAW_KEY_AGREEMENT | ( | alg | ) |
Whether the specified algorithm is a raw key agreement algorithm.
A raw key agreement algorithm is one that does not specify a key derivation function. Usually, raw key agreement algorithms are constructed directly with a PSA_ALG_xxx
macro while non-raw key agreement algorithms are constructed with PSA_ALG_KEY_AGREEMENT().
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a raw key agreement algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1853 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_SIGN | ( | alg | ) | (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_SIGN) |
Whether the specified algorithm is a public-key signature algorithm.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a public-key signature algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 681 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an asymmetric signature algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 682 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is an asymmetric signature algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 784 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_SIGN_MESSAGE | ( | alg | ) | (PSA_ALG_IS_HASH_AND_SIGN(alg) || (alg) == PSA_ALG_PURE_EDDSA ) |
Whether the specified algorithm is a signature algorithm that can be used with psa_sign_message() and psa_verify_message().
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a signature algorithm that can only be used to sign an already-calculated hash. 0 if alg
is not a signature algorithm. This macro can return either 0 or 1 if alg
is not a supported algorithm identifier. Definition at line 1569 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_STREAM_CIPHER | ( | alg | ) |
Whether the specified algorithm is a stream cipher.
A stream cipher is a symmetric cipher that encrypts or decrypts messages by applying a bitwise-xor with a stream of bytes that is generated from a key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a stream cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier or if it is not a symmetric cipher algorithm. Definition at line 930 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_STREAM_CIPHER | ( | alg | ) |
Whether the specified algorithm is a stream cipher.
A stream cipher is a symmetric cipher that encrypts or decrypts messages by applying a bitwise-xor with a stream of bytes that is generated from a key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a stream cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier or if it is not a symmetric cipher algorithm. Definition at line 932 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_STREAM_CIPHER | ( | alg | ) |
Whether the specified algorithm is a stream cipher.
A stream cipher is a symmetric cipher that encrypts or decrypts messages by applying a bitwise-xor with a stream of bytes that is generated from a key.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a stream cipher algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported algorithm identifier or if it is not a symmetric cipher algorithm. Definition at line 1093 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PRF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1364 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PRF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1370 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PRF algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1701 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PSK to MS algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1410 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PSK to MS algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1416 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a TLS-1.2 PSK to MS algorithm, 0 otherwise. This macro may return either 0 or 1 if alg
is not a supported key derivation algorithm identifier. Definition at line 1747 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_VENDOR_DEFINED | ( | alg | ) | (((alg) & PSA_ALG_VENDOR_FLAG) != 0) |
Whether an algorithm is vendor-defined.
See also PSA_ALG_VENDOR_FLAG.
Definition at line 625 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_VENDOR_DEFINED | ( | alg | ) | (((alg) & PSA_ALG_VENDOR_FLAG) != 0) |
Whether an algorithm is vendor-defined.
See also PSA_ALG_VENDOR_FLAG.
Definition at line 625 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_VENDOR_DEFINED | ( | alg | ) | (((alg) & PSA_ALG_VENDOR_FLAG) != 0) |
Whether an algorithm is vendor-defined.
See also PSA_ALG_VENDOR_FLAG.
Definition at line 727 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_IS_WILDCARD | ( | alg | ) |
Whether the specified algorithm encoding is a wildcard.
Wildcard values may only be used to set the usage algorithm field in a policy, not to perform an operation.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a wildcard algorithm encoding. alg
is a non-wildcard algorithm encoding (suitable for an operation). alg
is not a supported algorithm identifier. Definition at line 1543 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_IS_WILDCARD | ( | alg | ) |
Whether the specified algorithm encoding is a wildcard.
Wildcard values may only be used to set the usage algorithm field in a policy, not to perform an operation.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a wildcard algorithm encoding. alg
is a non-wildcard algorithm encoding (suitable for an operation). alg
is not a supported algorithm identifier. Definition at line 1549 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_IS_WILDCARD | ( | alg | ) |
Whether the specified algorithm encoding is a wildcard.
Wildcard values may only be used to set the usage algorithm field in a policy, not to perform an operation.
alg | An algorithm identifier (value of type psa_algorithm_t). |
alg
is a wildcard algorithm encoding. alg
is a non-wildcard algorithm encoding (suitable for an operation). alg
is not a supported algorithm identifier. Definition at line 1941 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
ka_alg | A key agreement algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_AGREEMENT(ka_alg ) is true). |
kdf_alg | A key derivation algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_DERIVATION(kdf_alg ) is true). |
ka_alg
is not a supported key agreement algorithm or kdf_alg
is not a supported key derivation algorithm. Definition at line 1432 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
ka_alg | A key agreement algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_AGREEMENT(ka_alg ) is true). |
kdf_alg | A key derivation algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_DERIVATION(kdf_alg ) is true). |
ka_alg
is not a supported key agreement algorithm or kdf_alg
is not a supported key derivation algorithm. Definition at line 1438 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
ka_alg | A key agreement algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_AGREEMENT(ka_alg ) is true). |
kdf_alg | A key derivation algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_KEY_DERIVATION(kdf_alg ) is true). |
ka_alg
is not a supported key agreement algorithm or kdf_alg
is not a supported key derivation algorithm. Definition at line 1830 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_MD2 ((psa_algorithm_t)0x01000001) |
MD2.
Definition at line 719 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_MD2 ((psa_algorithm_t)0x02000001) |
MD2.
Definition at line 721 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_MD4 ((psa_algorithm_t)0x01000002) |
MD4.
Definition at line 721 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_MD4 ((psa_algorithm_t)0x02000002) |
MD4.
Definition at line 723 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_MD5 ((psa_algorithm_t)0x01000003) |
MD5.
Definition at line 723 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_MD5 ((psa_algorithm_t)0x02000003) |
MD5.
Definition at line 725 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_MD5 ((psa_algorithm_t)0x02000003) |
MD5.
Definition at line 841 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_OFB ((psa_algorithm_t)0x04c01200) |
The OFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 963 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_OFB ((psa_algorithm_t)0x04c00003) |
The OFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 969 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_OFB ((psa_algorithm_t)0x04c01200) |
The OFB stream cipher mode.
The underlying block cipher is determined by the key type.
Definition at line 1123 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_PBKDF2_AES_CMAC_PRF_128 ((psa_algorithm_t)0x08800200) |
The PBKDF2-AES-CMAC-PRF-128 password hashing / key stretching algorithm.
PBKDF2 is defined by PKCS#5, republished as RFC 8018 (section 5.2). This macro specifies the PBKDF2 algorithm constructed using the AES-CMAC-PRF-128 PRF specified by RFC 4615.
This key derivation algorithm uses the same inputs as PSA_ALG_PBKDF2_HMAC() with the same constraints.
Definition at line 1811 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_PBKDF2_HMAC | ( | hash_alg | ) | (PSA_ALG_PBKDF2_HMAC_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
Macro to build a PBKDF2-HMAC password hashing / key stretching algorithm.
PBKDF2 is defined by PKCS#5, republished as RFC 8018 (section 5.2). This macro specifies the PBKDF2 algorithm constructed using a PRF based on HMAC with the specified hash. For example, PSA_ALG_PBKDF2_HMAC(PSA_ALG_SHA256)
specifies PBKDF2 using the PRF HMAC-SHA-256.
This key derivation algorithm uses the following inputs, which must be provided in the following order:
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1788 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_PURE_EDDSA ((psa_algorithm_t)0x06000800) |
Edwards-curve digital signature algorithm without prehashing (PureEdDSA), using standard parameters.
Contexts are not supported in the current version of this specification because there is no suitable signature interface that can take the context as a parameter. A future version of this specification may add suitable functions and extend this algorithm to support contexts.
PureEdDSA requires an elliptic curve key on a twisted Edwards curve. In this specification, the following curves are supported:
This algorithm can be used with psa_sign_message() and psa_verify_message(). Since there is no prehashing, it cannot be used with psa_sign_hash() or psa_verify_hash().
The signature format is the concatenation of R and S as defined by RFC 8032 §5.1.6 and §5.2.6 (a 64-byte string for Ed25519, a 114-byte string for Ed448).
Definition at line 1480 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x01000004) |
PSA_ALG_RIPEMD160.
Definition at line 725 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x02000004) |
PSA_ALG_RIPEMD160.
Definition at line 727 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x02000004) |
PSA_ALG_RIPEMD160.
Definition at line 843 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_RSA_OAEP | ( | hash_alg | ) | (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA OAEP encryption.
This is the encryption scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSAES-OAEP, with the message generation function MGF1.
hash_alg | The hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true) to use for MGF1. |
hash_alg
is not a supported hash algorithm. Definition at line 1278 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_RSA_OAEP | ( | hash_alg | ) | (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA OAEP encryption.
This is the encryption scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSAES-OAEP, with the message generation function MGF1.
hash_alg | The hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true) to use for MGF1. |
hash_alg
is not a supported hash algorithm. Definition at line 1284 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_RSA_OAEP | ( | hash_alg | ) | (PSA_ALG_RSA_OAEP_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA OAEP encryption.
This is the encryption scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSAES-OAEP, with the message generation function MGF1.
hash_alg | The hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true) to use for MGF1. |
hash_alg
is not a supported hash algorithm. Definition at line 1615 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x07000200) |
RSA PKCS#1 v1.5 encryption.
Definition at line 1261 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x12020000) |
RSA PKCS#1 v1.5 encryption.
Definition at line 1267 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x07000200) |
RSA PKCS#1 v1.5 encryption.
Definition at line 1598 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PKCS1-v1_5.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1113 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PKCS1-v1_5.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1119 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PKCS1-v1_5.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1347 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE |
Raw PKCS#1 v1.5 signature.
The input to this algorithm is the DigestInfo structure used by RFC 8017 (PKCS#1: RSA Cryptography Specifications), §9.2 steps 3–6.
Definition at line 1121 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE |
Raw PKCS#1 v1.5 signature.
The input to this algorithm is the DigestInfo structure used by RFC 8017 (PKCS#1: RSA Cryptography Specifications), §9.2 steps 3–6.
Definition at line 1127 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PKCS1V15_SIGN_RAW PSA_ALG_RSA_PKCS1V15_SIGN_BASE |
Raw PKCS#1 v1.5 signature.
The input to this algorithm is the DigestInfo structure used by RFC 8017 (PKCS#1: RSA Cryptography Specifications), §9.2 steps 3–6.
Definition at line 1355 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PSS | ( | hash_alg | ) | (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA PSS signature with hashing.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PSS, with the message generation function MGF1, and with a salt length equal to the length of the hash. The specified hash algorithm is used to hash the input message, to create the salted hash, and for the mask generation.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1144 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_RSA_PSS | ( | hash_alg | ) | (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA PSS signature with hashing.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PSS, with the message generation function MGF1, and with a salt length equal to the length of the hash. The specified hash algorithm is used to hash the input message, to create the salted hash, and for the mask generation.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1150 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_RSA_PSS | ( | hash_alg | ) | (PSA_ALG_RSA_PSS_BASE | ((hash_alg) & PSA_ALG_HASH_MASK)) |
RSA PSS signature with hashing.
This is the signature scheme defined by RFC 8017 (PKCS#1: RSA Cryptography Specifications) under the name RSASSA-PSS, with the message generation function MGF1, and with a salt length equal to the length of the hash. The specified hash algorithm is used to hash the input message, to create the salted hash, and for the mask generation.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). This includes PSA_ALG_ANY_HASH when specifying the algorithm in a usage policy. |
hash_alg
is not a supported hash algorithm. Definition at line 1378 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_224 ((psa_algorithm_t)0x01000010) |
SHA3-224.
Definition at line 741 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_224 ((psa_algorithm_t)0x02000010) |
SHA3-224.
Definition at line 743 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA3_224 ((psa_algorithm_t)0x02000010) |
SHA3-224.
Definition at line 859 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_256 ((psa_algorithm_t)0x01000011) |
SHA3-256.
Definition at line 743 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_256 ((psa_algorithm_t)0x02000011) |
SHA3-256.
Definition at line 745 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA3_256 ((psa_algorithm_t)0x02000011) |
SHA3-256.
Definition at line 861 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x01000012) |
SHA3-384.
Definition at line 745 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x02000012) |
SHA3-384.
Definition at line 747 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x02000012) |
SHA3-384.
Definition at line 863 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x01000013) |
SHA3-512.
Definition at line 747 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x02000013) |
SHA3-512.
Definition at line 749 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x02000013) |
SHA3-512.
Definition at line 865 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_1 ((psa_algorithm_t)0x01000005) |
SHA1.
Definition at line 727 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_1 ((psa_algorithm_t)0x02000005) |
SHA1.
Definition at line 729 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_1 ((psa_algorithm_t)0x02000005) |
SHA1.
Definition at line 845 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_224 ((psa_algorithm_t)0x01000008) |
SHA2-224.
Definition at line 729 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_224 ((psa_algorithm_t)0x02000008) |
SHA2-224.
Definition at line 731 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_224 ((psa_algorithm_t)0x02000008) |
SHA2-224.
Definition at line 847 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_256 ((psa_algorithm_t)0x01000009) |
SHA2-256.
Definition at line 731 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_256 ((psa_algorithm_t)0x02000009) |
SHA2-256.
Definition at line 733 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_256 ((psa_algorithm_t)0x02000009) |
SHA2-256.
Definition at line 849 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_384 ((psa_algorithm_t)0x0100000a) |
SHA2-384.
Definition at line 733 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_384 ((psa_algorithm_t)0x0200000a) |
SHA2-384.
Definition at line 735 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_384 ((psa_algorithm_t)0x0200000a) |
SHA2-384.
Definition at line 851 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512 ((psa_algorithm_t)0x0100000b) |
SHA2-512.
Definition at line 735 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512 ((psa_algorithm_t)0x0200000b) |
SHA2-512.
Definition at line 737 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_512 ((psa_algorithm_t)0x0200000b) |
SHA2-512.
Definition at line 853 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0100000c) |
SHA2-512/224.
Definition at line 737 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0200000c) |
SHA2-512/224.
Definition at line 739 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0200000c) |
SHA2-512/224.
Definition at line 855 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0100000d) |
SHA2-512/256.
Definition at line 739 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0200000d) |
SHA2-512/256.
Definition at line 741 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0200000d) |
SHA2-512/256.
Definition at line 857 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SHAKE256_512 ((psa_algorithm_t)0x02000015) |
The first 512 bits (64 bytes) of the SHAKE256 output.
This is the prehashing for Ed448ph (see PSA_ALG_ED448PH). For other scenarios where a hash function based on SHA3/SHAKE is desired, SHA3-512 has the same output size and a (theoretically) higher security strength.
Definition at line 872 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_SIGN_GET_HASH | ( | alg | ) |
Get the hash used by a hash-and-sign signature algorithm.
A hash-and-sign algorithm is a signature algorithm which is composed of two phases: first a hashing phase which does not use the key and produces a hash of the input message, then a signing phase which only uses the hash and the key and not the message itself.
alg | A signature algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_SIGN(alg ) is true). |
alg
is a hash-and-sign algorithm. alg
is a signature algorithm that does not follow the hash-and-sign structure. alg
is not a signature algorithm or if it is not supported by the implementation. Definition at line 1253 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_SIGN_GET_HASH | ( | alg | ) |
Get the hash used by a hash-and-sign signature algorithm.
A hash-and-sign algorithm is a signature algorithm which is composed of two phases: first a hashing phase which does not use the key and produces a hash of the input message, then a signing phase which only uses the hash and the key and not the message itself.
alg | A signature algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_SIGN(alg ) is true). |
alg
is a hash-and-sign algorithm. alg
is a signature algorithm that does not follow the hash-and-sign structure. alg
is not a signature algorithm or if it is not supported by the implementation. Definition at line 1259 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_SIGN_GET_HASH | ( | alg | ) |
Get the hash used by a hash-and-sign signature algorithm.
A hash-and-sign algorithm is a signature algorithm which is composed of two phases: first a hashing phase which does not use the key and produces a hash of the input message, then a signing phase which only uses the hash and the key and not the message itself.
alg | A signature algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_SIGN(alg ) is true). |
alg
is a hash-and-sign algorithm. alg
is a signature algorithm that does not follow the hash-and-sign structure. alg
is not a signature algorithm or if it is not supported by the implementation. Definition at line 1590 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_STREAM_CIPHER ((psa_algorithm_t)0x04800100) |
The stream cipher mode of a stream cipher algorithm.
The underlying stream cipher is determined by the key type.
Definition at line 942 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_STREAM_CIPHER ((psa_algorithm_t)0x04800100) |
The stream cipher mode of a stream cipher algorithm.
The underlying stream cipher is determined by the key type.
Definition at line 1102 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
TLS 1.2 uses a custom pseudorandom function (PRF) for key schedule, specified in Section 5 of RFC 5246. It is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2 key expansion, the seed is the concatenation of ServerHello.Random + ClientHello.Random, and the label is "key expansion".
For example, PSA_ALG_TLS12_PRF(PSA_ALG_SHA256)
represents the TLS 1.2 PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1353 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
TLS 1.2 uses a custom pseudorandom function (PRF) for key schedule, specified in Section 5 of RFC 5246. It is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2 key expansion, the seed is the concatenation of ServerHello.Random + ClientHello.Random, and the label is "key expansion".
For example, PSA_ALG_TLS12_PRF(PSA_ALG_SHA256)
represents the TLS 1.2 PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1359 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
TLS 1.2 uses a custom pseudorandom function (PRF) for key schedule, specified in Section 5 of RFC 5246. It is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2 key expansion, the seed is the concatenation of ServerHello.Random + ClientHello.Random, and the label is "key expansion".
For example, PSA_ALG_TLS12_PRF(PSA_ALG_SHA256)
represents the TLS 1.2 PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1690 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
In a pure-PSK handshake in TLS 1.2, the master secret is derived from the PreSharedKey (PSK) through the application of padding (RFC 4279, Section 2) and the TLS-1.2 PRF (RFC 5246, Section 5). The latter is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2, the seed (which is forwarded to the TLS-1.2 PRF) is the concatenation of the ClientHello.Random + ServerHello.Random, and the label is "master secret" or "extended master secret".
For example, PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA256)
represents the TLS-1.2 PSK to MasterSecret derivation PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1399 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
In a pure-PSK handshake in TLS 1.2, the master secret is derived from the PreSharedKey (PSK) through the application of padding (RFC 4279, Section 2) and the TLS-1.2 PRF (RFC 5246, Section 5). The latter is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2, the seed (which is forwarded to the TLS-1.2 PRF) is the concatenation of the ClientHello.Random + ServerHello.Random, and the label is "master secret" or "extended master secret".
For example, PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA256)
represents the TLS-1.2 PSK to MasterSecret derivation PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1405 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
In a pure-PSK handshake in TLS 1.2, the master secret is derived from the PreSharedKey (PSK) through the application of padding (RFC 4279, Section 2) and the TLS-1.2 PRF (RFC 5246, Section 5). The latter is based on HMAC and can be used with either SHA-256 or SHA-384.
This key derivation algorithm uses the following inputs, which must be passed in the order given here:
For the application to TLS-1.2, the seed (which is forwarded to the TLS-1.2 PRF) is the concatenation of the ClientHello.Random + ServerHello.Random, and the label is "master secret" or "extended master secret".
For example, PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA256)
represents the TLS-1.2 PSK to MasterSecret derivation PRF using HMAC-SHA-256.
hash_alg | A hash algorithm (PSA_ALG_XXX value such that PSA_ALG_IS_HASH(hash_alg ) is true). |
hash_alg
is not a supported hash algorithm. Definition at line 1736 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_TRUNCATED_MAC | ( | mac_alg, | |
mac_length | |||
) |
Macro to build a truncated MAC algorithm.
A truncated MAC algorithm is identical to the corresponding MAC algorithm except that the MAC value for the truncated algorithm consists of only the first mac_length
bytes of the MAC value for the untruncated algorithm.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). This may be a truncated or untruncated MAC algorithm. |
mac_length | Desired length of the truncated MAC in bytes. This must be at most the full length of the MAC and must be at least an implementation-specified minimum. The implementation-specified minimum shall not be zero. |
alg
is not a supported MAC algorithm or if mac_length
is too small or too large for the specified MAC algorithm. Definition at line 860 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_TRUNCATED_MAC | ( | mac_alg, | |
mac_length | |||
) |
Macro to build a truncated MAC algorithm.
A truncated MAC algorithm is identical to the corresponding MAC algorithm except that the MAC value for the truncated algorithm consists of only the first mac_length
bytes of the MAC value for the untruncated algorithm.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). This may be a truncated or untruncated MAC algorithm. |
mac_length | Desired length of the truncated MAC in bytes. This must be at most the full length of the MAC and must be at least an implementation-specified minimum. The implementation-specified minimum shall not be zero. |
alg
is not a supported MAC algorithm or if mac_length
is too small or too large for the specified MAC algorithm. Definition at line 862 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_TRUNCATED_MAC | ( | mac_alg, | |
mac_length | |||
) |
Macro to build a truncated MAC algorithm.
A truncated MAC algorithm is identical to the corresponding MAC algorithm except that the MAC value for the truncated algorithm consists of only the first mac_length
bytes of the MAC value for the untruncated algorithm.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(mac_alg ) is true). This may be a truncated or untruncated MAC algorithm. |
mac_length | Desired length of the truncated MAC in bytes. This must be at most the full length of the MAC and must be at least an implementation-specified minimum. The implementation-specified minimum shall not be zero. |
mac_alg
is not a supported MAC algorithm or if mac_length
is too small or too large for the specified MAC algorithm. Definition at line 993 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_VENDOR_FLAG ((psa_algorithm_t)0x80000000) |
Vendor-defined algorithm flag.
Algorithms defined by this standard will never have the PSA_ALG_VENDOR_FLAG bit set. Vendors who define additional algorithms must use an encoding with the PSA_ALG_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 609 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_VENDOR_FLAG ((psa_algorithm_t)0x80000000) |
Vendor-defined algorithm flag.
Algorithms defined by this standard will never have the PSA_ALG_VENDOR_FLAG bit set. Vendors who define additional algorithms must use an encoding with the PSA_ALG_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 609 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_VENDOR_FLAG ((psa_algorithm_t)0x80000000) |
Vendor-defined algorithm flag.
Algorithms defined by this standard will never have the PSA_ALG_VENDOR_FLAG bit set. Vendors who define additional algorithms must use an encoding with the PSA_ALG_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 711 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ALG_XTS ((psa_algorithm_t)0x0440ff00) |
The XTS cipher mode.
XTS is a cipher mode which is built from a block cipher. It requires at least one full block of input, but beyond this minimum the input does not need to be a whole number of blocks.
Definition at line 971 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ALG_XTS ((psa_algorithm_t)0x044000ff) |
The XTS cipher mode.
XTS is a cipher mode which is built from a block cipher. It requires at least one full block of input, but beyond this minimum the input does not need to be a whole number of blocks.
Definition at line 977 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ALG_XTS ((psa_algorithm_t)0x0440ff00) |
The XTS cipher mode.
XTS is a cipher mode which is built from a block cipher. It requires at least one full block of input, but beyond this minimum the input does not need to be a whole number of blocks.
Definition at line 1131 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_BLOCK_CIPHER_BLOCK_LENGTH | ( | type | ) |
The block size of a block cipher.
type | A cipher key type (value of type psa_key_type_t). |
type
is not a supported cipher key type.Definition at line 699 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_BLOCK_CIPHER_BLOCK_SIZE | ( | type | ) |
The block size of a block cipher.
type | A cipher key type (value of type psa_key_type_t). |
type
is not a supported cipher key type.Definition at line 593 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_BLOCK_CIPHER_BLOCK_SIZE | ( | type | ) |
The block size of a block cipher.
type | A cipher key type (value of type psa_key_type_t). |
type
is not a supported cipher key type.Definition at line 597 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_DH_FAMILY_RFC7919 ((psa_dh_family_t) 0x03) |
Diffie-Hellman groups defined in RFC 7919 Appendix A.
This family includes groups with the following key sizes (in bits): 2048, 3072, 4096, 6144, 8192. A given implementation may support all of these sizes or only a subset.
Definition at line 575 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_DH_FAMILY_RFC7919 ((psa_dh_family_t) 0x03) |
Diffie-Hellman groups defined in RFC 7919 Appendix A.
This family includes groups with the following key sizes (in bits): 2048, 3072, 4096, 6144, 8192. A given implementation may support all of these sizes or only a subset.
Definition at line 677 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_DH_GROUP_VENDOR_MAX ((psa_dh_group_t) 0x01fd) |
Maximum value for a vendor-defined Diffie Hellman group identifier.
The range for vendor-defined group identifiers is a subset of the IANA registry private use range, 0x01fc
- 0x01ff
.
Definition at line 573 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_DH_GROUP_VENDOR_MIN ((psa_dh_group_t) 0x01fc) |
Minimum value for a vendor-defined Diffie Hellman group identifier.
The range for vendor-defined group identifiers is a subset of the IANA registry private use range, 0x01fc
- 0x01ff
.
Definition at line 567 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ECC_CURVE_CURVE25519 ((psa_ecc_curve_t) 0x001d) |
Curve25519.
This is the curve defined in Bernstein et al., Curve25519: new Diffie-Hellman speed records, LNCS 3958, 2006. The algorithm PSA_ALG_ECDH performs X25519 when used with this curve.
Definition at line 492 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ECC_CURVE_CURVE448 ((psa_ecc_curve_t) 0x001e) |
Curve448.
This is the curve defined in Hamburg, Ed448-Goldilocks, a new elliptic curve, NIST ECC Workshop, 2015. The algorithm PSA_ALG_ECDH performs X448 when used with this curve.
Definition at line 499 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ECC_CURVE_VENDOR_MAX ((psa_ecc_curve_t) 0xfe7f) |
Maximum value for a vendor-defined ECC curve identifier.
The range for vendor-defined curve identifiers is a subset of the IANA registry private use range, 0xfe00
- 0xfeff
.
Definition at line 512 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ECC_CURVE_VENDOR_MIN ((psa_ecc_curve_t) 0xfe00) |
Minimum value for a vendor-defined ECC curve identifier.
The range for vendor-defined curve identifiers is a subset of the IANA registry private use range, 0xfe00
- 0xfeff
.
Definition at line 506 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_BRAINPOOL_P_R1 ((psa_ecc_family_t) 0x30) |
Brainpool P random curves.
This family comprises the following curves: brainpoolP160r1, brainpoolP192r1, brainpoolP224r1, brainpoolP256r1, brainpoolP320r1, brainpoolP384r1, brainpoolP512r1. It is defined in RFC 5639.
Definition at line 518 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_BRAINPOOL_P_R1 ((psa_ecc_family_t) 0x30) |
Brainpool P random curves.
This family comprises the following curves: brainpoolP160r1, brainpoolP192r1, brainpoolP224r1, brainpoolP256r1, brainpoolP320r1, brainpoolP384r1, brainpoolP512r1. It is defined in RFC 5639.
Definition at line 604 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_MONTGOMERY ((psa_ecc_family_t) 0x41) |
Curve25519 and Curve448.
This family comprises the following Montgomery curves:
Definition at line 530 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_MONTGOMERY ((psa_ecc_family_t) 0x41) |
Curve25519 and Curve448.
This family comprises the following Montgomery curves:
Definition at line 616 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECP_K1 ((psa_ecc_family_t) 0x17) |
SEC Koblitz curves over prime fields.
This family comprises the following curves: secp192k1, secp224k1, secp256k1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 467 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECP_K1 ((psa_ecc_family_t) 0x17) |
SEC Koblitz curves over prime fields.
This family comprises the following curves: secp192k1, secp224k1, secp256k1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 553 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECP_R1 ((psa_ecc_family_t) 0x12) |
SEC random curves over prime fields.
This family comprises the following curves: secp192k1, secp224r1, secp256r1, secp384r1, secp521r1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 477 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECP_R1 ((psa_ecc_family_t) 0x12) |
SEC random curves over prime fields.
This family comprises the following curves: secp192k1, secp224r1, secp256r1, secp384r1, secp521r1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 563 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_K1 ((psa_ecc_family_t) 0x27) |
SEC Koblitz curves over binary fields.
This family comprises the following curves: sect163k1, sect233k1, sect239k1, sect283k1, sect409k1, sect571k1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 489 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_K1 ((psa_ecc_family_t) 0x27) |
SEC Koblitz curves over binary fields.
This family comprises the following curves: sect163k1, sect233k1, sect239k1, sect283k1, sect409k1, sect571k1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 575 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_R1 ((psa_ecc_family_t) 0x22) |
SEC random curves over binary fields.
This family comprises the following curves: sect163r1, sect233r1, sect283r1, sect409r1, sect571r1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 499 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_R1 ((psa_ecc_family_t) 0x22) |
SEC random curves over binary fields.
This family comprises the following curves: sect163r1, sect233r1, sect283r1, sect409r1, sect571r1. They are defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 585 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_R2 ((psa_ecc_family_t) 0x2b) |
SEC additional random curves over binary fields.
This family comprises the following curve: sect163r2. It is defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 509 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_ECC_FAMILY_SECT_R2 ((psa_ecc_family_t) 0x2b) |
SEC additional random curves over binary fields.
This family comprises the following curve: sect163r2. It is defined in Standards for Efficient Cryptography, SEC 2: Recommended Elliptic Curve Domain Parameters. https://www.secg.org/sec2-v2.pdf
Definition at line 595 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_ECC_FAMILY_TWISTED_EDWARDS ((psa_ecc_family_t) 0x42) |
The twisted Edwards curves Ed25519 and Ed448.
These curves are suitable for EdDSA (PSA_ALG_PURE_EDDSA for both curves, PSA_ALG_ED25519PH for the 255-bit curve, PSA_ALG_ED448PH for the 448-bit curve).
This family comprises the following twisted Edwards curves:
Definition at line 632 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_AES ((psa_key_type_t)0x40000001) |
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 32 bytes (AES-256).
Definition at line 376 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_AES ((psa_key_type_t)0x2400) |
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 32 bytes (AES-256).
Definition at line 382 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_AES ((psa_key_type_t)0x2400) |
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 32 bytes (AES-256).
Definition at line 460 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ARC4 ((psa_key_type_t)0x40000004) |
Key for the RC4 stream cipher.
Note that RC4 is weak and deprecated and should only be used in legacy protocols.
Definition at line 397 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ARC4 ((psa_key_type_t)0x2002) |
Key for the RC4 stream cipher.
Note that RC4 is weak and deprecated and should only be used in legacy protocols.
Definition at line 403 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_CAMELLIA ((psa_key_type_t)0x40000003) |
Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher.
Definition at line 391 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_CAMELLIA ((psa_key_type_t)0x2403) |
Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher.
Definition at line 397 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_CAMELLIA ((psa_key_type_t)0x2403) |
Key for a cipher, AEAD or MAC algorithm based on the Camellia block cipher.
Definition at line 475 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_CHACHA20 ((psa_key_type_t)0x40000005) |
Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm.
ChaCha20 and the ChaCha20_Poly1305 construction are defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Definition at line 406 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_CHACHA20 ((psa_key_type_t)0x2004) |
Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm.
ChaCha20 and the ChaCha20_Poly1305 construction are defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Definition at line 412 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_CHACHA20 ((psa_key_type_t)0x2004) |
Key for the ChaCha20 stream cipher or the Chacha20-Poly1305 AEAD algorithm.
ChaCha20 and the ChaCha20_Poly1305 construction are defined in RFC 7539.
Implementations must support 12-byte nonces, may support 8-byte nonces, and should reject other sizes.
Definition at line 484 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x52000000) |
A secret for key derivation.
The key policy determines which key derivation algorithm the key can be used for.
Definition at line 369 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x1200) |
A secret for key derivation.
The key policy determines which key derivation algorithm the key can be used for.
Definition at line 375 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_DERIVE ((psa_key_type_t)0x1200) |
A secret for key derivation.
This key type is for high-entropy secrets only. For low-entropy secrets, PSA_KEY_TYPE_PASSWORD should be used instead.
These keys can be used as the PSA_KEY_DERIVATION_INPUT_SECRET or PSA_KEY_DERIVATION_INPUT_PASSWORD input of key derivation algorithms.
The key policy determines which key derivation algorithm the key can be used for.
Definition at line 415 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DES ((psa_key_type_t)0x40000002) |
Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES).
The size of the key can be 8 bytes (single DES), 16 bytes (2-key 3DES) or 24 bytes (3-key 3DES).
Note that single DES and 2-key 3DES are weak and strongly deprecated and should only be used to decrypt legacy data. 3-key 3DES is weak and deprecated and should only be used in legacy protocols.
Definition at line 387 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DES ((psa_key_type_t)0x2301) |
Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES).
The size of the key can be 8 bytes (single DES), 16 bytes (2-key 3DES) or 24 bytes (3-key 3DES).
Note that single DES and 2-key 3DES are weak and strongly deprecated and should only be used to decrypt legacy data. 3-key 3DES is weak and deprecated and should only be used in legacy protocols.
Definition at line 393 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_DES ((psa_key_type_t)0x2301) |
Key for a cipher or MAC algorithm based on DES or 3DES (Triple-DES).
The size of the key can be 64 bits (single DES), 128 bits (2-key 3DES) or 192 bits (3-key 3DES).
Note that single DES and 2-key 3DES are weak and strongly deprecated and should only be used to decrypt legacy data. 3-key 3DES is weak and deprecated and should only be used in legacy protocols.
Definition at line 471 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_GET_FAMILY | ( | type | ) |
Extract the group from a Diffie-Hellman key type.
Definition at line 564 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_GET_FAMILY | ( | type | ) |
Extract the group from a Diffie-Hellman key type.
Definition at line 666 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_KEY_PAIR | ( | group | ) | (PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group)) |
Diffie-Hellman key pair.
group | A value of type psa_dh_group_t that identifies the Diffie-Hellman group to be used. |
Definition at line 522 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_KEY_PAIR | ( | group | ) | (PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group)) |
Diffie-Hellman key pair.
group | A value of type psa_dh_family_t that identifies the Diffie-Hellman group to be used. |
Definition at line 540 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_KEY_PAIR | ( | group | ) | (PSA_KEY_TYPE_DH_KEY_PAIR_BASE | (group)) |
Diffie-Hellman key pair.
group | A value of type psa_dh_family_t that identifies the Diffie-Hellman group to be used. |
Definition at line 642 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_PUBLIC_KEY | ( | group | ) | (PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group)) |
Diffie-Hellman public key.
group | A value of type psa_dh_group_t that identifies the Diffie-Hellman group to be used. |
Definition at line 529 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_PUBLIC_KEY | ( | group | ) | (PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group)) |
Diffie-Hellman public key.
group | A value of type psa_dh_family_t that identifies the Diffie-Hellman group to be used. |
Definition at line 547 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_DH_PUBLIC_KEY | ( | group | ) | (PSA_KEY_TYPE_DH_PUBLIC_KEY_BASE | (group)) |
Diffie-Hellman public key.
group | A value of type psa_dh_family_t that identifies the Diffie-Hellman group to be used. |
Definition at line 649 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) |
DSA key pair (private and public key).
The import and export format is the representation of the private key x
as a big-endian byte string. The length of the byte string is the private key size in bytes (leading zeroes are not stripped).
Determinstic DSA key derivation with psa_generate_derived_key follows FIPS 186-4 §B.1.2: interpret the byte string as integer in big-endian order. Discard it if it is not in the range [0, N - 2] where N is the boundary of the private key domain (the prime p for Diffie-Hellman, the subprime q for DSA, or the order of the curve's base point for ECC). Add 1 to the resulting integer and use this as the private key x.
Definition at line 56 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h.
#define PSA_KEY_TYPE_DSA_KEY_PAIR ((psa_key_type_t)0x7002) |
DSA key pair (private and public key).
The import and export format is the representation of the private key x
as a big-endian byte string. The length of the byte string is the private key size in bytes (leading zeroes are not stripped).
Determinstic DSA key derivation with psa_generate_derived_key follows FIPS 186-4 §B.1.2: interpret the byte string as integer in big-endian order. Discard it if it is not in the range [0, N - 2] where N is the boundary of the private key domain (the prime p for Diffie-Hellman, the subprime q for DSA, or the order of the curve's base point for ECC). Add 1 to the resulting integer and use this as the private key x.
Definition at line 350 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h.
#define PSA_KEY_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t)0x4002) |
DSA public key.
The import and export format is the representation of the public key y = g^x mod p
as a big-endian byte string. The length of the byte string is the length of the base prime p
in bytes.
Definition at line 38 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_extra.h.
#define PSA_KEY_TYPE_DSA_PUBLIC_KEY ((psa_key_type_t)0x4002) |
DSA public key.
The import and export format is the representation of the public key y = g^x mod p
as a big-endian byte string. The length of the byte string is the length of the base prime p
in bytes.
Definition at line 332 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h.
#define PSA_KEY_TYPE_ECC_GET_FAMILY | ( | type | ) |
Extract the curve from an elliptic curve key type.
Definition at line 454 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_GET_FAMILY | ( | type | ) |
Extract the curve from an elliptic curve key type.
Definition at line 540 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_KEY_PAIR | ( | curve | ) | (PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve)) |
Elliptic curve key pair.
curve | A value of type psa_ecc_curve_t that identifies the ECC curve to be used. |
Definition at line 424 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_KEY_PAIR | ( | curve | ) | (PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve)) |
Elliptic curve key pair.
curve | A value of type psa_ecc_family_t that identifies the ECC curve to be used. |
Definition at line 430 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_KEY_PAIR | ( | curve | ) | (PSA_KEY_TYPE_ECC_KEY_PAIR_BASE | (curve)) |
Elliptic curve key pair.
The size of an elliptic curve key is the bit size associated with the curve, i.e. the bit size of q for a curve over a field Fq. See the documentation of PSA_ECC_FAMILY_xxx
curve families for details.
curve | A value of type psa_ecc_family_t that identifies the ECC curve to be used. |
Definition at line 512 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY | ( | curve | ) | (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve)) |
Elliptic curve public key.
curve | A value of type psa_ecc_curve_t that identifies the ECC curve to be used. |
Definition at line 431 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY | ( | curve | ) | (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve)) |
Elliptic curve public key.
curve | A value of type psa_ecc_family_t that identifies the ECC curve to be used. |
Definition at line 437 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_ECC_PUBLIC_KEY | ( | curve | ) | (PSA_KEY_TYPE_ECC_PUBLIC_KEY_BASE | (curve)) |
Elliptic curve public key.
The size of an elliptic curve public key is the same as the corresponding private key (see PSA_KEY_TYPE_ECC_KEY_PAIR and the documentation of PSA_ECC_FAMILY_xxx
curve families).
curve | A value of type psa_ecc_family_t that identifies the ECC curve to be used. |
Definition at line 523 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_GET_CURVE | ( | type | ) |
Extract the curve from an elliptic curve key type.
Definition at line 448 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_GET_GROUP | ( | type | ) |
Extract the group from a Diffie-Hellman key type.
Definition at line 546 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_HMAC ((psa_key_type_t)0x51000000) |
HMAC key.
The key policy determines which underlying hash algorithm the key can be used for.
HMAC keys should generally have the same size as the underlying hash. This size can be calculated with #PSA_HASH_SIZE(alg
) where alg
is the HMAC algorithm or the underlying hash algorithm.
Definition at line 362 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_HMAC ((psa_key_type_t)0x1100) |
HMAC key.
The key policy determines which underlying hash algorithm the key can be used for.
HMAC keys should generally have the same size as the underlying hash. This size can be calculated with #PSA_HASH_SIZE(alg
) where alg
is the HMAC algorithm or the underlying hash algorithm.
Definition at line 368 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_HMAC ((psa_key_type_t)0x1100) |
HMAC key.
The key policy determines which underlying hash algorithm the key can be used for.
HMAC keys should generally have the same size as the underlying hash. This size can be calculated with #PSA_HASH_LENGTH(alg
) where alg
is the HMAC algorithm or the underlying hash algorithm.
Definition at line 402 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ASYMMETRIC | ( | type | ) |
Whether a key type is asymmetric: either a key pair or a public key.
Definition at line 312 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ASYMMETRIC | ( | type | ) |
Whether a key type is asymmetric: either a key pair or a public key.
Definition at line 318 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ASYMMETRIC | ( | type | ) |
Whether a key type is asymmetric: either a key pair or a public key.
Definition at line 352 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH | ( | type | ) |
Whether a key type is a Diffie-Hellman key (pair or public-only).
Definition at line 533 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH | ( | type | ) |
Whether a key type is a Diffie-Hellman key (pair or public-only).
Definition at line 551 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH | ( | type | ) |
Whether a key type is a Diffie-Hellman key (pair or public-only).
Definition at line 653 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_KEY_PAIR | ( | type | ) |
Whether a key type is a Diffie-Hellman key pair.
Definition at line 537 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_KEY_PAIR | ( | type | ) |
Whether a key type is a Diffie-Hellman key pair.
Definition at line 555 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_KEY_PAIR | ( | type | ) |
Whether a key type is a Diffie-Hellman key pair.
Definition at line 657 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_PUBLIC_KEY | ( | type | ) |
Whether a key type is a Diffie-Hellman public key.
Definition at line 541 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_PUBLIC_KEY | ( | type | ) |
Whether a key type is a Diffie-Hellman public key.
Definition at line 559 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DH_PUBLIC_KEY | ( | type | ) |
Whether a key type is a Diffie-Hellman public key.
Definition at line 661 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_DSA | ( | type | ) | (PSA_KEY_TYPE_PUBLIC_KEY_OF_KEY_PAIR(type) == PSA_KEY_TYPE_DSA_PUBLIC_KEY) |
Whether a key type is an DSA key (pair or public-only).
Definition at line 353 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_extra.h.
#define PSA_KEY_TYPE_IS_ECC | ( | type | ) |
Whether a key type is an elliptic curve key (pair or public-only).
Definition at line 435 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC | ( | type | ) |
Whether a key type is an elliptic curve key (pair or public-only).
Definition at line 441 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC | ( | type | ) |
Whether a key type is an elliptic curve key (pair or public-only).
Definition at line 527 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_KEY_PAIR | ( | type | ) |
Whether a key type is an elliptic curve key pair.
Definition at line 439 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_KEY_PAIR | ( | type | ) |
Whether a key type is an elliptic curve key pair.
Definition at line 445 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_KEY_PAIR | ( | type | ) |
Whether a key type is an elliptic curve key pair.
Definition at line 531 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY | ( | type | ) |
Whether a key type is an elliptic curve public key.
Definition at line 443 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY | ( | type | ) |
Whether a key type is an elliptic curve public key.
Definition at line 449 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_ECC_PUBLIC_KEY | ( | type | ) |
Whether a key type is an elliptic curve public key.
Definition at line 535 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
Definition at line 321 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
Definition at line 327 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
Definition at line 361 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
Definition at line 317 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
Definition at line 323 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
Definition at line 357 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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).
Definition at line 413 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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).
Definition at line 419 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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).
Definition at line 497 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_UNSTRUCTURED | ( | type | ) |
Whether a key type is an unstructured array of bytes.
This encompasses both symmetric keys and non-key data.
Definition at line 307 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_UNSTRUCTURED | ( | type | ) |
Whether a key type is an unstructured array of bytes.
This encompasses both symmetric keys and non-key data.
Definition at line 313 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_UNSTRUCTURED | ( | type | ) |
Whether a key type is an unstructured array of bytes.
This encompasses both symmetric keys and non-key data.
Definition at line 347 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_VENDOR_DEFINED | ( | type | ) | (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0) |
Whether a key type is vendor-defined.
See also PSA_KEY_TYPE_VENDOR_FLAG.
Definition at line 300 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_VENDOR_DEFINED | ( | type | ) | (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0) |
Whether a key type is vendor-defined.
See also PSA_KEY_TYPE_VENDOR_FLAG.
Definition at line 306 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_IS_VENDOR_DEFINED | ( | type | ) | (((type) & PSA_KEY_TYPE_VENDOR_FLAG) != 0) |
Whether a key type is vendor-defined.
See also PSA_KEY_TYPE_VENDOR_FLAG.
Definition at line 340 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 333 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 339 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 373 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_NONE ((psa_key_type_t)0x00000000) |
An invalid key type value.
Zero is not the encoding of any key type.
Definition at line 277 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_NONE ((psa_key_type_t)0x0000) |
An invalid key type value.
Zero is not the encoding of any key type.
Definition at line 283 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_NONE ((psa_key_type_t)0x0000) |
An invalid key type value.
Zero is not the encoding of any key type.
Definition at line 317 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_PASSWORD ((psa_key_type_t)0x1203) |
A low-entropy secret for password hashing or key derivation.
This key type is suitable for passwords and passphrases which are typically intended to be memorizable by humans, and have a low entropy relative to their size. It can be used for randomly generated or derived keys with maximum or near-maximum entropy, but PSA_KEY_TYPE_DERIVE is more suitable for such keys. It is not suitable for passwords with extremely low entropy, such as numerical PINs.
These keys can be used as the PSA_KEY_DERIVATION_INPUT_PASSWORD input of key derivation algorithms. Algorithms that accept such an input were designed to accept low-entropy secret and are known as password hashing or key stretching algorithms.
These keys cannot be used as the PSA_KEY_DERIVATION_INPUT_SECRET input of key derivation algorithms, as the algorithms that take such an input expect it to be high-entropy.
The key policy determines which key derivation algorithm the key can be used for, among the permissible subset defined above.
Definition at line 438 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_PASSWORD_HASH ((psa_key_type_t)0x1205) |
A secret value that can be used to verify a password hash.
The key policy determines which key derivation algorithm the key can be used for, among the same permissible subset as for PSA_KEY_TYPE_PASSWORD.
Definition at line 446 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_PEPPER ((psa_key_type_t)0x1206) |
A secret value that can be used in when computing a password hash.
The key policy determines which key derivation algorithm the key can be used for, among the subset of algorithms that can use pepper.
Definition at line 453 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 345 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 351 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
You may also pass a key pair type as type
, it will be left unchanged.
type | A public key type or key pair type. |
type
is not a public key or a key pair, the return value is undefined. Definition at line 385 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RAW_DATA ((psa_key_type_t)0x50000001) |
Raw data.
A "key" of this type cannot be used for any cryptographic operation. Applications may use this type to store arbitrary data in the keystore.
Definition at line 352 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RAW_DATA ((psa_key_type_t)0x1001) |
Raw data.
A "key" of this type cannot be used for any cryptographic operation. Applications may use this type to store arbitrary data in the keystore.
Definition at line 358 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_RAW_DATA ((psa_key_type_t)0x1001) |
Raw data.
A "key" of this type cannot be used for any cryptographic operation. Applications may use this type to store arbitrary data in the keystore.
Definition at line 392 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_KEY_PAIR ((psa_key_type_t)0x70010000) |
RSA key pair (private and public key).
Definition at line 411 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_KEY_PAIR ((psa_key_type_t)0x7001) |
RSA key pair (private and public key).
Definition at line 417 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_KEY_PAIR ((psa_key_type_t)0x7001) |
RSA key pair (private and public key).
The size of an RSA key is the bit size of the modulus.
Definition at line 495 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_PUBLIC_KEY ((psa_key_type_t)0x60010000) |
RSA public key.
Definition at line 409 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_PUBLIC_KEY ((psa_key_type_t)0x4001) |
RSA public key.
Definition at line 415 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_RSA_PUBLIC_KEY ((psa_key_type_t)0x4001) |
RSA public key.
The size of an RSA key is the bit size of the modulus.
Definition at line 490 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_VENDOR_FLAG ((psa_key_type_t)0x80000000) |
Vendor-defined key type flag.
Key types defined by this standard will never have the PSA_KEY_TYPE_VENDOR_FLAG bit set. Vendors who define additional key types must use an encoding with the PSA_KEY_TYPE_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 286 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#define PSA_KEY_TYPE_VENDOR_FLAG ((psa_key_type_t)0x8000) |
Vendor-defined key type flag.
Key types defined by this standard will never have the PSA_KEY_TYPE_VENDOR_FLAG bit set. Vendors who define additional key types must use an encoding with the PSA_KEY_TYPE_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 292 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#define PSA_KEY_TYPE_VENDOR_FLAG ((psa_key_type_t)0x8000) |
Vendor-defined key type flag.
Key types defined by this standard will never have the PSA_KEY_TYPE_VENDOR_FLAG bit set. Vendors who define additional key types must use an encoding with the PSA_KEY_TYPE_VENDOR_FLAG bit set and should respect the bitwise structure used by standard encodings whenever practical.
Definition at line 326 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
#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.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). |
alg
is a non-truncated MAC algorithm. alg
is not a supported MAC algorithm. Definition at line 890 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_values.h.
#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.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(alg ) is true). |
alg
is a non-truncated MAC algorithm. alg
is not a supported MAC algorithm. Definition at line 892 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_values.h.
#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.
mac_alg | A MAC algorithm identifier (value of type psa_algorithm_t such that PSA_ALG_IS_MAC(mac_alg ) is true). |
mac_alg
is a non-truncated MAC algorithm. mac_alg
is not a supported MAC algorithm. Definition at line 1025 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_values.h.
typedef uint32_t psa_algorithm_t |
Encoding of a cryptographic algorithm.
For algorithms that can be applied to multiple key types, this type does not encode the key type. For example, for symmetric ciphers based on a block cipher, psa_algorithm_t encodes the block cipher mode and the padding mode while the block cipher itself is encoded via psa_key_type_t.
Definition at line 86 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h.
typedef uint32_t psa_algorithm_t |
Encoding of a cryptographic algorithm.
For algorithms that can be applied to multiple key types, this type does not encode the key type. For example, for symmetric ciphers based on a block cipher, psa_algorithm_t encodes the block cipher mode and the padding mode while the block cipher itself is encoded via psa_key_type_t.
Definition at line 98 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h.
typedef uint32_t psa_algorithm_t |
Encoding of a cryptographic algorithm.
For algorithms that can be applied to multiple key types, this type does not encode the key type. For example, for symmetric ciphers based on a block cipher, psa_algorithm_t encodes the block cipher mode and the padding mode while the block cipher itself is encoded via psa_key_type_t.
Definition at line 153 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h.
typedef uint8_t psa_dh_family_t |
The type of PSA Diffie-Hellman group family identifiers.
The group identifier is required to create an Diffie-Hellman key using the PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() macros.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional families must use an encoding in this range.
Definition at line 76 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h.
typedef uint8_t psa_dh_family_t |
The type of PSA Diffie-Hellman group family identifiers.
The group identifier is required to create an Diffie-Hellman key using the PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() macros.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional families must use an encoding in this range.
Definition at line 88 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h.
typedef uint16_t psa_dh_group_t |
The type of PSA Diffie-Hellman group identifiers.
The group identifier is required to create an Diffie-Hellman key using the PSA_KEY_TYPE_DH_KEY_PAIR() or PSA_KEY_TYPE_DH_PUBLIC_KEY() macros.
The encoding of group identifiers is taken from the TLS Supported Groups Registry (formerly known as the TLS EC Named Curve Registry) https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
This specification defines identifiers for some of the groups in the IANA registry. Implementations that support other groups that are in the IANA registry should use the IANA value and a implementation-specific identifier. Implemenations that support non-IANA groups should use one of the following approaches for allocating a key type:
Option 1 or 2 are recommended.
The current draft of the GREASE specification is https://datatracker.ietf.org/doc/draft-ietf-tls-grease
The following GREASE values are allocated for named groups:
Definition at line 143 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h.
typedef uint16_t psa_ecc_curve_t |
The type of PSA elliptic curve identifiers.
The curve identifier is required to create an ECC key using the PSA_KEY_TYPE_ECC_KEY_PAIR() or PSA_KEY_TYPE_ECC_PUBLIC_KEY() macros.
The encoding of curve identifiers is taken from the TLS Supported Groups Registry (formerly known as the TLS EC Named Curve Registry) https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8
This specification defines identifiers for some of the curves in the IANA registry. Implementations that support other curves that are in the IANA registry should use the IANA value and a implementation-specific identifier. Implemenations that support non-IANA curves should use one of the following approaches for allocating a key type:
The first option is recommended.
Definition at line 91 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h.
typedef uint8_t psa_ecc_family_t |
The type of PSA elliptic curve family identifiers.
The curve identifier is required to create an ECC key using the PSA_KEY_TYPE_ECC_KEY_PAIR() or PSA_KEY_TYPE_ECC_PUBLIC_KEY() macros.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional families must use an encoding in this range.
Definition at line 65 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h.
typedef uint8_t psa_ecc_family_t |
The type of PSA elliptic curve family identifiers.
The curve identifier is required to create an ECC key using the PSA_KEY_TYPE_ECC_KEY_PAIR() or PSA_KEY_TYPE_ECC_PUBLIC_KEY() macros.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional families must use an encoding in this range.
Definition at line 65 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h.
typedef uint8_t psa_ecc_family_t |
The type of PSA elliptic curve family identifiers.
The curve identifier is required to create an ECC key using the PSA_KEY_TYPE_ECC_KEY_PAIR() or PSA_KEY_TYPE_ECC_PUBLIC_KEY() macros.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional families must use an encoding in this range.
Definition at line 77 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h.
typedef uint16_t psa_key_type_t |
Encoding of a key type.
Definition at line 54 of file TARGET_TFM/TARGET_TFM_LATEST/include/psa/crypto_types.h.
typedef uint32_t psa_key_type_t |
Encoding of a key type.
Definition at line 54 of file TARGET_TFM/TARGET_TFM_V1_0/include/psa/crypto_types.h.
typedef uint16_t psa_key_type_t |
Encoding of a key type.
Definition at line 66 of file TARGET_MBED_PSA_SRV/inc/psa/crypto_types.h.