mbed TLS v3.3.0
|
Utility functions for the use of the PSA Crypto library. More...
#include "mbedtls/private_access.h"
#include "mbedtls/build_info.h"
#include "psa/crypto.h"
#include "mbedtls/ecp.h"
#include "mbedtls/md.h"
#include "mbedtls/pk.h"
#include "mbedtls/oid.h"
#include "mbedtls/error.h"
#include <string.h>
#include "mbedtls/ctr_drbg.h"
Go to the source code of this file.
Macros | |
#define | MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE( PSA_VENDOR_ECC_MAX_CURVE_BITS ) |
#define | MBEDTLS_PSA_RANDOM_STATE mbedtls_psa_random_state |
Typedefs | |
typedef int | mbedtls_f_rng_t(void *p_rng, unsigned char *output, size_t output_size) |
typedef mbedtls_ctr_drbg_context | mbedtls_psa_drbg_context_t |
Functions | |
static psa_key_type_t | mbedtls_psa_translate_cipher_type (mbedtls_cipher_type_t cipher) |
static psa_algorithm_t | mbedtls_psa_translate_cipher_mode (mbedtls_cipher_mode_t mode, size_t taglen) |
static psa_key_usage_t | mbedtls_psa_translate_cipher_operation (mbedtls_operation_t op) |
static psa_algorithm_t | mbedtls_psa_translate_md (mbedtls_md_type_t md_alg) |
static int | mbedtls_psa_get_ecc_oid_from_id (psa_ecc_family_t curve, size_t bits, char const **oid, size_t *oid_len) |
static psa_key_type_t | mbedtls_psa_parse_tls_ecc_group (uint16_t tls_ecc_grp_reg_id, size_t *bits) |
Variables | |
static mbedtls_f_rng_t *const | mbedtls_psa_get_random = mbedtls_ctr_drbg_random |
mbedtls_psa_drbg_context_t *const | mbedtls_psa_random_state |
Utility functions for the use of the PSA Crypto library.
Definition in file psa_util.h.
#define MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH PSA_KEY_EXPORT_ECC_PUBLIC_KEY_MAX_SIZE( PSA_VENDOR_ECC_MAX_CURVE_BITS ) |
Definition at line 264 of file psa_util.h.
#define MBEDTLS_PSA_RANDOM_STATE mbedtls_psa_random_state |
Definition at line 363 of file psa_util.h.
typedef int mbedtls_f_rng_t(void *p_rng, unsigned char *output, size_t output_size) |
Definition at line 295 of file psa_util.h.
Definition at line 354 of file psa_util.h.
|
inlinestatic |
Definition at line 171 of file psa_util.h.
References MBEDTLS_OID_EC_GRP_BP256R1, MBEDTLS_OID_EC_GRP_BP384R1, MBEDTLS_OID_EC_GRP_BP512R1, MBEDTLS_OID_EC_GRP_SECP192K1, MBEDTLS_OID_EC_GRP_SECP192R1, MBEDTLS_OID_EC_GRP_SECP224K1, MBEDTLS_OID_EC_GRP_SECP224R1, MBEDTLS_OID_EC_GRP_SECP256K1, MBEDTLS_OID_EC_GRP_SECP256R1, MBEDTLS_OID_EC_GRP_SECP384R1, MBEDTLS_OID_EC_GRP_SECP521R1, MBEDTLS_OID_SIZE, PSA_ECC_FAMILY_BRAINPOOL_P_R1, PSA_ECC_FAMILY_SECP_K1, and PSA_ECC_FAMILY_SECP_R1.
|
inlinestatic |
Definition at line 271 of file psa_util.h.
References mbedtls_ecp_curve_info::grp_id, mbedtls_ecc_group_to_psa(), mbedtls_ecp_curve_info_from_tls_id(), and PSA_KEY_TYPE_ECC_KEY_PAIR.
|
inlinestatic |
Definition at line 88 of file psa_util.h.
References MBEDTLS_MODE_CBC, MBEDTLS_MODE_CCM, MBEDTLS_MODE_CCM_STAR_NO_TAG, MBEDTLS_MODE_ECB, MBEDTLS_MODE_GCM, PSA_ALG_AEAD_WITH_SHORTENED_TAG, PSA_ALG_CBC_NO_PADDING, PSA_ALG_CCM, PSA_ALG_CCM_STAR_NO_TAG, PSA_ALG_ECB_NO_PADDING, and PSA_ALG_GCM.
|
inlinestatic |
Definition at line 111 of file psa_util.h.
References MBEDTLS_DECRYPT, MBEDTLS_ENCRYPT, PSA_KEY_USAGE_DECRYPT, and PSA_KEY_USAGE_ENCRYPT.
|
inlinestatic |
Definition at line 46 of file psa_util.h.
References MBEDTLS_CIPHER_AES_128_CBC, MBEDTLS_CIPHER_AES_128_CCM, MBEDTLS_CIPHER_AES_128_CCM_STAR_NO_TAG, MBEDTLS_CIPHER_AES_128_ECB, MBEDTLS_CIPHER_AES_128_GCM, MBEDTLS_CIPHER_AES_192_CBC, MBEDTLS_CIPHER_AES_192_CCM, MBEDTLS_CIPHER_AES_192_CCM_STAR_NO_TAG, MBEDTLS_CIPHER_AES_192_ECB, MBEDTLS_CIPHER_AES_192_GCM, MBEDTLS_CIPHER_AES_256_CBC, MBEDTLS_CIPHER_AES_256_CCM, MBEDTLS_CIPHER_AES_256_CCM_STAR_NO_TAG, MBEDTLS_CIPHER_AES_256_ECB, MBEDTLS_CIPHER_AES_256_GCM, and PSA_KEY_TYPE_AES.
|
inlinestatic |
Definition at line 130 of file psa_util.h.
References MBEDTLS_MD_MD5, MBEDTLS_MD_NONE, MBEDTLS_MD_RIPEMD160, MBEDTLS_MD_SHA1, MBEDTLS_MD_SHA224, MBEDTLS_MD_SHA256, MBEDTLS_MD_SHA384, MBEDTLS_MD_SHA512, PSA_ALG_MD5, PSA_ALG_RIPEMD160, PSA_ALG_SHA_1, PSA_ALG_SHA_224, PSA_ALG_SHA_256, PSA_ALG_SHA_384, and PSA_ALG_SHA_512.
|
static |
Definition at line 355 of file psa_util.h.
|
extern |