Go to the source code of this file.
|
| psa_status_t | mbedtls_psa_ffdh_key_agreement (const psa_key_attributes_t *attributes, const uint8_t *peer_key, size_t peer_key_length, const uint8_t *key_buffer, size_t key_buffer_size, uint8_t *shared_secret, size_t shared_secret_size, size_t *shared_secret_length) |
| |
| psa_status_t | mbedtls_psa_ffdh_export_public_key (const psa_key_attributes_t *attributes, const uint8_t *key_buffer, size_t key_buffer_size, uint8_t *data, size_t data_size, size_t *data_length) |
| |
| psa_status_t | mbedtls_psa_ffdh_generate_key (const psa_key_attributes_t *attributes, uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length) |
| | Generate DH key.
|
| |
| psa_status_t | mbedtls_psa_ffdh_import_key (const psa_key_attributes_t *attributes, const uint8_t *data, size_t data_length, uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length, size_t *bits) |
| | Import DH key.
|
| |
◆ mbedtls_psa_ffdh_export_public_key()
Export a public key or the public part of a DH key pair in binary format.
- Parameters
-
| [in] | attributes | The attributes for the key to export. |
| [in] | key_buffer | Material or context of the key to export. |
| [in] | key_buffer_size | Size of the key_buffer buffer in bytes. |
| [out] | data | Buffer where the key data is to be written. |
| [in] | data_size | Size of the data buffer in bytes. |
| [out] | data_length | On success, the number of bytes written in data |
- Return values
-
◆ mbedtls_psa_ffdh_generate_key()
Generate DH key.
- Note
- The signature of the function is that of a PSA driver generate_key entry point.
- Parameters
-
| [in] | attributes | The attributes for the key to generate. |
| [out] | key_buffer | Buffer where the key data is to be written. |
| [in] | key_buffer_size | Size of key_buffer in bytes. |
| [out] | key_buffer_length | On success, the number of bytes written in key_buffer. |
- Return values
-
◆ mbedtls_psa_ffdh_import_key()
Import DH key.
- Note
- The signature of the function is that of a PSA driver import_key entry point.
- Parameters
-
| [in] | attributes | The attributes for the key to import. |
| [in] | data | The buffer containing the key data in import format. |
| [in] | data_length | Size of the data buffer in bytes. |
| [out] | key_buffer | The buffer containing the key data in output format. |
| [in] | key_buffer_size | Size of the key_buffer buffer in bytes. This size is greater or equal to data_length. |
| [out] | key_buffer_length | The length of the data written in key_buffer in bytes. |
| [out] | bits | The key size in number of bits. |
- Return values
-
◆ mbedtls_psa_ffdh_key_agreement()
Perform a key agreement and return the FFDH shared secret.
- Parameters
-
| [in] | attributes | The attributes of the key to use for the operation. |
| [in] | peer_key | The buffer containing the key context of the peer's public key. |
| [in] | peer_key_length | Size of the peer_key buffer in bytes. |
| [in] | key_buffer | The buffer containing the private key context. |
| [in] | key_buffer_size | Size of the key_buffer buffer in bytes. |
| [out] | shared_secret | The buffer to which the shared secret is to be written. |
| [in] | shared_secret_size | Size of the shared_secret buffer in bytes. |
| [out] | shared_secret_length | On success, the number of bytes that make up the returned shared secret. |
- Return values
-