PSA PAKE: Add integral types
Add integral types for the draft version of PSA Crypto API PAKE
interface.
Signed-off-by: Janos Follath <janos.follath@arm.com>
diff --git a/include/psa/crypto_types.h b/include/psa/crypto_types.h
index 386c7d7..cd8ac4b 100644
--- a/include/psa/crypto_types.h
+++ b/include/psa/crypto_types.h
@@ -380,4 +380,15 @@
/**@}*/
+/** \defgroup pake Password-authenticated key exchange
+ * @{
+ */
+
+/** \brief Encoding of the side of PAKE */
+typedef uint16_t psa_pake_side_t;
+
+/** \brief Encoding of the type of input/output for PAKE */
+typedef uint16_t psa_pake_data_t;
+
+/**@}*/
#endif /* PSA_CRYPTO_TYPES_H */
diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h
index 497bd8f..3c2b7be 100644
--- a/include/psa/crypto_values.h
+++ b/include/psa/crypto_values.h
@@ -2381,4 +2381,38 @@
/**@}*/
+/** \defgroup pake Password-authenticated key exchange
+ * @{
+ */
+
+/** The first peer in a balanced PAKE.
+ *
+ * Although balanced PAKE protocols are symmetric, some of them needs an
+ * ordering of peers for the transcript calculations. If the protocol does not
+ * need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are
+ * accepted.
+ */
+#define PSA_PAKE_SIDE_FIRST ((psa_pake_side_t)0x0001)
+
+/** The second peer in a balanced PAKE.
+ *
+ * Although balanced PAKE protocols are symmetric, some of them needs an
+ * ordering of peers for the transcript calculations. If the protocol does not
+ * need this, either #PSA_PAKE_SIDE_FIRST or #PSA_PAKE_SIDE_SECOND are
+ * accepted.
+ */
+#define PSA_PAKE_SIDE_SECOND ((psa_pake_side_t)0x0002)
+
+/** The client in an augmented PAKE.
+ *
+ * Augmented PAKE protocols need to differentiate between client and server.
+ */
+#define PSA_PAKE_SIDE_CLIENT ((psa_pake_side_t)0x0101)
+
+/** The server in an augmented PAKE.
+ *
+ * Augmented PAKE protocols need to differentiate between client and server.
+ */
+#define PSA_PAKE_SIDE_SERVER ((psa_pake_side_t)0x0102)
+/**@}*/
#endif /* PSA_CRYPTO_VALUES_H */