Hash algorithm definitions for the PSA Crypto API. More...
Hash algorithm definitions for the PSA Crypto API.
Definition in file algorithm.h.
#include "psa/algorithm.h"
Go to the source code of this file.
#define | PSA_ALG_CATEGORY_HASH ((psa_algorithm_t)0x02000000) |
Category for hash algorithms. | |
#define | PSA_ALG_HASH_MASK ((psa_algorithm_t)0x000000ff) |
Hash algorithm mask. | |
#define | PSA_ALG_IS_HASH(alg) (((alg) & PSA_ALG_CATEGORY_MASK) == PSA_ALG_CATEGORY_HASH) |
Whether the specified algorithm is a hash algorithm. | |
#define | PSA_ALG_GET_HASH(alg) |
Get the hash used by a composite algorithm. | |
#define | PSA_ALG_HMAC_GET_HASH(hmac_alg) (PSA_ALG_CATEGORY_HASH | ((hmac_alg) & PSA_ALG_HASH_MASK)) |
Get the hash operation of a hmac algorithm. | |
#define | PSA_ALG_MD2 ((psa_algorithm_t)0x02000001) |
The MD2 message-digest algorithm. | |
#define | PSA_ALG_MD4 ((psa_algorithm_t)0x02000002) |
The MD4 message-digest algorithm. | |
#define | PSA_ALG_MD5 ((psa_algorithm_t)0x02000003) |
The MD5 message-digest algorithm. | |
#define | PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x02000004) |
The RIPEMD-160 message-digest algorithm. | |
#define | PSA_ALG_SHA_1 ((psa_algorithm_t)0x02000005) |
The SHA-1 message-digest algorithm. | |
#define | PSA_ALG_SHA_224 ((psa_algorithm_t)0x02000008) /** SHA-224 */ |
The SHA-224 message-digest algorithm. | |
#define | PSA_ALG_SHA_256 ((psa_algorithm_t)0x02000009) /** SHA-256 */ |
The SHA-256 message-digest algorithm. | |
#define | PSA_ALG_SHA_384 ((psa_algorithm_t)0x0200000a) /** SHA-384 */ |
The SHA-384 message-digest algorithm. | |
#define | PSA_ALG_SHA_512 ((psa_algorithm_t)0x0200000b) /** SHA-512 */ |
The SHA-512 message-digest algorithm. | |
#define | PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0200000c) /** SHA-512/224 */ |
The SHA-512/224 message-digest algorithm. | |
#define | PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0200000d) /** SHA-512/256 */ |
The SHA-512/256 message-digest algorithm. | |
#define | PSA_ALG_SHA3_224 ((psa_algorithm_t)0x02000010) /** SHA-3-224 */ |
The SHA3-224 message-digest algorithm. | |
#define | PSA_ALG_SHA3_256 ((psa_algorithm_t)0x02000011) /** SHA-3-256 */ |
The SHA3-256 message-digest algorithm. | |
#define | PSA_ALG_SHA3_384 ((psa_algorithm_t)0x02000012) /** SHA-3-384 */ |
The SHA3-384 message-digest algorithm. | |
#define | PSA_ALG_SHA3_512 ((psa_algorithm_t)0x02000013) /** SHA-3-512 */ |
The SHA3-512 message-digest algorithm. | |
#define | PSA_ALG_SM3 ((psa_algorithm_t)0x02000014) /** SM3 */ |
The SM3 message-digest algorithm. | |
#define | PSA_ALG_SHAKE256_512 ((psa_algorithm_t)0x02000015) |
The first 512 bits (64 bytes) of the SHAKE256 output. | |
#define PSA_ALG_CATEGORY_HASH ((psa_algorithm_t)0x02000000) |
Category for hash algorithms.
Definition at line 34 of file algorithm.h.
#define PSA_ALG_GET_HASH | ( | alg | ) |
Get the hash used by a composite algorithm.
The following composite algorithms require a hash algorithm: - @ref PSA_ALG_ECDSA() - @ref PSA_ALG_HKDF() - @ref PSA_ALG_HMAC() - @ref PSA_ALG_RSA_OAEP() - @ref PSA_ALG_IS_RSA_PKCS1V15_SIGN() - @ref PSA_ALG_RSA_PSS() - @ref PSA_ALG_RSA_PSS_ANY_SALT() - @ref PSA_ALG_TLS12_PRF() - @ref PSA_ALG_TLS12_PSK_TO_MS() - @ref PSA_ALG_PBKDF2_HMAC()
alg | An algorithm identifier: a value of type psa_algorithm_t. |
Definition at line 71 of file algorithm.h.
#define PSA_ALG_HASH_MASK ((psa_algorithm_t)0x000000ff) |
Hash algorithm mask.
Definition at line 39 of file algorithm.h.
#define PSA_ALG_HMAC_GET_HASH | ( | hmac_alg | ) | (PSA_ALG_CATEGORY_HASH | ((hmac_alg) & PSA_ALG_HASH_MASK)) |
Get the hash operation of a hmac algorithm.
hmac_alg | HMAC algorithm |
Definition at line 80 of file algorithm.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: a value of type psa_algorithm_t. |
Definition at line 49 of file algorithm.h.
#define PSA_ALG_MD2 ((psa_algorithm_t)0x02000001) |
The MD2 message-digest algorithm.
MD2 is defined in The MD2 Message-Digest Algorithm RFC1319.
Definition at line 92 of file algorithm.h.
#define PSA_ALG_MD4 ((psa_algorithm_t)0x02000002) |
The MD4 message-digest algorithm.
MD4 is defined in The MD4 Message-Digest Algorithm RFC1320.
Definition at line 103 of file algorithm.h.
#define PSA_ALG_MD5 ((psa_algorithm_t)0x02000003) |
The MD5 message-digest algorithm.
MD5 is defined in The MD5 Message-Digest Algorithm RFC1321.
Definition at line 114 of file algorithm.h.
#define PSA_ALG_RIPEMD160 ((psa_algorithm_t)0x02000004) |
The RIPEMD-160 message-digest algorithm.
RIPEMD-160 is defined in RIPEMD-160: A Strengthened Version of RIPEMD, and also in ISO/IEC 10118-3:2018 IT Security techniques — Hash-functions — Part 3: Dedicated hash-functions ISO10118.
Definition at line 123 of file algorithm.h.
#define PSA_ALG_SHA3_224 ((psa_algorithm_t)0x02000010) /** SHA-3-224 */ |
The SHA3-224 message-digest algorithm.
SHA3-224 is defined in FIPS Publication 202: SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions FIPS202.
Definition at line 190 of file algorithm.h.
#define PSA_ALG_SHA3_256 ((psa_algorithm_t)0x02000011) /** SHA-3-256 */ |
The SHA3-256 message-digest algorithm.
SHA3-256 is defined in FIPS202.
Definition at line 197 of file algorithm.h.
#define PSA_ALG_SHA3_384 ((psa_algorithm_t)0x02000012) /** SHA-3-384 */ |
The SHA3-384 message-digest algorithm.
SHA3-384 is defined in FIPS202.
Definition at line 204 of file algorithm.h.
#define PSA_ALG_SHA3_512 ((psa_algorithm_t)0x02000013) /** SHA-3-512 */ |
The SHA3-512 message-digest algorithm.
SHA3-512 is defined in FIPS202.
Definition at line 211 of file algorithm.h.
#define PSA_ALG_SHA_1 ((psa_algorithm_t)0x02000005) |
The SHA-1 message-digest algorithm.
SHA-1 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 134 of file algorithm.h.
#define PSA_ALG_SHA_224 ((psa_algorithm_t)0x02000008) /** SHA-224 */ |
The SHA-224 message-digest algorithm.
SHA-224 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 142 of file algorithm.h.
#define PSA_ALG_SHA_256 ((psa_algorithm_t)0x02000009) /** SHA-256 */ |
The SHA-256 message-digest algorithm.
SHA-256 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 150 of file algorithm.h.
#define PSA_ALG_SHA_384 ((psa_algorithm_t)0x0200000a) /** SHA-384 */ |
The SHA-384 message-digest algorithm.
SHA-384 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 158 of file algorithm.h.
#define PSA_ALG_SHA_512 ((psa_algorithm_t)0x0200000b) /** SHA-512 */ |
The SHA-512 message-digest algorithm.
SHA-512 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 166 of file algorithm.h.
#define PSA_ALG_SHA_512_224 ((psa_algorithm_t)0x0200000c) /** SHA-512/224 */ |
The SHA-512/224 message-digest algorithm.
SHA-512-224 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 174 of file algorithm.h.
#define PSA_ALG_SHA_512_256 ((psa_algorithm_t)0x0200000d) /** SHA-512/256 */ |
The SHA-512/256 message-digest algorithm.
SHA-512-256 is defined in FIPS Publication 180-4: Secure Hash Standard (SHS) FIPS180-4.
Definition at line 182 of file algorithm.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).
SHAKE256 is defined in [FIPS202](https://doi.org/10.6028/NIST.FIPS.202).
Definition at line 236 of file algorithm.h.
#define PSA_ALG_SM3 ((psa_algorithm_t)0x02000014) /** SM3 */ |
The SM3 message-digest algorithm.
SM3 is defined in ISO/IEC 10118-3:2018 IT Security techniques — Hash-functions — Part 3: Dedicated hash-functions ISO10118, and also in GM/T 0004-2012: SM3 cryptographic hash algorithm CSTC0004 (English version CSTC0004/E).
Definition at line 223 of file algorithm.h.