You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/crypto/api/ops/kdf.rst
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,6 +228,28 @@ Key derivation algorithms
228
228
|`PSA_KEY_TYPE_DERIVE` (for the PSK)
229
229
|`PSA_KEY_TYPE_RAW_DATA` (for the other inputs)
230
230
231
+
.. macro:: PSA_ALG_TLS12_ECJPAKE_TO_PMS
232
+
:definition: ((psa_algorithm_t)0x08000609)
233
+
234
+
.. summary::
235
+
The TLS 1.2 ECJPAKE-to-PMS key-derivation algorithm.
236
+
237
+
This KDF is defined in :cite-title:`TLS-ECJPAKE` §8.7. This specifies the use of a KDF to derive the TLS 1.2 session secrets from the output of EC J-PAKE over the secp256r1 Elliptic curve (the 256-bit curve in `PSA_ECC_FAMILY_SECP_R1`). EC J-PAKE operations can be performed using the extension to the |API| defined in :cite-title:`PSA-PAKE`.
238
+
239
+
This KDF takes the shared secret *K* (an uncompressed EC point in case of EC J-PAKE) and calculates SHA256(*K.X*).
240
+
241
+
This function takes a single input:
242
+
243
+
* `PSA_KEY_DERIVATION_INPUT_SECRET` is the shared secret K from EC J-PAKE. For secp256r1, the input is exactly 65 bytes.
244
+
245
+
The input can be supplied to the key derivation operation by calling :code:`psa_pake_get_implicit_key()`, part of the PAKE extension API defined in :cite:`PSA-PAKE`.
246
+
247
+
The 32-byte output has to be read in a single call to either `psa_key_derivation_output_bytes()` or `psa_key_derivation_output_key()`. The size of the output is defined as `PSA_TLS12_ECJPAKE_TO_PMS_OUTPUT_SIZE`.
248
+
249
+
.. subsection:: Compatible key types
250
+
251
+
None --- the secret input is extracted from a PAKE operation by calling :code:`psa_pake_get_implicit_key()`.
252
+
231
253
.. macro:: PSA_ALG_PBKDF2_HMAC
232
254
:definition: /* specification-defined value */
233
255
@@ -1141,3 +1163,11 @@ Support macros
1141
1163
TLS implementations supporting these cipher suites MUST support arbitrary PSK identities up to 128 octets in length, and arbitrary PSKs up to 64 octets in length. Supporting longer identities and keys is RECOMMENDED.
1142
1164
1143
1165
Therefore, it is recommended that implementations define `PSA_TLS12_PSK_TO_MS_PSK_MAX_SIZE` with a value greater than or equal to ``64``.
1166
+
1167
+
.. macro:: PSA_TLS12_ECJPAKE_TO_PMS_OUTPUT_SIZE
1168
+
:definition: 32
1169
+
1170
+
.. summary::
1171
+
The size of the output from the TLS 1.2 ECJPAKE-to-PMS key-derivation algorithm, in bytes.
1172
+
1173
+
This value can be used when extracting the result of a key-derivation operation that was set up with the `PSA_ALG_TLS12_ECJPAKE_TO_PMS` algorithm.
0 commit comments