Internet-Draft Variable-Length Output PRFs in IKEv2 August 2026
Smyslov Expires 1 March 2027 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-ietf-ipsecme-ikev2-prf-plus-02
Updates:
7296, 7815 (if approved)
Published:
Intended Status:
Standards Track
Expires:
Author:
V. Smyslov
ELVIS-PLUS

Use of Variable-Length Output Pseudo-Random Functions (PRFs) in the Internet Key Exchange Protocol Version 2 (IKEv2)

Abstract

This document specifies the use of variable-length output Pseudo-Random Functions (PRFs) in the Internet Key Exchange Protocol Version 2 (IKEv2). Current IKEv2 specification relies on traditional PRFs with fixed output length for key derivation and uses iterative application of a PRF (called "prf+") in cases when longer output is required. Appearance of PRFs that can output as much bits as requested allows to streamline the key derivation functions of IKEv2.

This document updates RFC 7296 and RFC 7815 for the cases when variable-length output Pseudo-Random Functions are used in IKEv2 and its extensions.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 1 March 2027.

Table of Contents

1. Introduction

The Internet Key Exchange protocol version 2 (IKEv2) [RFC7296] is used in the IP Security (IPsec) architecture for the Security Association (SA) parameters negotiation and for establishing an authenticated shared secret. As part of the SA parameters negotiation a Pseudo-Random Function (PRF) is agreed upon. Keying materials for established SAs are then derived from the shared secret using the negotiated PRF.

For the purpose of deriving variable-size keying material to accomodate the use of cryptographic algorithms with different properties, a construction called "prf+" is used in IKEv2. This construction servers the role of a Key Deriation Function (KDF) in IKEv2 and is defined in Section 2.13 of IKEv2 [RFC7296] (also repeated unchanged in Section 2.1 of Minimal IKEv2 [RFC7815]) and is provided here for convenience:

   prf+ (K,S) = T1 | T2 | T3 | T4 | ...

   where:
   T1 = prf (K, S | 0x01)
   T2 = prf (K, T1 | S | 0x02)
   T3 = prf (K, T2 | S | 0x03)
   T4 = prf (K, T3 | S | 0x04)

This construction allows to get more output bits than the output length of the negotiated PRF by applying it iteratively.

Modern achievements in cryptography bore new class of cryptographic primitives - PRFs with variable-length output. These functions are able to produce as many pseudorandom bits as requested in one call. One example of such PRFs is KMAC [SP-800-185].

When variable-length output PRFs are considered for the use in IKEv2 for the key derivation purposes, it is possible either to keep the prf+ construction always performung exactly one iteration with the PRF producing the needed number of output bits at once, or to remove the prf+ construction completely and replace it with a single call to the PRF, that would also produce the needed number of output bits. This is discussed in Section 9.2 of [I-D.ietf-ipsecme-sha3] for the case of KMAC.

Since it is envisioned that more variable-length output PRFs could appear in future, this specification aims to establish a uniform approach for using them in IKEv2. This document updates IKEv2 by changing the definition of "prf+" given in in Section 2.13 of [RFC7296] for the case when when variable-length output Pseudo-Random Functions are employed.

2. Terminology and Notation

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

3. Use of Variable-Length Output PRFs in IKEv2

When new Pseudo-Random Function is defined for IKEv2, the corresponding document describing its use in the protocol must specify whether this PRF has fixed or variable output length. For a variable-length output PRF the document must specify a preferred key size if this PRF has variable-size key.

When a variable-length output Pseudo-Random Function is negotiated in IKEv2 by means of the "Pseudo-random Function (PRF)" transform, then the following rules have affect.

  1. When such a PRF is used in the context of "prf", then its output length is set to the preferred key size of this PRF.

  2. When such a PRF is used in the context of "prf+", then the construction defined in Section 2.13 of [RFC7296] is replaced with the following definition:

       prf+ (K,S) = prf (K, S | 0x01)
    

    The output length of the PRF is set to the required number of pseudorandom bits in the current context.

  3. If an API to such a PRF includes additional inputs (like "customization string" for KMAC), then these inputs are not used (e.g. set to the empty string).

These rules are applied to every use of "prf" and "prf+" in IKEv2, which include not only to the core IKEv2 protocol defined in [RFC7296], but also to its current and future extensions where "prf" or "prf+" are called (like [RFC5106], [RFC5723], [RFC6617], [RFC6628], [RFC6631], [RFC8784], [RFC9242], [RFC9370], [RFC9838], [RFC9867]).

4. Security Considerations

It is assumed that variable-output length PRFs are cryptographically strong and do not decrease the entropy of the input key if the output length is at least the size of the key.

5. IANA Considerations

This specification makes no request to IANA.

6. References

6.1. Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/info/rfc8174>.
[RFC7296]
Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. Kivinen, "Internet Key Exchange Protocol Version 2 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, , <https://www.rfc-editor.org/info/rfc7296>.

6.2. Informative References

[RFC7815]
Kivinen, T., "Minimal Internet Key Exchange Version 2 (IKEv2) Initiator Implementation", RFC 7815, DOI 10.17487/RFC7815, , <https://www.rfc-editor.org/info/rfc7815>.
[RFC5106]
Tschofenig, H., Kroeselberg, D., Pashalidis, A., Ohba, Y., and F. Bersani, "The Extensible Authentication Protocol-Internet Key Exchange Protocol version 2 (EAP-IKEv2) Method", RFC 5106, DOI 10.17487/RFC5106, , <https://www.rfc-editor.org/info/rfc5106>.
[RFC5723]
Sheffer, Y. and H. Tschofenig, "Internet Key Exchange Protocol Version 2 (IKEv2) Session Resumption", RFC 5723, DOI 10.17487/RFC5723, , <https://www.rfc-editor.org/info/rfc5723>.
[RFC6617]
Harkins, D., "Secure Pre-Shared Key (PSK) Authentication for the Internet Key Exchange Protocol (IKE)", RFC 6617, DOI 10.17487/RFC6617, , <https://www.rfc-editor.org/info/rfc6617>.
[RFC6628]
Shin, S. and K. Kobara, "Efficient Augmented Password-Only Authentication and Key Exchange for IKEv2", RFC 6628, DOI 10.17487/RFC6628, , <https://www.rfc-editor.org/info/rfc6628>.
[RFC6631]
Kuegler, D. and Y. Sheffer, "Password Authenticated Connection Establishment with the Internet Key Exchange Protocol version 2 (IKEv2)", RFC 6631, DOI 10.17487/RFC6631, , <https://www.rfc-editor.org/info/rfc6631>.
[RFC8784]
Fluhrer, S., Kampanakis, P., McGrew, D., and V. Smyslov, "Mixing Preshared Keys in the Internet Key Exchange Protocol Version 2 (IKEv2) for Post-quantum Security", RFC 8784, DOI 10.17487/RFC8784, , <https://www.rfc-editor.org/info/rfc8784>.
[RFC9242]
Smyslov, V., "Intermediate Exchange in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9242, DOI 10.17487/RFC9242, , <https://www.rfc-editor.org/info/rfc9242>.
[RFC9370]
Tjhai, CJ., Tomlinson, M., Bartlett, G., Fluhrer, S., Van Geest, D., Garcia-Morchon, O., and V. Smyslov, "Multiple Key Exchanges in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9370, DOI 10.17487/RFC9370, , <https://www.rfc-editor.org/info/rfc9370>.
[RFC9838]
Smyslov, V. and B. Weis, "Group Key Management Using the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 9838, DOI 10.17487/RFC9838, , <https://www.rfc-editor.org/info/rfc9838>.
[RFC9867]
Smyslov, V., "Mixing Preshared Keys in the IKE_INTERMEDIATE and CREATE_CHILD_SA Exchanges of the Internet Key Exchange Protocol Version 2 (IKEv2) for Post-Quantum Security", RFC 9867, DOI 10.17487/RFC9867, , <https://www.rfc-editor.org/info/rfc9867>.
[IKEV2-IANA-PRF]
IANA, "Internet Key Exchange Version 2 (IKEv2) Parameters, Transform Type 2 - Pseudorandom Function Transform IDs", <https://www.iana.org/assignments/ikev2-parameters/ikev2-parameters.xhtml#ikev2-parameters-6>.
[SP-800-185]
Kelsey, J., Change, S., and R. Perlner, "SHA-3 derived functions: cSHAKE, KMAC, TupleHash and ParallelHash", National Institute of Standards and Technology, DOI 10.6028/nist.sp.800-185, , <https://doi.org/10.6028/nist.sp.800-185>.
[I-D.ietf-ipsecme-sha3]
S, B., R, A., and J. C, "Use of SHA-3 in the Internet Key Exchange Protocol Version 2 (IKEv2) and IPsec", Work in Progress, Internet-Draft, draft-ietf-ipsecme-sha3-01, , <https://datatracker.ietf.org/doc/html/draft-ietf-ipsecme-sha3-01>.

Acknowledgements

This document was inspired by draft-salter-ipsecme-sha3 "Use of SHA-3 in the Internet Key Exchange Protocol Version 2 (IKEv2) and IPsec". Wang Xi and Thom Wiggers made security-relevant proposals regarding cryptographic separation of "prf" and "prf+".

Author's Address

Valery Smyslov
ELVIS-PLUS
PO Box 81
Moscow (Zelenograd)
124460
Russian Federation