@@ -674,8 +674,27 @@ HKDF calculation
674674
675675In all of the SAS methods, HKDF is as defined in `RFC 5869 <https://tools.ietf.org/html/rfc5869 >`_
676676and uses the previously agreed-upon hash function for the hash function. The shared
677- secret is supplied as the input keying material. No salt is used, and the info
678- parameter is the concatenation of:
677+ secret is supplied as the input keying material. No salt is used. When the
678+ ``key_agreement_protocol `` is ``curve25519-hkdf-sha256 ``, the info parameter is
679+ the concatenation of:
680+
681+ * The string ``MATRIX_KEY_VERIFICATION_SAS| ``.
682+ * The Matrix ID of the user who sent the ``m.key.verification.start `` message,
683+ followed by ``| ``.
684+ * The Device ID of the device which sent the ``m.key.verification.start ``
685+ message, followed by ``| ``.
686+ * The public key from the ``m.key.verification.key `` message sent by the device
687+ which sent the ``m.key.verification.start `` message, followed by ``| ``.
688+ * The Matrix ID of the user who sent the ``m.key.verification.accept `` message,
689+ followed by ``| ``.
690+ * The Device ID of the device which sent the ``m.key.verification.accept ``
691+ message, followed by ``| ``.
692+ * The public key from the ``m.key.verification.key `` message sent by the device
693+ which sent the ``m.key.verification.accept `` message, followed by ``| ``.
694+ * The ``transaction_id `` being used.
695+
696+ When the ``key_agreement_protocol `` is the deprecated method ``curve25519 ``,
697+ the info parameter is the concatenation of:
679698
680699 * The string ``MATRIX_KEY_VERIFICATION_SAS ``.
681700 * The Matrix ID of the user who sent the ``m.key.verification.start `` message.
@@ -684,6 +703,8 @@ parameter is the concatenation of:
684703 * The Device ID of the device which sent the ``m.key.verification.accept `` message.
685704 * The ``transaction_id `` being used.
686705
706+ New implementations are discouraged from implementing the ``curve25519 `` method.
707+
687708.. admonition :: Rationale
688709
689710 HKDF is used over the plain shared secret as it results in a harder attack
0 commit comments