mbed TLS v3.3.0
Loading...
Searching...
No Matches
Macros | Typedefs | Functions | Variables
psa_util.h File Reference

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"
Include dependency graph for psa_util.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
 

Detailed Description

Utility functions for the use of the PSA Crypto library.

Warning
This function is not part of the public API and may change at any time.

Definition in file psa_util.h.

Macro Definition Documentation

◆ MBEDTLS_PSA_MAX_EC_PUBKEY_LENGTH

#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.

◆ MBEDTLS_PSA_RANDOM_STATE

#define MBEDTLS_PSA_RANDOM_STATE   mbedtls_psa_random_state

Definition at line 363 of file psa_util.h.

Typedef Documentation

◆ mbedtls_f_rng_t

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.

◆ mbedtls_psa_drbg_context_t

Definition at line 354 of file psa_util.h.

Function Documentation

◆ mbedtls_psa_get_ecc_oid_from_id()

static int mbedtls_psa_get_ecc_oid_from_id ( psa_ecc_family_t  curve,
size_t  bits,
char const **  oid,
size_t *  oid_len 
)
inlinestatic

◆ mbedtls_psa_parse_tls_ecc_group()

static psa_key_type_t mbedtls_psa_parse_tls_ecc_group ( uint16_t  tls_ecc_grp_reg_id,
size_t *  bits 
)
inlinestatic

◆ mbedtls_psa_translate_cipher_mode()

static psa_algorithm_t mbedtls_psa_translate_cipher_mode ( mbedtls_cipher_mode_t  mode,
size_t  taglen 
)
inlinestatic

◆ mbedtls_psa_translate_cipher_operation()

static psa_key_usage_t mbedtls_psa_translate_cipher_operation ( mbedtls_operation_t  op)
inlinestatic

◆ mbedtls_psa_translate_cipher_type()

static psa_key_type_t mbedtls_psa_translate_cipher_type ( mbedtls_cipher_type_t  cipher)
inlinestatic

◆ mbedtls_psa_translate_md()

static psa_algorithm_t mbedtls_psa_translate_md ( mbedtls_md_type_t  md_alg)
inlinestatic

Variable Documentation

◆ mbedtls_psa_get_random

mbedtls_f_rng_t* const mbedtls_psa_get_random = mbedtls_ctr_drbg_random
static

Definition at line 355 of file psa_util.h.

◆ mbedtls_psa_random_state

mbedtls_psa_drbg_context_t* const mbedtls_psa_random_state
extern