XenevaOS
Loading...
Searching...
No Matches
Functions
psa_crypto_pake.h File Reference
#include <psa/crypto.h>
Include dependency graph for psa_crypto_pake.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

psa_status_t mbedtls_psa_pake_setup (mbedtls_psa_pake_operation_t *operation, const psa_crypto_driver_pake_inputs_t *inputs)
 
psa_status_t mbedtls_psa_pake_output (mbedtls_psa_pake_operation_t *operation, psa_crypto_driver_pake_step_t step, uint8_t *output, size_t output_size, size_t *output_length)
 
psa_status_t mbedtls_psa_pake_input (mbedtls_psa_pake_operation_t *operation, psa_crypto_driver_pake_step_t step, const uint8_t *input, size_t input_length)
 
psa_status_t mbedtls_psa_pake_get_implicit_key (mbedtls_psa_pake_operation_t *operation, uint8_t *output, size_t output_size, size_t *output_length)
 
psa_status_t mbedtls_psa_pake_abort (mbedtls_psa_pake_operation_t *operation)
 

Function Documentation

◆ mbedtls_psa_pake_abort()

psa_status_t mbedtls_psa_pake_abort ( mbedtls_psa_pake_operation_t *  operation)

Abort a PAKE operation.

Note
The signature of this function is that of a PSA driver pake_abort entry point. This function behaves as a pake_abort entry point as defined in the PSA driver interface specification for transparent drivers.
Parameters
[in,out]operationThe operation to abort.
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_CORRUPTION_DETECTED\emptydescription

◆ mbedtls_psa_pake_get_implicit_key()

psa_status_t mbedtls_psa_pake_get_implicit_key ( mbedtls_psa_pake_operation_t *  operation,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Get implicitly confirmed shared secret from a PAKE.

Note
The signature of this function is that of a PSA driver pake_get_implicit_key entry point. This function behaves as a pake_get_implicit_key entry point as defined in the PSA driver interface specification for transparent drivers.
Parameters
[in,out]operationActive PAKE operation.
[out]outputOutput buffer for implicit key.
output_sizeSize of the output buffer in bytes.
[out]output_lengthOn success, the number of bytes of the implicit key.
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_NOT_SUPPORTEDInput from a PAKE is not supported by the algorithm in the output key derivation operation.
PSA_ERROR_INSUFFICIENT_MEMORY\emptydescription
PSA_ERROR_CORRUPTION_DETECTED\emptydescription
PSA_ERROR_DATA_CORRUPT\emptydescription
PSA_ERROR_DATA_INVALID\emptydescription

◆ mbedtls_psa_pake_input()

psa_status_t mbedtls_psa_pake_input ( mbedtls_psa_pake_operation_t *  operation,
psa_crypto_driver_pake_step_t  step,
const uint8_t *  input,
size_t  input_length 
)

Provide input for a step of a password-authenticated key exchange.

Note
The signature of this function is that of a PSA driver pake_input entry point. This function behaves as a pake_input entry point as defined in the PSA driver interface specification for transparent drivers.
The core checks that input_length is smaller than PSA_PAKE_INPUT_MAX_SIZE.
Parameters
[in,out]operationActive PAKE operation.
stepThe driver step for which the input is provided.
[in]inputBuffer containing the input in the format appropriate for this step. Refer to the documentation of psa_crypto_driver_pake_step_t for more information.
input_lengthSize of the input buffer in bytes.
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_INVALID_SIGNATUREThe verification fails for a zero-knowledge input step.
PSA_ERROR_INVALID_ARGUMENTthe input is not valid for the operation's algorithm, cipher suite or step.
PSA_ERROR_NOT_SUPPORTEDthe input is not supported for the operation's algorithm, cipher suite or step.
PSA_ERROR_INSUFFICIENT_MEMORY\emptydescription
PSA_ERROR_CORRUPTION_DETECTED\emptydescription
PSA_ERROR_DATA_CORRUPT\emptydescription
PSA_ERROR_DATA_INVALID\emptydescription

◆ mbedtls_psa_pake_output()

psa_status_t mbedtls_psa_pake_output ( mbedtls_psa_pake_operation_t *  operation,
psa_crypto_driver_pake_step_t  step,
uint8_t *  output,
size_t  output_size,
size_t *  output_length 
)

Get output for a step of a password-authenticated key exchange.

Note
The signature of this function is that of a PSA driver pake_output entry point. This function behaves as a pake_output entry point as defined in the PSA driver interface specification for transparent drivers.
Parameters
[in,out]operationActive PAKE operation.
stepThe step of the algorithm for which the output is requested.
[out]outputBuffer where the output is to be written in the format appropriate for this driver step. Refer to the documentation of psa_crypto_driver_pake_step_t for more information.
output_sizeSize of the output buffer in bytes. This must be at least PSA_PAKE_OUTPUT_SIZE(alg, primitive, step) where alg and primitive are the PAKE algorithm and primitive in the operation's cipher suite, and step is the output step.
[out]output_lengthOn success, the number of bytes of the returned output.
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_BUFFER_TOO_SMALLThe size of the output buffer is too small.
PSA_ERROR_INSUFFICIENT_ENTROPY\emptydescription
PSA_ERROR_CORRUPTION_DETECTED\emptydescription
PSA_ERROR_DATA_CORRUPT\emptydescription
PSA_ERROR_DATA_INVALID\emptydescription

◆ mbedtls_psa_pake_setup()

psa_status_t mbedtls_psa_pake_setup ( mbedtls_psa_pake_operation_t *  operation,
const psa_crypto_driver_pake_inputs_t *  inputs 
)

Set the session information for a password-authenticated key exchange.

Note
The signature of this function is that of a PSA driver pake_setup entry point. This function behaves as a pake_setup entry point as defined in the PSA driver interface specification for transparent drivers.
Parameters
[in,out]operationThe operation object to set up. It must have been initialized but not set up yet.
[in]inputsInputs required for PAKE operation (role, password, key lifetime, cipher suite)
Return values
PSA_SUCCESSSuccess.
PSA_ERROR_NOT_SUPPORTEDThe algorithm in cipher_suite is not a supported PAKE algorithm, or the PAKE primitive in cipher_suite is not supported or not compatible with the PAKE algorithm, or the hash algorithm in cipher_suite is not supported or not compatible with the PAKE algorithm and primitive.
PSA_ERROR_INSUFFICIENT_MEMORY\emptydescription
PSA_ERROR_CORRUPTION_DETECTED\emptydescription