Shrink psa_pake_side_t to uint8_t

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath 2021-04-19 14:46:54 +01:00
parent ef1b8c9a76
commit 8005e8a167
2 changed files with 5 additions and 5 deletions

View File

@ -389,7 +389,7 @@ typedef uint16_t psa_key_derivation_step_t;
* Encodes which side of the algorithm is being executed. For more information * Encodes which side of the algorithm is being executed. For more information
* see the documentation of individual PSA_PAKE_SIDE_XXX constants. * see the documentation of individual PSA_PAKE_SIDE_XXX constants.
*/ */
typedef uint16_t psa_pake_side_t; typedef uint8_t psa_pake_side_t;
/** Encoding of input and output indicators for PAKE. /** Encoding of input and output indicators for PAKE.
* *

View File

@ -2477,7 +2477,7 @@ static inline int mbedtls_svc_key_id_is_null( mbedtls_svc_key_id_t key )
* need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are * need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are
* accepted. * accepted.
*/ */
#define PSA_PAKE_SIDE_FIRST ((psa_pake_side_t)0x0001) #define PSA_PAKE_SIDE_FIRST ((psa_pake_side_t)0x01)
/** The second peer in a balanced PAKE. /** The second peer in a balanced PAKE.
* *
@ -2486,19 +2486,19 @@ static inline int mbedtls_svc_key_id_is_null( mbedtls_svc_key_id_t key )
* need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are * need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are
* accepted. * accepted.
*/ */
#define PSA_PAKE_SIDE_SECOND ((psa_pake_side_t)0x0002) #define PSA_PAKE_SIDE_SECOND ((psa_pake_side_t)0x02)
/** The client in an augmented PAKE. /** The client in an augmented PAKE.
* *
* Augmented PAKE algorithms need to differentiate between client and server. * Augmented PAKE algorithms need to differentiate between client and server.
*/ */
#define PSA_PAKE_SIDE_CLIENT ((psa_pake_side_t)0x0101) #define PSA_PAKE_SIDE_CLIENT ((psa_pake_side_t)0x11)
/** The server in an augmented PAKE. /** The server in an augmented PAKE.
* *
* Augmented PAKE algorithms need to differentiate between client and server. * Augmented PAKE algorithms need to differentiate between client and server.
*/ */
#define PSA_PAKE_SIDE_SERVER ((psa_pake_side_t)0x0102) #define PSA_PAKE_SIDE_SERVER ((psa_pake_side_t)0x12)
/** The PAKE uses elliptic curves. /** The PAKE uses elliptic curves.
* *