Asymmetric encryption algorithm definitions for the PSA Crypto API. More...
Asymmetric encryption 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_ASYMMETRIC_ENCRYPTION ((psa_algorithm_t)0x07000000) |
Category for asymmetric encryption algorithms. | |
#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. | |
#define | PSA_ALG_IS_RSA_OAEP(alg) (((alg) & ~0x000000ff) == 0x07000300) |
Whether the specified algorithm is an RSA OAEP encryption algorithm. | |
#define | PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x07000200) |
The RSA PKCS#1 v1.5 asymmetric encryption algorithm. | |
#define | PSA_ALG_RSA_OAEP(hash_alg) ((psa_algorithm_t)(0x07000300 | ((hash_alg) & 0x000000ff))) |
The RSA OAEP asymmetric encryption algorithm. | |
#define PSA_ALG_CATEGORY_ASYMMETRIC_ENCRYPTION ((psa_algorithm_t)0x07000000) |
Category for asymmetric encryption algorithms.
Definition at line 34 of file algorithm.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: a value of type psa_algorithm_t. |
Definition at line 45 of file algorithm.h.
#define PSA_ALG_IS_RSA_OAEP | ( | alg | ) | (((alg) & ~0x000000ff) == 0x07000300) |
Whether the specified algorithm is an RSA OAEP encryption algorithm.
alg | An algorithm identifier: a value of type psa_algorithm_t. |
Definition at line 56 of file algorithm.h.
#define PSA_ALG_RSA_OAEP | ( | hash_alg | ) | ((psa_algorithm_t)(0x07000300 | ((hash_alg) & 0x000000ff))) |
The RSA OAEP asymmetric encryption algorithm.
This encryption scheme is defined by RFC8017 §7.1 under the name RSAES-OAEP, with the following options:
Compatible key types
hash_alg | A hash algorithm: a value of type psa_algorithm_t such that PSA_ALG_IS_HASH(hash_alg ) is true. The hash algorithm is used for MGF1. |
hash_alg
is not a supported hash algorithm. Definition at line 94 of file algorithm.h.
#define PSA_ALG_RSA_PKCS1V15_CRYPT ((psa_algorithm_t)0x07000200) |
The RSA PKCS#1 v1.5 asymmetric encryption algorithm.
This encryption scheme is defined by PKCS #1: RSA Cryptography Specifications Version 2.2 RFC8017 §7.2 under the name RSAES-PKCS-v1_5.
Compatible key types
Definition at line 70 of file algorithm.h.