RFC 9385: Using GOST Cryptographic Algorithms in the Internet Key Exchange Protocol Version 2 (IKEv2)
- V. Smyslov
Abstract
This document defines a set of cryptographic transforms for use in the Internet Key Exchange Protocol version 2 (IKEv2). The transforms are based on Russian cryptographic standard algorithms (called "GOST" algorithms). Use of GOST ciphers in IKEv2 is defined in RFC 9227. This document aims to define the use of GOST algorithms for the rest of the cryptographic transforms used in IKEv2.¶
This specification was developed to facilitate implementations that wish to support the GOST algorithms. This document does not imply IETF endorsement of the cryptographic algorithms used in this document.¶
Status of This Memo
This document is not an Internet Standards Track specification; it is published for informational purposes.¶
This is a contribution to the RFC Series, independently of any other RFC stream. The RFC Editor has chosen to publish this document at its discretion and makes no statement about its value for implementation or deployment. Documents approved for publication by the RFC Editor are not candidates for any level of Internet Standard; see Section 2 of RFC 7841.¶
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
https://
Copyright Notice
Copyright (c) 2023 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(https://
1. Introduction
The Internet Key Exchange Protocol version 2 (IKEv2) defined in [RFC7296] is an important part of the IP Security (IPsec) architecture. It is used for the authenticated key exchange and for the negotiation of various protocol parameters and features.¶
This document defines a number of transforms for IKEv2, based on Russian cryptographic standard algorithms (often referred to as "GOST" algorithms) for hash function, digital signature, and key exchange method. These definitions are based on the recommendations established by the Standardisation Technical Committee "Cryptographic information protection", which describe how Russian cryptographic standard algorithms are used in IKEv2 [GOST-IKEv2]. Along with the transforms defined in [RFC9227], the transforms defined in this specification allow for the use of GOST cryptographic algorithms in IPsec protocols.¶
This specification was developed to facilitate implementations that wish to support the GOST algorithms. This document does not imply IETF endorsement of the cryptographic algorithms used in this document.¶
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. Overview
Russian cryptographic standard algorithms (GOST algorithms) are a set of cryptographic algorithms of different types -- ciphers, hash functions, digital signatures, etc. In particular, Russian cryptographic standard [GOST3412-2015] defines the "Kuznyechik" and "Magma" block ciphers (also defined in [RFC7801] and [RFC8891], respectively). Cryptographic standard [GOST3410-2012] defines the elliptic curve digital signature algorithm (also defined in [RFC7091]), while [GOST3411-2012] defines two cryptographic hash functions with different output lengths (also defined in [RFC6986]). These hash functions are often referred to as "Streebog" hash functions, although this is not an official name and is not used in the provided references. The parameters for the elliptic curves used in GOST signature and key exchange algorithms are defined in [RFC7836].¶
4. IKE SA Protection
IKE Security Association (SA) protection using GOST algorithms is defined in [RFC9227].
In particular, two transforms of Type 1 (Encryption Algorithm Transform IDs)
can be used for IKE SA protection: ENCR
The information here is provided for convenience. For full details, please see [RFC9227].¶
5. Pseudorandom Function
This specification defines a new transform of Type 2 (Pseudorandom Function Transform IDs): PRF
6. Shared Key Calculation
This specification defines two new transforms of Type 4 (Key Exchange Method Transform IDs): GOST3410
The shared secret is computed as follows. The initiator randomly selects its private key d_i from {1,..,q - 1}, where q is the subgroup order and is a parameter of the selected curve. Then a public key Q_i is computed as a point on the curve:¶
where G is the generator for the selected curve. It is then sent to the responder. The responder makes the same calculations to get d_r and Q_r and sends Q_r to the initiator. After peers exchange Q_i and Q_R, both sides can compute a point on the curve:¶
where m is the group order and is a parameter of the selected curve. The shared secret K is an x coordinate of S in a little-endian representation. The size of K is determined by the size of the used curve and is either 256 or 512 bits.¶
When the GOST public key is transmitted in the Key Exchange payload (Section 3.4 of [RFC7296]), it MUST be represented as x coordinate immediately followed by y coordinate, each in a little-endian representation. The size of each coordinate is determined by the size of the used curve and is either 256 or 512 bits, so that the size of the Key Exchange Data field in the Key Exchange payload is either 64 or 128 octets.¶
6.1. Recipient Tests
Upon receiving a peer's public key, implementations MUST check that the key is actually a point on the curve. Otherwise, the exchange fails. Implementations MUST check that the calculated public value S is not an identity element of the curve. If S appears to be the identity element of the curve, the exchange fails. The INVALID_SYNTAX notification MAY be sent in these cases.¶
7. Authentication
IKEv2 allows various authentication methods to be used for IKE SA establishment. Some methods are tied to a particular algorithm, while others may be used with different algorithms. This specification makes no restrictions on using the latter ones with the GOST algorithms. In particular, "Shared Key Message Integrity Code" (2), defined in [RFC7296], and "NULL Authentication" (13), defined in [RFC7619], can be used with GOST algorithms with no changes to the process of the AUTH payload content calculation.¶
When the GOST digital signature algorithm is used in IKEv2 for authentication purposes, the "Digital Signature" (14) authentication method, defined in [RFC7427], MUST be specified in the AUTH payload.¶
The GOST digital signature algorithm GOST R 34.10-2012 is defined in [RFC7091] and [GOST3410-2012].
There are
two variants of the GOST digital signature algorithm -- one over a 256-bit elliptic curve and the other over a 512-bit key elliptic curve.
The signature value, as defined in [RFC7091] and [GOST3410-2012], consists of two integers: r and s.
The size of each integer is either 256 or 512 bits depending on the elliptic curve used.
The content of the Signature Value field in the AUTH payload MUST consist of s immediately followed by r, each in a big-endian representation,
so that the size of the field is either 64 or 128 octets.
The Algorithm
7.1. Hash Functions
The GOST digital signature algorithm uses the GOST R 34.11-2012 ("Streebog") hash functions defined in [RFC6986] and [GOST3411-2012]. There are two "Streebog" hash functions: one with a 256-bit output length and the other with a 512-bit output length. The former is used with the GOST digital signature algorithm over a 256-bit elliptic curve and the latter over a 512-bit key elliptic curve.¶
This specification defines two new values for the "IKEv2 Hash
Algorithms" registry: STREEBOG_256 (6) for the GOST hash function with
a 256-bit output length and STREEBOG_512 (7) for the GOST hash function with a 512-bit output length.
These values MUST be included in the
SIGNATURE
7.2. ASN.1 Objects
This section lists GOST digital signature algorithm ASN.1 Algorithm
7.2.1. id-tc26-signwithdigest-gost3410-12-256
The optional parameters field must be omitted.¶
7.2.2. id-tc26-signwithdigest-gost3410-12-512
The optional parameters field must be omitted.¶
8. Security Considerations
The security considerations of [RFC7296] and [RFC7427] apply.¶
The security of GOST elliptic curves is discussed in [GOST-EC-SECURITY]. The security
of the "Streebog" hash functions is discussed in [STREEBOG
9. IANA Considerations
IANA has assigned one Transform ID in the "Transform Type 2 - Pseudorandom Function Transform IDs" registry:¶
IANA has assigned two Transform IDs in the "Transform Type 4 - Key Exchange Method Transform IDs" registry:¶
IANA has assigned two values in the "IKEv2 Hash Algorithms" registry:¶
10. References
10.1. Normative References
- [RFC2119]
-
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10
.17487 , , <https:///RFC2119 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 , , <https:///RFC8174 www >..rfc -editor .org /info /rfc8174 - [RFC6986]
-
Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.11-2012: Hash Function", RFC 6986, DOI 10
.17487 , , <https:///RFC6986 www >..rfc -editor .org /info /rfc6986 - [RFC7091]
-
Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.10-2012: Digital Signature Algorithm", RFC 7091, DOI 10
.17487 , , <https:///RFC7091 www >..rfc -editor .org /info /rfc7091 - [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 , , <https:///RFC7296 www >..rfc -editor .org /info /rfc7296 - [RFC7427]
-
Kivinen, T. and J. Snyder, "Signature Authentication in the Internet Key Exchange Version 2 (IKEv2)", RFC 7427, DOI 10
.17487 , , <https:///RFC7427 www >..rfc -editor .org /info /rfc7427 - [RFC7836]
-
Smyshlyaev, S., Ed., Alekseev, E., Oshkin, I., Popov, V., Leontiev, S., Podobaev, V., and D. Belyavsky, "Guidelines on the Cryptographic Algorithms to Accompany the Usage of Standards GOST R 34.10-2012 and GOST R 34.11-2012", RFC 7836, DOI 10
.17487 , , <https:///RFC7836 www >..rfc -editor .org /info /rfc7836 - [RFC9215]
-
Baryshkov, D., Ed., Nikolaev, V., and A. Chelpanov, "Using GOST R 34.10-2012 and GOST R 34.11-2012 Algorithms with the Internet X.509 Public Key Infrastructure", RFC 9215, DOI 10
.17487 , , <https:///RFC9215 www >..rfc -editor .org /info /rfc9215 - [RFC9227]
-
Smyslov, V., "Using GOST Ciphers in the Encapsulating Security Payload (ESP) and Internet Key Exchange Version 2 (IKEv2) Protocols", RFC 9227, DOI 10
.17487 , , <https:///RFC9227 www >..rfc -editor .org /info /rfc9227
10.2. Informative References
- [RFC2104]
-
Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, DOI 10
.17487 , , <https:///RFC2104 www >..rfc -editor .org /info /rfc2104 - [RFC7619]
-
Smyslov, V. and P. Wouters, "The NULL Authentication Method in the Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 7619, DOI 10
.17487 , , <https:///RFC7619 www >..rfc -editor .org /info /rfc7619 - [RFC7801]
-
Dolmatov, V., Ed., "GOST R 34.12-2015: Block Cipher "Kuznyechik"", RFC 7801, DOI 10
.17487 , , <https:///RFC7801 www >..rfc -editor .org /info /rfc7801 - [RFC8891]
-
Dolmatov, V., Ed. and D. Baryshkov, "GOST R 34.12-2015: Block Cipher "Magma"", RFC 8891, DOI 10
.17487 , , <https:///RFC8891 www >..rfc -editor .org /info /rfc8891 - [GOST3410-2012]
- Federal Agency on Technical Regulating and Metrology, "Information technology. Cryptographic data security. Signature and verification processes of [electronic] digital signature", GOST R 34.10-2012, . (In Russian)
- [GOST3411-2012]
- Federal Agency on Technical Regulating and Metrology, "Information technology. Cryptographic data security. Hashing function", GOST R 34.11-2012, . (In Russian)
- [GOST3412-2015]
- Federal Agency on Technical Regulating and Metrology, "Information technology. Cryptographic data security. Block ciphers", GOST R 34.12-2015, . (In Russian)
- [GOST-IKEv2]
- Standardisation Technical Committee "Cryptographic information protection", "Information technology. Cryptographic data security. Using Russian cryptographic algorithms in the Internet Key Exchange protocol version 2 (IKEv2)", MR 26.2.001-22, . (In Russian)
- [GOST
-IKEv2 -TESTVECTORS] - Standardisation Technical Committee "Cryptographic information protection", "Information technology. Cryptographic data security. The test vectors for the use of Russian cryptographic algorithms in the IKEv2 key exchange protocol", MR 26.2.002-22, . (In Russian)
- [USING
-GOST -IN -CERTS] -
Federal Agency on Technical Regulating and Metrology, "Information technology. Cryptographic data security. Usage of GOST R 34.10-2012 and GOST R 34.11-2012 algorithms in certificate, CRL and PKCS#10 certificate request in X.509 public key infrastructure", R 1323565
.1 , . (In Russian).023 -2018 - [GOST
-EC -SECURITY] -
Alekseev, E., Nikolaev, V., and S. Smyshlyaev, "On the security properties of Russian standardized elliptic curves", DOI 10.4213/mvk260, , <https://
doi >..org /10 .4213 /mvk260 - [STREEBOG
-SECURITY] -
Wang, Z., Yu, H., and X. Wang, "Cryptanalysis of GOST R hash function", DOI 10
.1016 , , <https:///j .ipl .2014 .07 .007 doi >..org /10 .1016 /j .ipl .2014 .07 .007 - [STREEBOG
-PREIMAGE] -
Guo, J., Jean, J., Leurent, G., Peyrin, T., and L. Wang, "The Usage of Counter Revisited: Second-Preimage Attack on New Russian Standardized Hash Function", Cryptology ePrint Archive, Paper 2014/675, , <https://
eprint >..iacr .org /2014 /675
Appendix A. Test Vectors
This appendix contains test vectors for two scenarios. The test vectors were borrowed from [GOST
The test vectors also cover IKE message protection for transforms defined in [RFC9227].
The keys SK_ei and SK_er are transform keys (see Section 4.4 of [RFC9227]),
and the keys K1i, K2i, K3i, K1r, K2r, and K3r represent nodes in the key tree for the initiator and responder correspondently
All other keys and entities used in the test vectors are defined in [RFC7296].¶
A.1. Scenario 1
In this scenario, peers establish, rekey, and delete an IKE SA and ESP SAs using the following prerequisites:¶
The 256-bit PSK used for authentication:¶
This scenario includes four sub-scenarios, which are described below.¶
A.1.1. Sub-Scenario 1: Establishment of IKE and ESP SAs Using the IKE_SA_INIT and the IKE_AUTH Exchanges
Initiator's actions:¶
- (1)
-
Generates random SPIi for IKE SA¶
- (2)
-
Generates random IKE nonce Ni¶
- (3)
-
Generates ephemeral private key¶
- (4)
-
Computes public key¶
- (5)
-
Creates message¶
- (6)
-
Sends message, peer receives message¶
Responder's actions:¶
- (7)
-
Parses received message¶
- (8)
-
Generates random SPIr for IKE SA¶
- (9)
-
Generates random IKE nonce Nr¶
- (10)
-
Generates ephemeral private key¶
- (11)
-
Computes public key¶
- (12)
-
Creates message¶
- (13)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (14)
-
Parses received message¶
- (15)
-
Computes shared key¶
- (16)
-
Computes SKEYSEED¶
- (17)
-
Computes SK_d¶
- (18)
-
Computes SK_ei¶
- (19)
-
Computes SK_er¶
- (20)
-
Computes SK_pi¶
- (21)
-
Computes SK_pr¶
- (22)
-
Computes prf(SK_pi, IDi)¶
- (23)
-
Uses PSK¶
- (24)
-
Computes prf(PSK,"Key Pad for IKEv2")¶
- (25)
-
Computes content of AUTH payload¶
- (26)
-
Computes K1i (i1 = 0)¶
- (27)
-
Computes K2i (i2 = 0)¶
- (28)
-
Computes K3i (i3 = 0)¶
- (29)
-
Selects SPI for incoming ESP SA¶
- (30)
-
Creates message¶
- (31)
-
Composes MGM nonce¶
- (32)
-
Composes AAD¶
- (33)
-
Composes plaintext¶
- (34)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (35)
-
Computes ICV using K3i as K_msg¶
- (36)
-
Composes IV¶
- (37)
-
Sends message, peer receives message¶
Responder's actions:¶
- (38)
-
Computes shared key¶
- (39)
-
Computes SKEYSEED¶
- (40)
-
Computes SK_d¶
- (41)
-
Computes SK_ei¶
- (42)
-
Computes SK_er¶
- (43)
-
Computes SK_pi¶
- (44)
-
Computes SK_pr¶
- (45)
-
Extracts IV from message¶
- (46)
-
Computes K1i (i1 = 0)¶
- (47)
-
Computes K2i (i2 = 0)¶
- (48)
-
Computes K3i (i3 = 0)¶
- (49)
-
Composes MGM nonce¶
- (50)
-
Extracts ICV from message¶
- (51)
-
Extracts AAD from message¶
- (52)
-
Extracts ciphertext from message¶
- (53)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (54)
-
Parses received message¶
- (55)
-
Computes prf(SK_pi, IDi)¶
- (56)
-
Uses PSK¶
- (57)
-
Computes prf(PSK,"Key Pad for IKEv2")¶
- (58)
-
Computes content of AUTH payload and compares it with the received one¶
- (59)
-
Computes keys for ESP SAs¶
- (60)
-
Computes prf(SK_pr,IDr)¶
- (61)
-
Uses PSK¶
- (62)
-
Computes prf(PSK,"Key Pad for IKEv2")¶
- (63)
-
Computes content of AUTH payload¶
- (64)
-
Computes K1r (i1 = 0)¶
- (65)
-
Computes K2r (i2 = 0)¶
- (66)
-
Computes K3r (i3 = 0)¶
- (67)
-
Selects SPI for incoming ESP SA¶
- (68)
-
Creates message¶
- (69)
-
Composes MGM nonce¶
- (70)
-
Composes AAD¶
- (71)
-
Composes plaintext¶
- (72)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (73)
-
Computes ICV using K3r as K_msg¶
- (74)
-
Composes IV¶
- (75)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (76)
-
Extracts IV from message¶
- (77)
-
Computes K1r (i1 = 0)¶
- (78)
-
Computes K2r (i2 = 0)¶
- (79)
-
Computes K3r (i3 = 0)¶
- (80)
-
Composes MGM nonce¶
- (81)
-
Extracts ICV from message¶
- (82)
-
Extracts AAD from message¶
- (83)
-
Extracts ciphertext from message¶
- (84)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (85)
-
Parses received message¶
- (86)
-
Computes prf(SK_pr, IDr)¶
- (87)
-
Uses PSK¶
- (88)
-
Computes prf(PSK,"Key Pad for IKEv2")¶
- (89)
-
Computes content of AUTH payload and compares it with the received one¶
- (90)
-
Computes keys for ESP SAs¶
A.1.2. Sub-Scenario 2: IKE SA Rekeying Using the CREATE_CHILD_SA Exchange
Initiator's actions:¶
- (1)
-
Generates random SPIi for new IKE SA¶
- (2)
-
Generates random IKE nonce Ni¶
- (3)
-
Generates ephemeral private key¶
- (4)
-
Computes public key¶
- (5)
-
Creates message¶
- (6)
-
Uses previously computed key K3i¶
- (7)
-
Composes MGM nonce¶
- (8)
-
Composes AAD¶
- (9)
-
Composes plaintext¶
- (10)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (11)
-
Computes ICV using K3i as K_msg¶
- (12)
-
Composes IV¶
- (13)
-
Sends message, peer receives message¶
Responder's actions:¶
- (14)
-
Extracts IV from message¶
- (15)
-
Uses previously computed key K3i¶
- (16)
-
Composes MGM nonce¶
- (17)
-
Extracts ICV from message¶
- (18)
-
Extracts AAD from message¶
- (19)
-
Extracts ciphertext from message¶
- (20)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (21)
-
Parses received message¶
- (22)
-
Generates random SPIr for new IKE SA¶
- (23)
-
Generates random IKE nonce Nr¶
- (24)
-
Generates ephemeral private key¶
- (25)
-
Computes public key¶
- (26)
-
Computes shared key¶
- (27)
-
Computes SKEYSEED for new SA¶
- (28)
-
Computes SK_d for new SA¶
- (29)
-
Computes SK_ei for new SA¶
- (30)
-
Computes SK_er for new SA¶
- (31)
-
Creates message¶
- (32)
-
Uses previously computed key K3r¶
- (33)
-
Composes MGM nonce¶
- (34)
-
Composes AAD¶
- (35)
-
Composes plaintext¶
- (36)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (37)
-
Computes ICV using K3r as K_msg¶
- (38)
-
Composes IV¶
- (39)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (40)
-
Extracts IV from message¶
- (41)
-
Uses previously computed key K3r¶
- (42)
-
Composes MGM nonce¶
- (43)
-
Extracts ICV from message¶
- (44)
-
Extracts AAD from message¶
- (45)
-
Extracts ciphertext from message¶
- (46)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (47)
-
Parses received message¶
- (48)
-
Computes shared key¶
- (49)
-
Computes SKEYSEED for new SA¶
- (50)
-
Computes SK_d for new SA¶
- (51)
-
Computes SK_ei for new SA¶
- (52)
-
Computes SK_er for new SA¶
A.1.3. Sub-Scenario 3: ESP SAs Rekeying with PFS Using the CREATE_CHILD_SA Exchange
Initiator's actions:¶
- (1)
-
Generates random IKE nonce Ni¶
- (2)
-
Generates ephemeral private key¶
- (3)
-
Computes public key¶
- (4)
-
Selects SPI for new incoming ESP SA¶
- (5)
-
Creates message¶
- (6)
-
Computes K1i (i1 = 0)¶
- (7)
-
Computes K2i (i2 = 0)¶
- (8)
-
Computes K3i (i3 = 0)¶
- (9)
-
Composes MGM nonce¶
- (10)
-
Composes AAD¶
- (11)
-
Composes plaintext¶
- (12)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (13)
-
Computes ICV using K3i as K_msg¶
- (14)
-
Composes IV¶
- (15)
-
Sends message, peer receives message¶
Responder's actions:¶
- (16)
-
Extracts IV from message¶
- (17)
-
Computes K1i (i1 = 0)¶
- (18)
-
Computes K2i (i2 = 0)¶
- (19)
-
Computes K3i (i3 = 0)¶
- (20)
-
Composes MGM nonce¶
- (21)
-
Extracts ICV from message¶
- (22)
-
Extracts AAD from message¶
- (23)
-
Extracts ciphertext from message¶
- (24)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (25)
-
Parses received message¶
- (26)
-
Generates random IKE nonce Nr¶
- (27)
-
Generates ephemeral private key¶
- (28)
-
Computes public key¶
- (29)
-
Selects SPI for new incoming ESP SA¶
- (30)
-
Computes keys for new ESP SAs¶
- (31)
-
Creates message¶
- (32)
-
Computes K1r (i1 = 0)¶
- (33)
-
Computes K2r (i2 = 0)¶
- (34)
-
Computes K3r (i3 = 0)¶
- (35)
-
Composes MGM nonce¶
- (36)
-
Composes AAD¶
- (37)
-
Composes plaintext¶
- (38)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (39)
-
Computes ICV using K3r as K_msg¶
- (40)
-
Composes IV¶
- (41)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (42)
-
Extracts IV from message¶
- (43)
-
Computes K1r (i1 = 0)¶
- (44)
-
Computes K2r (i2 = 0)¶
- (45)
-
Computes K3r (i3 = 0)¶
- (46)
-
Composes MGM nonce¶
- (47)
-
Extracts ICV from message¶
- (48)
-
Extracts AAD from message¶
- (49)
-
Extracts ciphertext from message¶
- (50)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (51)
-
Parses received message¶
- (52)
-
Computes keys for new ESP SAs¶
A.1.4. Sub-Scenario 4: IKE SA Deletion Using the INFORMATIONAL Exchange
Initiator's actions:¶
- (1)
-
Creates message¶
- (2)
-
Uses previously computed key K3i¶
- (3)
-
Composes MGM nonce¶
- (4)
-
Composes AAD¶
- (5)
-
Composes plaintext¶
- (6)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (7)
-
Computes ICV using K3i as K_msg¶
- (8)
-
Composes IV¶
- (9)
-
Sends message, peer receives message¶
Responder's actions:¶
- (10)
-
Extracts IV from message¶
- (11)
-
Uses previously computed key K3i¶
- (12)
-
Composes MGM nonce¶
- (13)
-
Extracts ICV from message¶
- (14)
-
Extracts AAD from message¶
- (15)
-
Extracts ciphertext from message¶
- (16)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (17)
-
Parses received message¶
- (18)
-
Creates message¶
- (19)
-
Uses previously computed key K3r¶
- (20)
-
Composes MGM nonce¶
- (21)
-
Composes AAD¶
- (22)
-
Composes plaintext¶
- (23)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (24)
-
Computes ICV using K3r as K_msg¶
- (25)
-
Composes IV¶
- (26)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (27)
-
Extracts IV from message¶
- (28)
-
Uses previously computed key K3r¶
- (29)
-
Composes MGM nonce¶
- (30)
-
Extracts ICV from message¶
- (31)
-
Extracts AAD from message¶
- (32)
-
Extracts ciphertext from message¶
- (33)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (34)
-
Parses received message¶
A.2. Scenario 2
In this scenario, peers establish, rekey, and delete an IKE SA and ESP SAs using the following prerequisites:¶
The certificates for this scenario were obtained from the public testing CA service
<https://
The initiator's certificate private key (little endian):¶
The initiator's certificate:¶
The responder's certificate private key (little endian):¶
The responder's certificate:¶
CA certificate:¶
This scenario includes four sub-scenarios, which are described below.¶
A.2.1. Sub-Scenario 1: Establishment of IKE and ESP SAs Using the IKE_SA_INIT and the IKE_AUTH Exchanges
Initiator's actions:¶
- (1)
-
Generates random SPIi for IKE SA¶
- (2)
-
Generates random IKE nonce Ni¶
- (3)
-
Generates ephemeral private key (512 bit)¶
- (4)
-
Computes public key¶
- (5)
-
Creates message¶
- (6)
-
Sends message, peer receives message¶
Responder's actions:¶
Initiator's actions:¶
- (10)
-
Parses received message¶
- (11)
-
Generates ephemeral private key (256 bit)¶
- (12)
-
Computes public key¶
- (13)
-
Creates message¶
- (14)
-
Sends message, peer receives message¶
Responder's actions:¶
- (15)
-
Parses received message¶
- (16)
-
Generates random SPIr for IKE SA¶
- (17)
-
Generates random IKE nonce Nr¶
- (18)
-
Generates ephemeral private key¶
- (19)
-
Computes public key¶
- (20)
-
Computes hash of CA public key¶
- (21)
-
Creates message¶
- (22)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (23)
-
Parses received message¶
- (24)
-
Computes shared key¶
- (25)
-
Computes SKEYSEED¶
- (26)
-
Computes SK_d¶
- (27)
-
Computes SK_ei¶
- (28)
-
Computes SK_er¶
- (29)
-
Computes SK_pi¶
- (30)
-
Computes SK_pr¶
- (31)
-
Computes prf(SK_pi, IDi)¶
- (32)
-
Uses private key for signing (little endian)¶
- (33)
-
Uses random number for signing¶
- (34)
-
Computes signature using algorithm id
-tc26 -signwithdigest -gost3410 -12 -512¶ - (35)
-
Computes K1i (i1 = 0)¶
- (36)
-
Computes K2i (i2 = 0)¶
- (37)
-
Computes K3i (i3 = 0)¶
- (38)
-
Selects SPI for incoming ESP SA¶
- (39)
-
Computes hash of CA public key¶
- (40)
-
Creates message splitting it into 4 fragments¶
- (41)
-
Composes MGM nonce (fragment 1)¶
- (42)
-
Composes AAD (fragment 1)¶
- (43)
-
Composes plaintext (fragment 1)¶
- (44)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext (fragment 1)¶
- (45)
-
Computes ICV using K3i as K_msg (fragment 1)¶
- (46)
-
Composes IV (fragment 1)¶
- (47)
-
Composes MGM nonce (fragment 2)¶
- (48)
-
Composes AAD (fragment 2)¶
- (49)
-
Composes plaintext (fragment 2)¶
- (50)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext (fragment 2)¶
- (51)
-
Computes ICV using K3i as K_msg (fragment 2)¶
- (52)
-
Composes IV (fragment 2)¶
- (53)
-
Composes MGM nonce (fragment 3)¶
- (54)
-
Composes AAD (fragment 3)¶
- (55)
-
Composes plaintext (fragment 3)¶
- (56)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext (fragment 3)¶
- (57)
-
Computes ICV using K3i as K_msg (fragment 3)¶
- (58)
-
Composes IV (fragment 3)¶
- (59)
-
Composes MGM nonce (fragment 4)¶
- (60)
-
Composes AAD (fragment 4)¶
- (61)
-
Composes plaintext (fragment 4)¶
- (62)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext (fragment 4)¶
- (63)
-
Computes ICV using K3i as K_msg (fragment 4)¶
- (64)
-
Composes IV (fragment 4)¶
- (65)
-
Sends message fragment (1), peer receives message fragment (1)¶
- (66)
-
Sends message fragment (2), peer receives message fragment (2)¶
- (67)
-
Sends message fragment (3), peer receives message fragment (3)¶
- (68)
-
Sends message fragment (4), peer receives message fragment (4)¶
Responder's actions:¶
- (69)
-
Computes shared key¶
- (70)
-
Computes SKEYSEED¶
- (71)
-
Computes SK_d¶
- (72)
-
Computes SK_ei¶
- (73)
-
Computes SK_er¶
- (74)
-
Computes SK_pi¶
- (75)
-
Computes SK_pr¶
- (76)
-
Extracts IV from message (fragment 1)¶
- (77)
-
Computes K1i (i1 = 0)¶
- (78)
-
Computes K2i (i2 = 0)¶
- (79)
-
Computes K3i (i3 = 0)¶
- (80)
-
Composes MGM nonce (fragment 1)¶
- (81)
-
Extracts ICV from message (fragment 1)¶
- (82)
-
Extracts AAD from message (fragment 1)¶
- (83)
-
Extracts ciphertext from message (fragment 1)¶
- (84)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext (fragment 1)¶
- (85)
-
Extracts IV from message (fragment 2)¶
- (86)
-
Uses previously computed key K3i¶
- (87)
-
Composes MGM nonce (fragment 2)¶
- (88)
-
Extracts ICV from message (fragment 2)¶
- (89)
-
Extracts AAD from message (fragment 2)¶
- (90)
-
Extracts ciphertext from message (fragment 2)¶
- (91)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext (fragment 2)¶
- (92)
-
Extracts IV from message (fragment 3)¶
- (93)
-
Uses previously computed key K3i¶
- (94)
-
Composes MGM nonce (fragment 3)¶
- (95)
-
Extracts ICV from message (fragment 3)¶
- (96)
-
Extracts AAD from message (fragment 3)¶
- (97)
-
Extracts ciphertext from message (fragment 3)¶
- (98)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext (fragment 3)¶
- (99)
-
Extracts IV from message (fragment 4)¶
- (100)
-
Uses previously computed key K3i¶
- (101)
-
Composes MGM nonce (fragment 4)¶
- (102)
-
Extracts ICV from message (fragment 4)¶
- (103)
-
Extracts AAD from message (fragment 4)¶
- (104)
-
Extracts ciphertext from message (fragment 4)¶
- (105)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext (fragment 4)¶
- (106)
-
Reassembles message from received fragments and parses it¶
- (107)
-
Computes prf(SK_pi, IDi)¶
- (108)
-
Uses initiator's public key¶
- (109)
-
Verifies signature from AUTH payload using algorithm id
-tc26 -signwithdigest -gost3410 -12 -512¶ - (110)
-
Computes keys for ESP SAs¶
- (111)
-
Computes prf(SK_pr,IDr)¶
- (112)
-
Uses private key for signing (little endian)¶
- (113)
-
Uses random number for signing¶
- (114)
-
Computes signature using algorithm id
-tc26 -signwithdigest -gost3410 -12 -256¶ - (115)
-
Computes K1r (i1 = 0)¶
- (116)
-
Computes K2r (i2 = 0)¶
- (117)
-
Computes K3r (i3 = 0)¶
- (118)
-
Selects SPI for incoming ESP SA¶
- (119)
-
Creates message splitting it into 4 fragments¶
- (120)
-
Composes MGM nonce (fragment 1)¶
- (121)
-
Composes AAD (fragment 1)¶
- (122)
-
Composes plaintext (fragment 1)¶
- (123)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext (fragment 1)¶
- (124)
-
Computes ICV using K3r as K_msg (fragment 1)¶
- (125)
-
Composes IV (fragment 1)¶
- (126)
-
Composes MGM nonce (fragment 2)¶
- (127)
-
Composes AAD (fragment 2)¶
- (128)
-
Composes plaintext (fragment 2)¶
- (129)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext (fragment 2)¶
- (130)
-
Computes ICV using K3r as K_msg (fragment 2)¶
- (131)
-
Composes IV (fragment 2)¶
- (132)
-
Composes MGM nonce (fragment 3)¶
- (133)
-
Composes AAD (fragment 3)¶
- (134)
-
Composes plaintext (fragment 3)¶
- (135)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext (fragment 3)¶
- (136)
-
Computes ICV using K3r as K_msg (fragment 3)¶
- (137)
-
Composes IV (fragment 3)¶
- (138)
-
Composes MGM nonce (fragment 4)¶
- (139)
-
Composes AAD (fragment 4)¶
- (140)
-
Composes plaintext (fragment 4)¶
- (141)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext (fragment 4)¶
- (142)
-
Computes ICV using K3r as K_msg (fragment 4)¶
- (143)
-
Composes IV (fragment 4)¶
- (144)
-
Sends message fragment (1), peer receives message fragment (1)¶
- (145)
-
Sends message fragment (2), peer receives message fragment (2)¶
- (146)
-
Sends message fragment (3), peer receives message fragment (3)¶
- (147)
-
Sends message fragment (4), peer receives message fragment (4)¶
Initiator's actions:¶
- (148)
-
Extracts IV from message (fragment 1)¶
- (149)
-
Computes K1r (i1 = 0)¶
- (150)
-
Computes K2r (i2 = 0)¶
- (151)
-
Computes K3r (i3 = 0)¶
- (152)
-
Composes MGM nonce (fragment 1)¶
- (153)
-
Extracts ICV from message (fragment 1)¶
- (154)
-
Extracts AAD from message (fragment 1)¶
- (155)
-
Extracts ciphertext from message (fragment 1)¶
- (156)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext (fragment 1)¶
- (157)
-
Extracts IV from message (fragment 2)¶
- (158)
-
Uses previously computed key K3r¶
- (159)
-
Composes MGM nonce (fragment 2)¶
- (160)
-
Extracts ICV from message (fragment 2)¶
- (161)
-
Extracts AAD from message (fragment 2)¶
- (162)
-
Extracts ciphertext from message (fragment 2)¶
- (163)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext (fragment 2)¶
- (164)
-
Extracts IV from message (fragment 3)¶
- (165)
-
Uses previously computed key K3r¶
- (166)
-
Composes MGM nonce (fragment 3)¶
- (167)
-
Extracts ICV from message (fragment 3)¶
- (168)
-
Extracts AAD from message (fragment 3)¶
- (169)
-
Extracts ciphertext from message (fragment 3)¶
- (170)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext (fragment 3)¶
- (171)
-
Extracts IV from message (fragment 4)¶
- (172)
-
Uses previously computed key K3r¶
- (173)
-
Composes MGM nonce (fragment 4)¶
- (174)
-
Extracts ICV from message (fragment 4)¶
- (175)
-
Extracts AAD from message (fragment 4)¶
- (176)
-
Extracts ciphertext from message (fragment 4)¶
- (177)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext (fragment 4)¶
- (178)
-
Reassembles message from received fragments and parses it¶
- (179)
-
Computes prf(SK_pr, IDr)¶
- (180)
-
Uses responder's public key¶
- (181)
-
Verifies signature from AUTH payload using algorithm id
-tc26 -signwithdigest -gost3410 -12 -256¶ - (182)
-
Computes keys for ESP SAs¶
A.2.2. Sub-Scenario 2: IKE SA Rekeying Using the CREATE_CHILD_SA Exchange
Initiator's actions:¶
- (1)
-
Generates random SPIi for new IKE SA¶
- (2)
-
Generates random IKE nonce Ni¶
- (3)
-
Generates ephemeral private key¶
- (4)
-
Computes public key¶
- (5)
-
Creates message¶
- (6)
-
Computes K3i (i3 = 1)¶
- (7)
-
Composes MGM nonce¶
- (8)
-
Composes AAD¶
- (9)
-
Composes plaintext¶
- (10)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (11)
-
Computes ICV using K3i as K_msg¶
- (12)
-
Composes IV¶
- (13)
-
Sends message, peer receives message¶
Responder's actions:¶
- (14)
-
Extracts IV from message¶
- (15)
-
Computes K3i (I = 1)¶
- (16)
-
Composes MGM nonce¶
- (17)
-
Extracts ICV from message¶
- (18)
-
Extracts AAD from message¶
- (19)
-
Extracts ciphertext from message¶
- (20)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (21)
-
Parses received message¶
- (22)
-
Generates random SPIr for new IKE SA¶
- (23)
-
Generates random IKE nonce Nr¶
- (24)
-
Generates ephemeral private key¶
- (25)
-
Computes public key¶
- (26)
-
Computes shared key¶
- (27)
-
Computes SKEYSEED for new SA¶
- (28)
-
Computes SK_d for new SA¶
- (29)
-
Computes SK_ei for new SA¶
- (30)
-
Computes SK_er for new SA¶
- (31)
-
Creates message¶
- (32)
-
Computes K3r (i3 = 1)¶
- (33)
-
Composes MGM nonce¶
- (34)
-
Composes AAD¶
- (35)
-
Composes plaintext¶
- (36)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (37)
-
Computes ICV using K3r as K_msg¶
- (38)
-
Composes IV¶
- (39)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (40)
-
Extracts IV from message¶
- (41)
-
Computes K3r (i3 = 1)¶
- (42)
-
Composes MGM nonce¶
- (43)
-
Extracts ICV from message¶
- (44)
-
Extracts AAD from message¶
- (45)
-
Extracts ciphertext from message¶
- (46)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (47)
-
Parses received message¶
- (48)
-
Computes shared key¶
- (49)
-
Computes SKEYSEED for new SA¶
- (50)
-
Computes SK_d for new SA¶
- (51)
-
Computes SK_ei for new SA¶
- (52)
-
Computes SK_er for new SA¶
A.2.3. Sub-Scenario 3: ESP SAs Rekeying without PFS Using the CREATE_CHILD_SA Exchange
Initiator's actions:¶
- (1)
-
Generates random IKE nonce Ni¶
- (2)
-
Computes K1i (i1 = 0)¶
- (3)
-
Computes K2i (i2 = 0)¶
- (4)
-
Computes K3i (i3 = 0)¶
- (5)
-
Selects SPI for new incoming ESP SA¶
- (6)
-
Creates message¶
- (7)
-
Composes MGM nonce¶
- (8)
-
Composes AAD¶
- (9)
-
Composes plaintext¶
- (10)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (11)
-
Computes ICV using K3i as K_msg¶
- (12)
-
Composes IV¶
- (13)
-
Sends message, peer receives message¶
Responder's actions:¶
- (14)
-
Extracts IV from message¶
- (15)
-
Computes K1i (i1 = 0)¶
- (16)
-
Computes K2i (i2 = 0)¶
- (17)
-
Computes K3i (i3 = 0)¶
- (18)
-
Composes MGM nonce¶
- (19)
-
Extracts ICV from message¶
- (20)
-
Extracts AAD from message¶
- (21)
-
Extracts ciphertext from message¶
- (22)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (23)
-
Parses received message¶
- (24)
-
Generates random IKE nonce Nr¶
- (25)
-
Selects SPI for new incoming ESP SA¶
- (26)
-
Computes keys for new ESP SAs¶
- (27)
-
Creates message¶
- (28)
-
Computes K1r (i1 = 0)¶
- (29)
-
Computes K2r (i2 = 0)¶
- (30)
-
Computes K3r (i3 = 0)¶
- (31)
-
Composes MGM nonce¶
- (32)
-
Composes AAD¶
- (33)
-
Composes plaintext¶
- (34)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (35)
-
Computes ICV using K3r as K_msg¶
- (36)
-
Composes IV¶
- (37)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (38)
-
Extracts IV from message¶
- (39)
-
Computes K1r (i1 = 0)¶
- (40)
-
Computes K2r (i2 = 0)¶
- (41)
-
Computes K3r (i3 = 0)¶
- (42)
-
Composes MGM nonce¶
- (43)
-
Extracts ICV from message¶
- (44)
-
Extracts AAD from message¶
- (45)
-
Extracts ciphertext from message¶
- (46)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (47)
-
Parses received message¶
- (48)
-
Computes keys for new ESP SAs¶
A.2.4. Sub-Scenario 4: IKE SA Deletion Using the INFORMATIONAL Exchange
Initiator's actions:¶
- (1)
-
Creates message¶
- (2)
-
Uses previously computed key K3i¶
- (3)
-
Composes MGM nonce¶
- (4)
-
Composes AAD¶
- (5)
-
Composes plaintext¶
- (6)
-
Encrypts plaintext using K3i as K_msg, resulting in ciphertext¶
- (7)
-
Computes ICV using K3i as K_msg¶
- (8)
-
Composes IV¶
- (9)
-
Sends message, peer receives message¶
Responder's actions:¶
- (10)
-
Extracts IV from message¶
- (11)
-
Uses previously computed key K3i¶
- (12)
-
Composes MGM nonce¶
- (13)
-
Extracts ICV from message¶
- (14)
-
Extracts AAD from message¶
- (15)
-
Extracts ciphertext from message¶
- (16)
-
Decrypts ciphertext and verifies ICV using K3i as K_msg, resulting in plaintext¶
- (17)
-
Parses received message¶
- (18)
-
Creates message¶
- (19)
-
Uses previously computed key K3r¶
- (20)
-
Composes MGM nonce¶
- (21)
-
Composes AAD¶
- (22)
-
Composes plaintext¶
- (23)
-
Encrypts plaintext using K3r as K_msg, resulting in ciphertext¶
- (24)
-
Computes ICV using K3r as K_msg¶
- (25)
-
Composes IV¶
- (26)
-
Sends message, peer receives message¶
Initiator's actions:¶
- (27)
-
Extracts IV from message¶
- (28)
-
Uses previously computed key K3r¶
- (29)
-
Composes MGM nonce¶
- (30)
-
Extracts ICV from message¶
- (31)
-
Extracts AAD from message¶
- (32)
-
Extracts ciphertext from message¶
- (33)
-
Decrypts ciphertext and verifies ICV using K3r as K_msg, resulting in plaintext¶
- (34)
-
Parses received message¶