PSA_PAKE_OUTPUT_SIZE macro
A sufficient output buffer size for psa_pake_output(). If the size of the output buffer is at least this large, it is guaranteed that psa_pake_output() will not fail due to an insufficient output buffer size. The actual size of the output might be smaller in any given call. See also #PSA_PAKE_OUTPUT_MAX_SIZE
Syntax
#define PSA_PAKE_OUTPUT_SIZE(alg, primitive, output_step) \
(alg == PSA_ALG_JPAKE && \
primitive == PSA_PAKE_PRIMITIVE(PSA_PAKE_PRIMITIVE_TYPE_ECC, \
PSA_ECC_FAMILY_SECP_R1, 256) ? \
( \
output_step == PSA_PAKE_STEP_KEY_SHARE ? 65 : \
output_step == PSA_PAKE_STEP_ZK_PUBLIC ? 65 : \
32 \
) : \
0)
Arguments
alg
A PAKE algorithm (\c PSA_ALG_XXX value such that #PSA_ALG_IS_PAKE(\p alg) is true).
primitive
A primitive of type ::psa_pake_primitive_t that is compatible with algorithm \p alg.
output_step
A value of type ::psa_pake_step_t that is valid for the algorithm \p alg.
Return value
A sufficient output buffer size for the specified PAKE algorithm, primitive, and output step. If the PAKE algorithm, primitive, or output step is not recognized, or the parameters are incompatible, return 0.
![]()
#define PSA_PAKE_OUTPUT_SIZE(alg, primitive, output_step) \