@@ -869,42 +869,6 @@ static psa_algorithm_t psa_pake_cs_get_hash(
869
869
static void psa_pake_cs_set_hash (psa_pake_cipher_suite_t * cipher_suite ,
870
870
psa_algorithm_t hash );
871
871
872
- /** The type of the state data structure for PAKE operations.
873
- *
874
- * Before calling any function on a PAKE operation object, the application
875
- * must initialize it by any of the following means:
876
- * - Set the structure to all-bits-zero, for example:
877
- * \code
878
- * psa_pake_operation_t operation;
879
- * memset(&operation, 0, sizeof(operation));
880
- * \endcode
881
- * - Initialize the structure to logical zero values, for example:
882
- * \code
883
- * psa_pake_operation_t operation = {0};
884
- * \endcode
885
- * - Initialize the structure to the initializer #PSA_PAKE_OPERATION_INIT,
886
- * for example:
887
- * \code
888
- * psa_pake_operation_t operation = PSA_PAKE_OPERATION_INIT;
889
- * \endcode
890
- * - Assign the result of the function psa_pake_operation_init()
891
- * to the structure, for example:
892
- * \code
893
- * psa_pake_operation_t operation;
894
- * operation = psa_pake_operation_init();
895
- * \endcode
896
- *
897
- * This is an implementation-defined \c struct. Applications should not
898
- * make any assumptions about the content of this structure.
899
- * Implementation details can change in future versions without notice. */
900
- typedef struct psa_pake_operation_s psa_pake_operation_t ;
901
-
902
- /** The type of input values for PAKE operations. */
903
- typedef struct psa_crypto_driver_pake_inputs_s psa_crypto_driver_pake_inputs_t ;
904
-
905
- /** The type of computation stage for J-PAKE operations. */
906
- typedef struct psa_jpake_computation_stage_s psa_jpake_computation_stage_t ;
907
-
908
872
struct psa_crypto_driver_pake_inputs_s {
909
873
uint8_t * MBEDTLS_PRIVATE (password );
910
874
size_t MBEDTLS_PRIVATE (password_len );
@@ -916,6 +880,9 @@ struct psa_crypto_driver_pake_inputs_s {
916
880
psa_pake_cipher_suite_t MBEDTLS_PRIVATE (cipher_suite );
917
881
};
918
882
883
+ /** The type of input values for PAKE operations. */
884
+ typedef struct psa_crypto_driver_pake_inputs_s psa_crypto_driver_pake_inputs_t ;
885
+
919
886
typedef enum psa_jpake_round {
920
887
PSA_JPAKE_FIRST = 0 ,
921
888
PSA_JPAKE_SECOND = 1 ,
@@ -940,6 +907,9 @@ struct psa_jpake_computation_stage_s {
940
907
psa_pake_step_t MBEDTLS_PRIVATE (step );
941
908
};
942
909
910
+ /** The type of computation stage for J-PAKE operations. */
911
+ typedef struct psa_jpake_computation_stage_s psa_jpake_computation_stage_t ;
912
+
943
913
#define PSA_JPAKE_EXPECTED_INPUTS (round ) ((round) == PSA_JPAKE_FINISHED ? 0 : \
944
914
((round) == PSA_JPAKE_FIRST ? 2 : 1))
945
915
#define PSA_JPAKE_EXPECTED_OUTPUTS (round ) ((round) == PSA_JPAKE_FINISHED ? 0 : \
@@ -977,6 +947,36 @@ struct psa_pake_operation_s {
977
947
#endif
978
948
};
979
949
950
+ /** The type of the state data structure for PAKE operations.
951
+ *
952
+ * Before calling any function on a PAKE operation object, the application
953
+ * must initialize it by any of the following means:
954
+ * - Set the structure to all-bits-zero, for example:
955
+ * \code
956
+ * psa_pake_operation_t operation;
957
+ * memset(&operation, 0, sizeof(operation));
958
+ * \endcode
959
+ * - Initialize the structure to logical zero values, for example:
960
+ * \code
961
+ * psa_pake_operation_t operation = {0};
962
+ * \endcode
963
+ * - Initialize the structure to the initializer #PSA_PAKE_OPERATION_INIT,
964
+ * for example:
965
+ * \code
966
+ * psa_pake_operation_t operation = PSA_PAKE_OPERATION_INIT;
967
+ * \endcode
968
+ * - Assign the result of the function psa_pake_operation_init()
969
+ * to the structure, for example:
970
+ * \code
971
+ * psa_pake_operation_t operation;
972
+ * operation = psa_pake_operation_init();
973
+ * \endcode
974
+ *
975
+ * This is an implementation-defined \c struct. Applications should not
976
+ * make any assumptions about the content of this structure.
977
+ * Implementation details can change in future versions without notice. */
978
+ typedef struct psa_pake_operation_s psa_pake_operation_t ;
979
+
980
980
/** Return an initial value for a PAKE operation object.
981
981
*/
982
982
static psa_pake_operation_t psa_pake_operation_init (void );
0 commit comments