From 99d0259987fadf213323fe6621759c01d7ecca34 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 15 Nov 2018 17:47:25 +0100 Subject: [PATCH] Improve documentation the shared secret format for FFDH --- include/psa/crypto.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/psa/crypto.h b/include/psa/crypto.h index a2191c664..64f343c6e 100644 --- a/include/psa/crypto.h +++ b/include/psa/crypto.h @@ -1228,8 +1228,11 @@ typedef uint32_t psa_algorithm_t; * public key, with a key selection or key derivation algorithm to produce * one or more shared keys and other shared cryptographic material. * - * The input to \p kdf_alg is the shared secret `g^{ab}` in big-endian format. - * It is `ceiling(n / 8)` bytes long where `n` is the size of the prime `p`. + * The shared secret produced by key agreement and passed as input to the + * derivation or selection algorithm \p kdf_alg is the shared secret + * `g^{ab}` in big-endian format. + * It is `ceiling(m / 8)` bytes long where `m` is the size of the prime `p` + * in bits. * * \param kdf_alg A key derivation algorithm (\c PSA_ALG_XXX value such * that #PSA_ALG_IS_KEY_DERIVATION(\p hash_alg) is true)