Password-authenticated key exchange (PAKE)
Description
This is a proposed PAKE interface for the PSA Crypto API. It is not part of the official PSA Crypto API yet.
- Note
- The content of this section is not part of the stable API and ABI of Mbed Crypto and may change arbitrarily from version to version. Same holds for the corresponding macros #PSA_ALG_CATEGORY_PAKE and PSA_ALG_JPAKE .
Functions |
|
| psa_status_t | psa_pake_setup (psa_pake_operation_t *operation, psa_pake_cipher_suite_t cipher_suite) |
|
Set the session information for a password-authenticated key exchange.
|
|
| psa_status_t | psa_pake_set_password_key (psa_pake_operation_t *operation, mbedtls_svc_key_id_t password) |
|
Set the password for a password-authenticated key exchange from key ID.
|
|
| psa_status_t | psa_pake_set_user (psa_pake_operation_t *operation, const uint8_t *user_id, size_t user_id_len) |
|
Set the user ID for a password-authenticated key exchange.
|
|
| psa_status_t | psa_pake_set_peer (psa_pake_operation_t *operation, const uint8_t *peer_id, size_t peer_id_len) |
|
Set the peer ID for a password-authenticated key exchange.
|
|
| psa_status_t | psa_pake_set_side (psa_pake_operation_t *operation, psa_pake_side_t side) |
|
Set the side for a password-authenticated key exchange.
|
|
| psa_status_t | psa_pake_output (psa_pake_operation_t *operation, psa_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.
|
|
| psa_status_t | psa_pake_input (psa_pake_operation_t *operation, psa_pake_step_t step, uint8_t *input, size_t input_length) |
|
Provide input for a step of a password-authenticated key exchange.
|
|
| psa_status_t | psa_pake_get_implicit_key (psa_pake_operation_t *operation, psa_key_derivation_operation_t *output) |
|
Get implicitly confirmed shared secret from a PAKE.
|
|
Macros |
|
| #define | PSA_PAKE_SIDE_FIRST (( psa_pake_side_t )0x01) |
|
The first peer in a balanced PAKE.
|
|
| #define | PSA_PAKE_SIDE_SECOND (( psa_pake_side_t )0x02) |
|
The second peer in a balanced PAKE.
|
|
| #define | PSA_PAKE_SIDE_CLIENT (( psa_pake_side_t )0x11) |
|
The client in an augmented PAKE.
|
|
| #define | PSA_PAKE_SIDE_SERVER (( psa_pake_side_t )0x12) |
|
The server in an augmented PAKE.
|
|
| #define | PSA_PAKE_PRIMITIVE_TYPE_ECC (( psa_pake_primitive_type_t )0x01) |
|
The PAKE primitive type indicating the use of elliptic curves.
|
|
| #define | PSA_PAKE_PRIMITIVE_TYPE_DH (( psa_pake_primitive_type_t )0x02) |
|
The PAKE primitive type indicating the use of Diffie-Hellman groups.
|
|
| #define | PSA_PAKE_PRIMITIVE (pake_type, pake_family, pake_bits) |
|
Construct a PAKE primitive from type, family and bit-size.
|
|
| #define | PSA_PAKE_STEP_KEY_SHARE (( psa_pake_step_t )0x01) |
|
The key share being sent to or received from the peer.
|
|
| #define | PSA_PAKE_STEP_ZK_PUBLIC (( psa_pake_step_t )0x02) |
|
A Schnorr NIZKP public key.
|
|
| #define | PSA_PAKE_STEP_ZK_PROOF (( psa_pake_step_t )0x03) |
|
A Schnorr NIZKP proof.
|
|
Typedefs |
|
| typedef uint8_t | psa_pake_side_t |
|
Encoding of the side of PAKE.
|
|
| typedef uint8_t | psa_pake_step_t |
|
Encoding of input and output indicators for PAKE.
|
|
| typedef uint8_t | psa_pake_primitive_type_t |
|
Encoding of the type of the PAKE's primitive.
|
|
| typedef uint8_t | psa_pake_family_t |
|
Encoding of the family of the primitive associated with the PAKE.
|
|
| typedef uint32_t | psa_pake_primitive_t |
|
Encoding of the primitive associated with the PAKE.
|
|
Function Documentation
◆ psa_pake_setup()
| psa_status_t psa_pake_setup | ( | psa_pake_operation_t * |
operation,
|
| psa_pake_cipher_suite_t |
cipher_suite
|
||
| ) |
Set the session information for a password-authenticated key exchange.
The sequence of operations to set up a password-authenticated key exchange is as follows:
- Allocate an operation object which will be passed to all the functions listed here.
- Initialize the operation object with one of the methods described in the documentation for #psa_pake_operation_t, e.g. #PSA_PAKE_OPERATION_INIT.
- Call psa_pake_setup() to specify the cipher suite.
-
Call
psa_pake_set_xxx()functions on the operation to complete the setup. The exact sequence ofpsa_pake_set_xxx()functions that needs to be called depends on the algorithm in use.
Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
A typical sequence of calls to perform a password-authenticated key exchange:
- Call psa_pake_output(operation, PSA_PAKE_STEP_KEY_SHARE , ...) to get the key share that needs to be sent to the peer.
- Call psa_pake_input(operation, PSA_PAKE_STEP_KEY_SHARE , ...) to provide the key share that was received from the peer.
- Depending on the algorithm additional calls to psa_pake_output() and psa_pake_input() might be necessary.
- Call psa_pake_get_implicit_key() for accessing the shared secret.
Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
If an error occurs at any step after a call to psa_pake_setup() , the operation will need to be reset by a call to psa_pake_abort(). The application may call psa_pake_abort() at any time after the operation has been initialized.
After a successful call to psa_pake_setup() , the application must eventually terminate the operation. The following events terminate an operation:
- A call to psa_pake_abort().
- A successful call to psa_pake_get_implicit_key() .
- Parameters
-
[in,out] operationThe operation object to set up. It must have been initialized but not set up yet. cipher_suiteThe cipher suite to use. (A cipher suite fully characterizes a PAKE algorithm and determines the algorithm as well.)
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid. PSA_ERROR_NOT_SUPPORTEDThe cipher_suiteis not supported or is not valid.PSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_set_password_key()
| psa_status_t psa_pake_set_password_key | ( | psa_pake_operation_t * |
operation,
|
| mbedtls_svc_key_id_t |
password
|
||
| ) |
Set the password for a password-authenticated key exchange from key ID.
Call this function when the password, or a value derived from the password, is already present in the key store.
- Parameters
-
[in,out] operationThe operation object to set the password for. It must have been set up by psa_pake_setup() and not yet in use (neither psa_pake_output() nor psa_pake_input() has been called yet). It must be on operation for which the password hasn't been set yet ( psa_pake_set_password_key() hasn't been called yet). passwordIdentifier of the key holding the password or a value derived from the password (eg. by a memory-hard function). It must remain valid until the operation terminates. It must be of type PSA_KEY_TYPE_PASSWORD or PSA_KEY_TYPE_PASSWORD_HASH . It has to allow the usage PSA_KEY_USAGE_DERIVE .
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid (it must have been set up.) PSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_INVALID_HANDLEPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_STORAGE_FAILUREPSA_ERROR_NOT_PERMITTEDPSA_ERROR_INVALID_ARGUMENTkeyis not compatible with the algorithm or the cipher suite.PSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_set_user()
| psa_status_t psa_pake_set_user | ( | psa_pake_operation_t * |
operation,
|
| const uint8_t * |
user_id,
|
||
| size_t |
user_id_len
|
||
| ) |
Set the user ID for a password-authenticated key exchange.
Call this function to set the user ID. For PAKE algorithms that associate a user identifier with each side of the session you need to call psa_pake_set_peer() as well. For PAKE algorithms that associate a single user identifier with the session, call psa_pake_set_user() only.
Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
- Parameters
-
[in,out] operationThe operation object to set the user ID for. It must have been set up by psa_pake_setup() and not yet in use (neither psa_pake_output() nor psa_pake_input() has been called yet). It must be on operation for which the user ID hasn't been set ( psa_pake_set_user() hasn't been called yet). [in] user_idThe user ID to authenticate with. user_id_lenSize of the user_idbuffer in bytes.
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid. PSA_ERROR_INSUFFICIENT_MEMORYPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_INVALID_ARGUMENTuser_idis NULL.PSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_set_peer()
| psa_status_t psa_pake_set_peer | ( | psa_pake_operation_t * |
operation,
|
| const uint8_t * |
peer_id,
|
||
| size_t |
peer_id_len
|
||
| ) |
Set the peer ID for a password-authenticated key exchange.
Call this function in addition to psa_pake_set_user() for PAKE algorithms that associate a user identifier with each side of the session. For PAKE algorithms that associate a single user identifier with the session, call psa_pake_set_user() only.
Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
- Parameters
-
[in,out] operationThe operation object to set the peer ID for. It must have been set up by psa_pake_setup() and not yet in use (neither psa_pake_output() nor psa_pake_input() has been called yet). It must be on operation for which the peer ID hasn't been set ( psa_pake_set_peer() hasn't been called yet). [in] peer_idThe peer's ID to authenticate. peer_id_lenSize of the peer_idbuffer in bytes.
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid. PSA_ERROR_NOT_SUPPORTEDThe algorithm doesn't associate a second identity with the session. PSA_ERROR_INSUFFICIENT_MEMORYPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_INVALID_ARGUMENTuser_idis NULL.PSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_set_side()
| psa_status_t psa_pake_set_side | ( | psa_pake_operation_t * |
operation,
|
| psa_pake_side_t |
side
|
||
| ) |
Set the side for a password-authenticated key exchange.
Not all PAKE algorithms need to differentiate the communicating entities. It is optional to call this function for PAKEs that don't require a side parameter. For such PAKEs the side parameter is ignored.
Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
- Parameters
-
[in,out] operationThe operation object to set the side for. It must have been set up by psa_pake_setup() and not yet in use (neither psa_pake_output() nor psa_pake_input() has been called yet). It must be on operation for which the side hasn't been set ( psa_pake_set_side() hasn't been called yet). sideA value of type psa_pake_side_t signaling the side of the algorithm that is being set up. For more information see the documentation of PSA_PAKE_SIDE_XXXconstants.
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid. PSA_ERROR_NOT_SUPPORTEDThe sidefor this algorithm is not supported or is not valid.PSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_output()
| psa_status_t psa_pake_output | ( | psa_pake_operation_t * |
operation,
|
| psa_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.
Depending on the algorithm being executed, you might need to call this function several times or you might not need to call this at all.
The exact sequence of calls to perform a password-authenticated key exchange depends on the algorithm in use. Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
If this function returns an error status, the operation enters an error state and must be aborted by calling psa_pake_abort().
- 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 step. Refer to the documentation of the individualPSA_PAKE_STEP_XXXconstants for more information.output_sizeSize of the outputbuffer in bytes. This must be at least #PSA_PAKE_OUTPUT_SIZE(alg,cipher_suite,type).[out] output_lengthOn success, the number of bytes of the returned output.
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid (it must be active, but beyond that validity is specific to the algorithm). PSA_ERROR_BUFFER_TOO_SMALLThe size of the outputbuffer is too small.PSA_ERROR_INSUFFICIENT_MEMORYPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_STORAGE_FAILUREPSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_input()
| psa_status_t psa_pake_input | ( | psa_pake_operation_t * |
operation,
|
| psa_pake_step_t |
step,
|
||
| uint8_t * |
input,
|
||
| size_t |
input_length
|
||
| ) |
Provide input for a step of a password-authenticated key exchange.
Depending on the algorithm being executed, you might need to call this function several times or you might not need to call this at all.
The exact sequence of calls to perform a password-authenticated key exchange depends on the algorithm in use. Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
If this function returns an error status, the operation enters an error state and must be aborted by calling psa_pake_abort().
- Parameters
-
[in,out] operationActive PAKE operation. stepThe step for which the input is provided. [out] inputBuffer containing the input in the format appropriate for this step. Refer to the documentation of the individualPSA_PAKE_STEP_XXXconstants for more information.[out] input_lengthSize of the inputbuffer in bytes.
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe operation state is not valid (it must be active, but beyond that validity is specific to the algorithm). PSA_ERROR_INSUFFICIENT_MEMORYPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_STORAGE_FAILUREPSA_ERROR_INVALID_ARGUMENTThe input is not valid for the algorithm, ciphersuite or step.PSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
◆ psa_pake_get_implicit_key()
| psa_status_t psa_pake_get_implicit_key | ( | psa_pake_operation_t * |
operation,
|
| psa_key_derivation_operation_t * |
output
|
||
| ) |
Get implicitly confirmed shared secret from a PAKE.
At this point there is a cryptographic guarantee that only the authenticated party who used the same password is able to compute the key. But there is no guarantee that the peer is the party it claims to be and was able to do so.
That is, the authentication is only implicit. Since the peer is not authenticated yet, no action should be taken yet that assumes that the peer is who it claims to be. For example, do not access restricted files on the peer's behalf until an explicit authentication has succeeded.
This function can be called after the key exchange phase of the operation has completed. It imports the shared secret output of the PAKE into the provided derivation operation. The input step PSA_KEY_DERIVATION_INPUT_SECRET is used when placing the shared key material in the key derivation operation.
The exact sequence of calls to perform a password-authenticated key exchange depends on the algorithm in use. Refer to the documentation of individual PAKE algorithm types (
PSA_ALG_XXX
values of type
psa_algorithm_t
such that
PSA_ALG_IS_PAKE
(
alg
) is true) for more information.
When this function returns successfully,
operation
becomes inactive. If this function returns an error status, both
operation
and
key_derivation
operations enter an error state and must be aborted by calling psa_pake_abort() and
psa_key_derivation_abort()
respectively.
- Parameters
-
[in,out] operationActive PAKE operation. [out] outputA key derivation operation that is ready for an input step of type PSA_KEY_DERIVATION_INPUT_SECRET .
- Return values
-
PSA_SUCCESSSuccess. PSA_ERROR_BAD_STATEThe PAKE operation state is not valid (it must be active, but beyond that validity is specific to the algorithm). PSA_ERROR_BAD_STATEThe state of outputis not valid for the PSA_KEY_DERIVATION_INPUT_SECRET step. This can happen if the step is out of order or the application has done this step already and it may not be repeated.PSA_ERROR_INVALID_ARGUMENTPSA_KEY_DERIVATION_INPUT_SECRET is not compatible with the output’s algorithm. PSA_ERROR_INSUFFICIENT_MEMORYPSA_ERROR_COMMUNICATION_FAILUREPSA_ERROR_HARDWARE_FAILUREPSA_ERROR_CORRUPTION_DETECTEDPSA_ERROR_STORAGE_FAILUREPSA_ERROR_BAD_STATEThe library has not been previously initialized by psa_crypto_init() . It is implementation-dependent whether a failure to initialize results in this error code.
Macro Definition Documentation
◆ PSA_PAKE_SIDE_FIRST
| #define PSA_PAKE_SIDE_FIRST (( psa_pake_side_t )0x01) |
The first peer in a balanced PAKE.
Although balanced PAKE algorithms are symmetric, some of them needs an ordering of peers for the transcript calculations. If the algorithm does not need this, both PSA_PAKE_SIDE_FIRST and PSA_PAKE_SIDE_SECOND are accepted.
◆ PSA_PAKE_SIDE_SECOND
| #define PSA_PAKE_SIDE_SECOND (( psa_pake_side_t )0x02) |
The second peer in a balanced PAKE.
Although balanced PAKE algorithms are symmetric, some of them needs an ordering of peers for the transcript calculations. If the algorithm does not need this, either PSA_PAKE_SIDE_FIRST or PSA_PAKE_SIDE_SECOND are accepted.
◆ PSA_PAKE_SIDE_CLIENT
| #define PSA_PAKE_SIDE_CLIENT (( psa_pake_side_t )0x11) |
The client in an augmented PAKE.
Augmented PAKE algorithms need to differentiate between client and server.
◆ PSA_PAKE_SIDE_SERVER
| #define PSA_PAKE_SIDE_SERVER (( psa_pake_side_t )0x12) |
The server in an augmented PAKE.
Augmented PAKE algorithms need to differentiate between client and server.
◆ PSA_PAKE_PRIMITIVE_TYPE_ECC
| #define PSA_PAKE_PRIMITIVE_TYPE_ECC (( psa_pake_primitive_type_t )0x01) |
The PAKE primitive type indicating the use of elliptic curves.
The values of the
family
and
bits
fields of the cipher suite identify a specific elliptic curve, using the same mapping that is used for ECC (
psa_ecc_family_t
) keys.
(Here
family
means the value returned by psa_pake_cs_get_family() and
bits
means the value returned by psa_pake_cs_get_bits().)
Input and output during the operation can involve group elements and scalar values:
- The format for group elements is the same as for public keys on the specific curve would be. For more information, consult the documentation of psa_export_public_key() .
- The format for scalars is the same as for private keys on the specific curve would be. For more information, consult the documentation of psa_export_key() .
◆ PSA_PAKE_PRIMITIVE_TYPE_DH
| #define PSA_PAKE_PRIMITIVE_TYPE_DH (( psa_pake_primitive_type_t )0x02) |
The PAKE primitive type indicating the use of Diffie-Hellman groups.
The values of the
family
and
bits
fields of the cipher suite identify a specific Diffie-Hellman group, using the same mapping that is used for Diffie-Hellman (
psa_dh_family_t
) keys.
(Here
family
means the value returned by psa_pake_cs_get_family() and
bits
means the value returned by psa_pake_cs_get_bits().)
Input and output during the operation can involve group elements and scalar values:
- The format for group elements is the same as for public keys on the specific group would be. For more information, consult the documentation of psa_export_public_key() .
- The format for scalars is the same as for private keys on the specific group would be. For more information, consult the documentation of psa_export_key() .
◆ PSA_PAKE_PRIMITIVE
| #define PSA_PAKE_PRIMITIVE | ( |
pake_type,
|
|
pake_family,
|
|||
pake_bits
|
|||
| ) |
Construct a PAKE primitive from type, family and bit-size.
- Parameters
-
pake_typeThe type of the primitive (value of type psa_pake_primitive_type_t ). pake_familyThe family of the primitive (the type and interpretation of this parameter depends on type, for more information consult the documentation of individual psa_pake_primitive_type_t constants).pake_bitsThe bit-size of the primitive (Value of type size_t. The interpretation of this parameter depends onfamily, for more information consult the documentation of individual psa_pake_primitive_type_t constants).
- Returns
- The constructed primitive value of type psa_pake_primitive_t . Return 0 if the requested primitive can't be encoded as psa_pake_primitive_t .
◆ PSA_PAKE_STEP_KEY_SHARE
| #define PSA_PAKE_STEP_KEY_SHARE (( psa_pake_step_t )0x01) |
The key share being sent to or received from the peer.
The format for both input and output at this step is the same as for public keys on the group determined by the primitive ( psa_pake_primitive_t ) would be.
For more information on the format, consult the documentation of psa_export_public_key() .
For information regarding how the group is determined, consult the documentation PSA_PAKE_PRIMITIVE .
◆ PSA_PAKE_STEP_ZK_PUBLIC
| #define PSA_PAKE_STEP_ZK_PUBLIC (( psa_pake_step_t )0x02) |
A Schnorr NIZKP public key.
This is the ephemeral public key in the Schnorr Non-Interactive Zero-Knowledge Proof (the value denoted by the letter 'V' in RFC 8235).
The format for both input and output at this step is the same as for public keys on the group determined by the primitive ( psa_pake_primitive_t ) would be.
For more information on the format, consult the documentation of psa_export_public_key() .
For information regarding how the group is determined, consult the documentation PSA_PAKE_PRIMITIVE .
◆ PSA_PAKE_STEP_ZK_PROOF
| #define PSA_PAKE_STEP_ZK_PROOF (( psa_pake_step_t )0x03) |
A Schnorr NIZKP proof.
This is the proof in the Schnorr Non-Interactive Zero-Knowledge Proof (the value denoted by the letter 'r' in RFC 8235).
Both for input and output, the value at this step is an integer less than the order of the group selected in the cipher suite. The format depends on the group as well:
- For Montgomery curves, the encoding is little endian.
- For everything else the encoding is big endian (see Section 2.3.8 of SEC 1: Elliptic Curve Cryptography at https://www.secg.org/sec1-v2.pdf ).
In both cases leading zeroes are allowed as long as the length in bytes does not exceed the byte length of the group order.
For information regarding how the group is determined, consult the documentation PSA_PAKE_PRIMITIVE .
Typedef Documentation
◆ psa_pake_side_t
| typedef uint8_t psa_pake_side_t |
Encoding of the side of PAKE.
Encodes which side of the algorithm is being executed. For more information see the documentation of individual
PSA_PAKE_SIDE_XXX
constants.
◆ psa_pake_step_t
| typedef uint8_t psa_pake_step_t |
Encoding of input and output indicators for PAKE.
Some PAKE algorithms need to exchange more data than just a single key share. This type is for encoding additional input and output data for such algorithms.
◆ psa_pake_primitive_type_t
| typedef uint8_t psa_pake_primitive_type_t |
Encoding of the type of the PAKE's primitive.
Values defined by this standard will never be in the range 0x80-0xff. Vendors who define additional types must use an encoding in this range.
For more information see the documentation of individual
PSA_PAKE_PRIMITIVE_TYPE_XXX
constants.
◆ psa_pake_family_t
| typedef uint8_t psa_pake_family_t |
Encoding of the family of the primitive associated with the PAKE.
For more information see the documentation of individual
PSA_PAKE_PRIMITIVE_TYPE_XXX
constants.
◆ psa_pake_primitive_t
| typedef uint32_t psa_pake_primitive_t |
Encoding of the primitive associated with the PAKE.
For more information see the documentation of the PSA_PAKE_PRIMITIVE macro.