mbed TLS v2.23.0: TLS helper functions

mbed TLS v2.23.0

Functions
TLS helper functions

## Functions
static psa_ecc_curve_t | mbedtls_ecc_group_to_psa (mbedtls_ecp_group_id grpid, size_t *bits)
mbedtls_ecp_group_id | mbedtls_ecc_group_of_psa (psa_ecc_curve_t curve, size_t byte_length)

## Detailed Description

## Function Documentation

## ◆ mbedtls_ecc_group_of_psa()

mbedtls_ecp_group_id mbedtls_ecc_group_of_psa | ( | psa_ecc_curve_t | curve,
|  | size_t | byte_length
| ) |  |

Convert an ECC curve identifier from the PSA encoding to Mbed TLS.

Note
  This function is provided solely for the convenience of Mbed TLS and may be removed at any time without notice.

Parameters

  curve | A PSA elliptic curve identifier (`PSA_ECC_CURVE_xxx`).
  byte_length | The byte-length of a private key on `curve`.

Returns
  The corresponding Mbed TLS elliptic curve identifier (`MBEDTLS_ECP_DP_xxx`).
  MBEDTLS_ECP_DP_NONE if `curve` is not recognized.
  MBEDTLS_ECP_DP_NONE if `byte_length` is not correct for `curve`.

## ◆ mbedtls_ecc_group_to_psa()

static psa_ecc_curve_t mbedtls_ecc_group_to_psa | ( | mbedtls_ecp_group_id | grpid,
|  | size_t * | bits
| ) |  |
| inlinestatic

Convert an ECC curve identifier from the Mbed TLS encoding to PSA.

Note
  This function is provided solely for the convenience of Mbed TLS and may be removed at any time without notice.

Parameters

  | grpid | An Mbed TLS elliptic curve identifier (`MBEDTLS_ECP_DP_xxx`).
  [out] | bits | On success, the bit size of the curve.

Returns
  The corresponding PSA elliptic curve identifier (`PSA_ECC_CURVE_xxx`).
  `0` on failure (`grpid` is not recognized).

Definition at line 581 of file crypto_extra.h.

References MBEDTLS_ECP_DP_BP256R1, MBEDTLS_ECP_DP_BP384R1, MBEDTLS_ECP_DP_BP512R1, MBEDTLS_ECP_DP_CURVE25519, MBEDTLS_ECP_DP_CURVE448, MBEDTLS_ECP_DP_SECP192K1, MBEDTLS_ECP_DP_SECP192R1, MBEDTLS_ECP_DP_SECP224K1, MBEDTLS_ECP_DP_SECP224R1, MBEDTLS_ECP_DP_SECP256K1, MBEDTLS_ECP_DP_SECP256R1, MBEDTLS_ECP_DP_SECP384R1, MBEDTLS_ECP_DP_SECP521R1, PSA_ECC_CURVE_BRAINPOOL_P_R1, PSA_ECC_CURVE_MONTGOMERY, PSA_ECC_CURVE_SECP_K1, and PSA_ECC_CURVE_SECP_R1.