aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorValerio Setti <valerio.setti@nordicsemi.no>2024-01-04 09:47:50 +0100
committerValerio Setti <valerio.setti@nordicsemi.no>2024-01-09 13:41:52 +0100
commitafa01c7394a2e02b060f741f56c3614f7af70b86 (patch)
treefe118455f869e9971a893f252f016911ae69aaee /docs
parentfc8a48a9e34d0bd42a0b8c6aaffeffc11391f230 (diff)
downloadmbedtls-afa01c7394a2e02b060f741f56c3614f7af70b86.zip
mbedtls-afa01c7394a2e02b060f741f56c3614f7af70b86.tar.gz
mbedtls-afa01c7394a2e02b060f741f56c3614f7af70b86.tar.bz2
psa-transition: update "Elliptic curve mechanism selection" section
- add hyperlinks for the conversion functions. - move conversion functions' description before the legacy<->PSA table. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
Diffstat (limited to 'docs')
-rw-r--r--docs/psa-transition.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/psa-transition.md b/docs/psa-transition.md
index 71b3d68..617426c 100644
--- a/docs/psa-transition.md
+++ b/docs/psa-transition.md
@@ -725,7 +725,11 @@ An ECC public key has the type [`PSA_KEY_TYPE_ECC_PUBLIC_KEY(curve)`](https://mb
An ECC key pair has the type [`PSA_KEY_TYPE_ECC_KEY_PAIR(curve)`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__crypto__types/#group__crypto__types_1ga0b6f5d4d5037c54ffa850d8059c32df0) where `curve` is a curve family identifier. A key with this type can be used both for private-key and public-key operations (there is no separate key type for a private key without the corresponding public key).
You can always use a private key for operations on the corresponding public key (as long as the policy permits it).
-A curve is fully determined by a curve family identifier and the private key size in bits. The following table gives the correspondence between legacy and PSA elliptic curve designations.
+A curve is fully determined by a curve family identifier and the private key size in bits. You can use the following functions to convert between the PSA and legacy elliptic curve designations:
+- [`mbedtls_ecc_group_to_psa()`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__psa__tls__helpers/#group__psa__tls__helpers_1ga9c83c095adfec7da99401cf81e164f99) converts from the legacy curve type identifier to PSA curve family and bit-size.
+- [`mbedtls_ecc_group_from_psa()`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__psa__tls__helpers/#group__psa__tls__helpers_1ga6243eb619d5b2f5fe4667811adeb8a12) converts from PSA curve family and bit-size to the legacy identifier.
+
+The following table gives the correspondence between legacy and PSA elliptic curve designations.
| Mbed TLS legacy curve identifier | PSA curve family | Curve bit-size |
| -------------------------------- | ---------------- | -------------- |
@@ -743,10 +747,6 @@ A curve is fully determined by a curve family identifier and the private key siz
| `MBEDTLS_ECP_DP_SECP256K1` | [`PSA_ECC_FAMILY_SECP_K1`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__crypto__types/#group__crypto__types_1ga48bb340b5544ba617b0f5b89542665a7) | 256 |
| `MBEDTLS_ECP_DP_CURVE448` | [`PSA_ECC_FAMILY_MONTGOMERY`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__crypto__types/#group__crypto__types_1ga1f624c5cdaf25b21287af33024e1aff8) | 448 |
-The following helper functions can be used to convert between the 2 types:
-- `mbedtls_ecc_group_to_psa()` converts from the legacy curve type identifier to PSA curve family and bit-size.
-- `mbedtls_ecc_group_from_psa()` converts from PSA curve family and bit-size to the legacy identifier.
-
The following cryptographic algorithms work with ECC keys:
* ECDH key agreement (including X25519 and X448): [`PSA_ALG_ECDH`](https://mbed-tls.readthedocs.io/projects/api/en/development/api/group/group__crypto__types/#group__crypto__types_1gab2dbcf71b63785e7dd7b54a100edee43).