-
Notifications
You must be signed in to change notification settings - Fork 3
/
draft-tjhai-ipsecme-hybrid-qske-ikev2-00.nroff
1249 lines (1076 loc) · 51.6 KB
/
draft-tjhai-ipsecme-hybrid-qske-ikev2-00.nroff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.po 0
.ll 7.2i
.lt 7.2i
.nr LL 7.2i
.nr LT 7.2i
.ds LF Tjhai et al.
.ds RF FORMFEED[Page %]
.ds LH Internet-Draft
.ds RH July 18, 2017
.ds CH Hybrid QSKE for IKEv2
.ds CF Expires January 19, 2018
.hy 0
.nh
.ad l
.in 0
.nf
.tl 'Internet Engineering Task Force''C. Tjhai'
.tl 'Internet-Draft''M. Tomlinson'
.tl 'Intended Status: Informational''A. Cheng'
.tl 'Expires: January 19, 2018''Post-Quantum'
.tl '''G. Bartlett'
.tl '''Cisco Systems'
.tl '''July 18, 2017'
.fi
.\" Note. The ".tl" directive is used to generate the leading header
.\" in Internet drafts. The information specified after ".tl" provides
.\" left, center and right components of a line separated by the ' character
.\" in the following manner:
.\"
.\" .tl '<left component>'<center component>'<right component>'
.\"
.\" Only the left and right components are used in Internet-draft headers
.\" This and other comments in this template can safely be deleted.
.ce 2
Hybrid Quantum-Safe Key Exchange for Internet
Key Exchange Protocol Version 2 (IKEv2)
.fi
.ce
draft-tjhai-ipsecme-hybrid-qske-ikev2-00
.fi
.in 3
.ti 0
Abstract
This document describes the optional key-exchange payload of Internet Key
Exchange Protocol Version 2 (IKEv2) that carries quantum-safe key exchange
data. This optional payload is used in conjunction with the existing
Diffie-Hellman key exchange to establish a quantum-safe shared secret
between an initiator and a responder. The optional payload supports a
number of quantum-safe key exchange schemes.
.ti 0
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 http://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 December 21, 2017.
.ti 0
Copyright Notice
Copyright (c) 2017 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 (http://trustee.ietf.org/license-info) in effect
on the date of publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect to
this document. Code Components extracted from this document must include
Simplified BSD License text as described in Section 4.e of the Trust Legal
Provisions and are provided without warranty as described in the Simplified
BSD License.
.ti 0
.\" \# TD4 -- Set TOC depth by altering this value (TD5 = depth 5)
.\" \# TOC -- Beginning of auto updated Table of Contents
.in 0
Table of Contents
.nf
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Problem Description . . . . . . . . . . . . . . . . . . . 2
1.2. Proposed Extension . . . . . . . . . . . . . . . . . . . . 3
1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
2. Hybrid Quantum-Safe Key Exchange . . . . . . . . . . . . . . . 4
2.1. Quantum-Safe Group Transform Type . . . . . . . . . . . . 4
2.2. IKE_SA_INIT Exchange . . . . . . . . . . . . . . . . . . . 5
2.3. CREATE_CHILD_SA Exchange . . . . . . . . . . . . . . . . . 6
2.3.1. New Child SAs from the CREATE_CHILD_SA Exchange . . . 7
2.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA Exchange . . 8
2.3.3. Rekeying Child SAs with the CREATE_CHILD_SA Exchange . 8
2.4. QSKE Payload Format . . . . . . . . . . . . . . . . . . . 9
3. Design Rationale . . . . . . . . . . . . . . . . . . . . . . . 10
3.1. Threat Categories . . . . . . . . . . . . . . . . . . . . 10
3.2. Dealing with Fragmentation . . . . . . . . . . . . . . . . 11
3.3. Removal of the Diffie-Hellman exchange . . . . . . . . . . 12
4. Security Considerations . . . . . . . . . . . . . . . . . . . 12
5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
6. References . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Appendix A. Quantum-safe Ciphers . . . . . . . . . . . . . . . . 16
Appendix A.1. Ring Learning With Errors . . . . . . . . . . . . . 16
Appendix A.2. NTRU Lattices . . . . . . . . . . . . . . . . . . . 21
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 22
.fi
.in 3
.\" \# ETC -- End of auto updated Table of Contents
.ti 0
1. Introduction
.ti 0
1.1. Problem Description
.fi
Internet Key Exchange Protocol (IKEv2) as specified in RFC 7296 [RFC7296]
uses the Diffie-Hellman algorithm [DH] to establish a shared secret between
an initiator and a responder. The security of the Diffie-Hellman algorithm
relies on the difficulty to solve a discrete logarithm problem when the
order of the group parameter is large enough. While solving such a problem
remains difficult with current computing power, it is believed that general
purpose quantum computers can easily crack this problem, implying that the
security of IKEv2 is compromised. There are, however, a number of
cryptosystems that are conjectured to be resistant against quantum
computer attack.
.ti 0
1.2. Proposed Extension
.fi
This document describes a method to extend IKEv2, whilst maintaining backwards
compatibility, to perform key exchange that is robust against quantum
computers. The idea is to use an optional key exchange payload using
a quantum-safe key exchange algorithm, in addition to the existing
Diffie-Hellman key exchange. The secrets established from each key
exchange are combined in a way such that should the quantum-safe secret
not be present, the derived shared secret is equivalent to that of the
standard IKEv2; on the other hand, a quantum-safe shared secret is
obtained if both key exchange payloads are present. This extension also
applies to key exchanges in IKE Security Associations (SAs) for
Encapsulating Security Payload (ESP) [ESP] or Authentication Header
(AH) [AH], i.e. Child SAs, in order to provide a stronger guarantee
of forward security.
The goals of this extension are:
.in 9
.ti 6
o to allow an additional key exchange using a quantum-safe algorithm
to be used alongside the existing key exchange algorithm while we are
transitioning to a post-quantum era;
.ti 6
o to keep the modifications to IKEv2 to a minimum whilst maintaining
compatibility with IKEv2; and
.ti 6
o to provide a path to phase out the existing Diffie-Hellman key exchange
in the future.
.in 3
It is expected that implementers of this specification are familiar
with IKEv2 [RFC7296], and are knowledgeable about quantum-safe
cryptosystems, in particular key exchange mechanisms and
key encapsulation mechanisms instantiated with public-key encryption.
The remainder of this document is organized as follows. Subsection 1.3
provides an overview of the terminology and the abbreviations
used in this document. Section 2 specifies how quantum-safe key exchange
is performed between two IKE peers and how keying materials are derived
in both IKE and Child SAs. The rationale behind the approach of this
extension is described in Section 3. Section 4 discusses security
considerations. Section 5 describes IANA considerations for the
name spaces introduced in this document. This is followed by a list
of cited references and the authors' contact information.
.ti 0
1.3. Terminology
.fi
The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD,
SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this
document, are to be interpreted as described in RFC 2119 [RFC2119]. In
addition to using the terms defined in IKEv2 [RFC7296], this document
uses the following list of abbreviations:
.in 12
.ti 3
KEM:
It stands for key encapsulation mechanism whereby key material
is transported using a public-key algorithm.
.ti 3
QSKE:
Denotes a quantum-safe key exchange payload, which is similar to
Key Exchange (KE) payload.
.ti 0
.ti 3
QSSS:
Denotes a quantum-safe shared secret (QSSS) established from QSKEi
and QSKEr payloads. This entity is similar to the Diffie-Hellman
shared secret g^ir as defined in RFC 7296.
.ti 0
.ti 3
Q-S Group:
.in 12
It stands for Quantum-Safe Group and it represents a quantum-safe
cryptography algorithm for key exchange. Each group corresponds
to an algorithm with a specific set of parameters.
.in 3
.ti 0
2. Hybrid Quantum-Safe Key Exchange
.fi
IKEv2 key exchange occurs in IKE_SA_INIT or CREATE_CHILD_SA
message pair which contains various payloads for negotiating cryptographic
algorithms, exchanging nonces, and performing a Diffie-Hellman shared
secret exchange for an IKE SA or a Child SA. These payloads are chained
together forming a linked-list and this flexible structure allows an
additional key exchange payload, denoted QSKE, to be introduced. The
additional key exchange uses algorithms that are currently considered to be
resistant to quantum computer attacks. These algorithms are collectively
referred to as quantum-safe algorithms in this document.
.ti 0
2.1. Quantum-Safe Group Transform Type
.fi
In generating keying materials within IKEv2, both initiator and responder
negotiate up to four cryptographic algorithms in the SA payload of an
IKE_SA_INIT or a CREATE_CHILD_SA exchange. One of the negotiated
algorithms is an ephemeral Diffie-Hellman algorithm,
which is used for key-exchange. This negotiation is facilitated by the
Transform Type 4 (Diffie-Hellman Group) where each Diffie-Hellman group
is assigned a unique Transform ID.
In order to enable a quantum-safe key exchange in IKEv2, the various
quantum-safe algorithms MUST be negotiated between two IKEv2
peers. Transform Type #tba (Quantum-Safe Group) is used to facilitate
this negotiation. It is identical to Transform Type 4,
except that the latter deals with various Diffie-Hellman
groups only whereas the former handles quantum-safe algorithms
only. Each quantum-safe algorithm is assigned a unique Transform ID.
Whilst all the key exchange algorithms in Transform Type 4 are based
on Diffie-Hellman, some of the algorithms in Transform Type #tba
are Diffie-Hellman-like, and the rest of the algorithms use
key-encapsulation-mechanism (KEM). In the case of KEM, the initiator
randomly generates a random, ephemeral public and private key pair, and
sends the public key to the responder in QSKEi payload. The responder
generates a random entity, encrypts it using the received public key,
and sends the encrypted quantity to the initiator in QSKEr payload. The
initiator decrypts the encrypted payload using the private key. After
this point of the exchange, both initiator and responder
have the same random entity from which the quantum-safe shared
secret (QSSS) is derived.
The Transform Type #tba (Quantum-Safe Group) is defined as an
optional type in IKE, AH and ESP protocols. This transform type
MUST NOT exist if there is no Transform Type 4 in a proposal.
For Transform Type #tba, the defined list of quantum-safe
Transform IDs are listed below. Note that the values below are
only current as of the publication date of this document. Readers
should refer to [IKEV2IANA] for the latest values.
.in 6
.nf
Name Number Key exchange
------------------------------------------------------
RLWE 128 1 Diffie-Hellman-like
NewHope 128 2 Diffie-Hellman-like
NTRU EES743EP1 3 KEM
NTRU-Prime 216 4 KEM
.fi
.in 3
.ti 0
2.2. IKE_SA_INIT Exchange
The IKE_SA_INIT request and response pairs negotiate cryptographic
algorithms, exchange nonces and perform a key exchange for an IKE SA.
.in 6
.nf
Initiator Responder
--------------------------------------------------------------
HDR, SAi1, KEi, [QSKEi,]
Ni -->
.fi
.in 3
The initiator sends a QSKEi payload which contains parameters needed
to established a quantum-safe shared secret. The QSKEi payload is marked
as OPTIONAL so that it will be ignored by a responder
who does not understand it. In this particular case, the responder
will respond with a set of payloads as defined in IKEv2 [RFC7296],
and therefore maintaining compatibility with existing implementation. On
the other hand, if the responder implements this specification,
it will respond as follows:
.in 6
.nf
<-- HDR, SAr1, KEr, [QSKEr,]
Nr, [CERTREQ]
.fi
.in 3
The QSKEr payload completes the quantum-safe shared secret between
the initiator and responder.
At this point in the negotiation, both initiator and responder is able
to compute:
.in 12
.ti 6
o a shared Diffie-Hellman secret from KEi and KEr pair, and
.ti 6
o a quantum-safe shared secret from QSKEi and QSKEr pair.
.fi
.in 3
Using these two shared secrets, each peer generates SKEYSEED, from which
all keying materials for protection of the IKE SA are derived. The
quantity SKEYSEED is computed as follows:
.in 6
.df
SKEYSEED = prf(Ni | Nr, g^ir | QSSS)
.fi
.in 3
where prf, Ni, Nr, and g^ir are defined as in IKEv2 [RFC7296]. QSSS
is represented as an octet string. The seven secrets derived from
SKEYSEED, namely SK_d, SK_ai, SK_ar, SK_ei, SK_er, SK_pi, and SK_pr,
are generated as defined in IKEv2 [RFC7296].
Because the initiator sends a QSKE payload, which contains quantum-safe
data, in the IKE_SA_INIT, it must guess a Q-S group that the responder
will select from its list of proposed groups. If the initiator guesses
incorrectly, the responder will respond with a Notify payload of type
INVALID_QSKE_PAYLOAD indicating the selected Q-S group and
the initiator MUST retry the IKE_SA_INIT with the corrected Q-S
group. There are two octets of data associated with this notification,
which contains the accepted Quantum-Safe Group Transform Type number in
big endian order. As in the case of INVALID_KE_PAYLOAD, the initiator
MUST again propose its full set of acceptable cryptographic suites because
the rejection message was not authenticated, which may lead to any potential
vulnerabilities exploitation.
.ti 0
2.3. CREATE_CHILD_SA Exchange
.fi
The CREATE_CHILD_SA exchange is used to create new Child SAs and to rekey
both IKE SAs and Child SAs. If the CREATE_CHILD_SA request contains a
KE payload, it MAY also contain an optional QSKE payload to enable
quantum-safe forward secrecy for the Child SA. The keying material for
the Child SA is a function of Sk_d established during the establishment
of the IKE SA, the nonces exchanged during the CREATE_CHILD_SA exchange,
the Diffie-Hellman value, and the quantum-safe data (if QSKE payload is
included in the CREATE_CHILD_SA exchange).
If a CREATE_CHILD_SA request includes a QSKEi payload, at least one of
the SA offers MUST include a Q-S group in one of its transform
structures. The Q-S group MUST be an element of the group that the
initiator expects the responder to accept. If the responder selects
a different Q-S group, the responder MUST reject the
request by sending INVALID_QSKE_PAYLOAD Notify payload. The
responder's preferred Q-S group
is indicated in this notify payload. In the case of a rejection, the
initiator should retry with another CREATE_CHILD_SA request
containing a Q-S group that was indicated in the INVALID_QSKE_PAYLOAD
Notify payload.
.ti 0
2.3.1. New Child SAs from the CREATE_CHILD_SA Exchange
.fi
The CREATED_CHILD_SA request and response pair to create a new
Child SA is shown below:
.in 6
.nf
Initiator Responder
--------------------------------------------------------------
HDR, SK {SA, Ni,
[KEi,] [QSKEi,] TSi, TSr} -->
<-- HDR, SK {SA, Nr,
[KEr,] [QSKEr,] TSi, TSr}
.fi
.in 3
The initiator sends an encrypted request containing SA offer(s),
a nonce, optional Diffie-Hellman and quantum-safe key exchange data and
the proposed Traffic Selectors.
The responder replies with an encrypted response containing the
accepted SA offer, a nonce, a Diffie-Hellman value if KEi was
included in the request and the expected Diffie-Hellman group
was selected, a quantum-safe data if QSKEi
was included in the request and the expected Q-S group was selected,
and the accepted Traffic Selectors.
The keying material of these CREATE_CHILD_SA exchanges that have
both KE and QSKE payloads is defined as:
.in 6
.nf
KEYMAT = prf+(SK_d, QSSS (new) | g^ir (new) | Ni | Nr)
.fi
.in 3
where prf+, Sk_d, g^ir (new), Ni and Nr are defined in
IKEv2 [RFC7296], and QSSS (new) is the shared secret from
the ephemeral quantum-safe key exchange. The QSSS quantity
is represented as an octet string.
.ti 0
2.3.2. Rekeying IKE SAs with the CREATE_CHILD_SA Exchange
.fi
The CREATE_CHILD_SA request and response pair for rekeying
an IKE SA is shown below:
.in 6
.nf
Initiator Responder
--------------------------------------------------------------
HDR, SK{SA, Ni,
KEi[, QSKEi]} -->
<-- HDR, SK {SA, Nr,
KEr[, QSKEr]}
.fi
.in 3
The initiator sends an encrypted request containing amongst other
payloads, a KEi payload which carries a Diffie-Hellman value, and
an OPTIONAL QSKEi payload which carries a quantum-safe data.
The responder replies with an encrypted response containing a number
of payloads. If the responder selects a Diffie-Hellman group that
matches one of the proposed group(s), a KEr payload containing a
Diffie-Hellman public value is replied in the encrypted response. If
the request contains a QSKEr payload and the responder selects a
Q-S group that matches one of the proposed group(s), a QSKEr payload
containing quantum-safe data is sent in the reply.
The quantity SKEYSEED for the new IKE SA is computed as follows:
.in 6
.nf
SKEYSEED = prf(SK_d (old), QSSS (new) | g^ir (new) | Ni | Nr)
.fi
.in 3
where prf, SK_d (old), g^ir (new), Ni and Nr are defined in
IKEv2 [RFC7296], QSSS (new) is the shared secret from the
ephemeral quantum-safe key exchange. The QSSS quantity is
represented as an octet string.
.ti 0
2.3.3. Rekeying Child SAs with the CREATE_CHILD_SA Exchange
.fi
The CREATE_CHILD_SA request and response pair for rekeying
a Child SA is shown below:
.in 6
.nf
Initiator Responder
--------------------------------------------------------------
HDR, SK {N(REKEY_SA), SA,
Ni, [KEi,] [QSKEi,]
TSi, TSr} -->
<-- HDR, SK {SA, Nr,
[KEr,] [QSKEr,] TSi, TSr}
.fi
.in 3
Both KEi and QSKEi payloads are OPTIONAL. The KEi
and QSKEi payloads, which are sent encrypted by the initiator,
carry a Diffie-Hellman value and quantum-safe data respectively.
If the CREATE_CHILD_SA request includes KEi and QSKEi payloads,
provided that a Diffie-Hellman group and a Q-S group are present
in the SA offers, the responder replies with an encrypted response
containing both KEr and QSKEr payloads.
The keying material computation of this exchange is the same as that
defined in [Section 2.3.1].
.ti 0
2.4. QSKE Payload Format
.fi
The quantum-safe key exchange payload, denoted QSKE in this document,
is used to exchange a quantum-safe shared secret between two IKE
peers. The QSKE payload consists of the IKE generic payload header,
a two-octet value denoting the Quantum-Safe Group number, and followed
by the quantum-safe data itself. The format of the QSKE payload is shown
below.
.in 6
.nf
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Payload |C| RESERVED | Payload Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Quantum-Safe Group Num | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Quantum-Safe Data ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
.fi
.in 3
The length of the quantum-safe data varies depending on the type
of quantum-safe cipher. The content type of quantum-safe data is
also dependent on the type of quantum-safe cipher. For quantum-safe
ciphers that use Diffie-Hellman-like key exchange, the content
of the quantum-safe data is the proposed/accepted cipher's
public value. For ciphers that use KEM, the
content is either a random public-key of the proposed quantum-safe
cipher in the case of QSKEi payload, or the content is a ciphertext
produced using the received public-key in the case of QSKEr payload.
The Quantum-Safe Group Num identifies the quantum-safe cipher
with which the quantum-safe data was computed. The Quantum-Safe
Group Num MUST match the Q-S group specified in a proposal in the SA
payload sent in the same message. If the proposal in the
SA payload does not specify a quantum-safe cipher, the QSKE payload
MUST NOT be present. If the responder selects a Q-S group that does not
match the proposed group, the quantum-safe key exchange
MUST be rejected with a Notify payload of type INVALID_QSKE_PAYLOAD. The
chosen Q-S group is indicated in the INVALID_QSKE_PAYLOAD Notify payload
and the initiator can restart the exchange with that group.
The payload type for the QSKE payload is TBA (TBA).
.fi
.in 3
.ti 0
3. Design Rationale
.fi
In general, the size of QSKE payload is larger than that of the KE
counterpart and sending it in the IKE_SA_INIT may prevent peers from
establishing IPSec Security Association (SA) due to fragmentation. While
the fragmentation issue may be addressed by sending QSKE in the IKE_AUTH
exchange, it is decided that QSKE should still be exchanged in the
IKE_SA_INIT. The rationale behind this decision is discussed below.
.ti 0
3.1. Threat Categories
.fi
The treats to the IKE exchange can be broken into two categories:
.in 10
.ti 6
1. From current day until general purpose quantum computers are available.
The addition of the QSKE allows the IKEv2 exchange to be secured against
an adversary who captures all control plane (IKE) and data plane (ESP)
traffic, with the intention of breaking the IKE exchange (when quantum
computers become available) and subsequently being able to view the data
plane traffic. The use of the QSKE in the IKE_SA_INIT results in the
IKE SA becoming quantum secure against future attacks.
.ti 6
2. After general purpose quantum computers are available.
Once general purpose quantum computers are available there are two types
of attack:
.in 13
.ti 10
o Active attack
Assuming that a general purpose quantum computer is available and an
adversary can manipulate the IKE exchange in real time. The attacker
can break Diffie-Hellman in real time, but not the QSKE. This results
in the IKE_AUTH exchange being secure as the QSKE is included in the
derivation of key material used to secure the IKE_AUTH exchange.
However, an active attacker who can sit between two hosts and impersonate
each host can perform a man-in-the-middle (MitM) attack when the authentication
method is not quantum secure. This includes any asymmetric authentication
method and non-quantum computer resistant Extensible Authentication Protocol
(EAP) authentication. For authentication methods which are quantum secure,
such as using shared key message integrity code comprising a shared-secret
with sufficient entropy (256 bits), this allows for the IKEv2 exchange to be
secured against an active adversary when including the QSKE.
.in 13
.ti 10
o Passive attack
As per the first category, the addition of the QSKE allows the IKEv2 exchange
to be secured against an adversary who captures all control plane (IKE) and
data plane (ESP) traffic, with the intention of breaking the IKE exchange.
.fi
.in 3
.ti 0
3.2. Dealing with Fragmentation
In some instances, the QSKE public value will be large enough to cause
fragmentation to occur at the IP layer. In practice, there will be
cases where IKE traffic fragmented at the IP layer will be dropped by
network devices such as NAT/PAT gateways, Intrusion Prevention System (IPS),
firewalls and proxies, that cannot handle IP fragments or are configured
to block IP fragments. This blocked traffic will prevent the IKE session
from being established. The issue with fragmentation can easily be avoided
by moving the QSKE to the IKE_AUTH exchange and by employing IKEv2 Message
Fragmentation [RFC7383]. The implication of this is that while all the
Child SAs, which carry the data traffic, would be quantum secure, the IKE SA
itself would not be, resulting in the disclosure of IKE identities and IPsec
proxies. Furthermore by sending the QSKE in IKE_AUTH and not IKE_SA_INIT
would allow an active attacker with a quantum computer to perform attacks
against IKE such as forging an identity used for authentication, abuse of
attributes sent in the CFG exchange, MitM attack, DoS, etc. It is believed
that the trade off to deliver a quantum resistant IKE SA is of greater
security benefit than the issues that could be encountered due to
fragmentation at the IP layer. It is worth noting that encapsulating
IKE traffic within TCP [IKETCPENCAP] is a simple method to prevent
IKE_SA_INIT traffic being fragmented at the IP layer.
The following table gives an idea of the common size of the QSKE payload
in the proposed schemes.
.in 6
.nf
Scheme QSKE size (octets)
-------------------------------------
RLWE 128 4096
NewHope 128 1792
NTRU EES743EP1 1030
NTRU-Prime 216 1200
.fi
.in 3
It is evident that both NewHope 128 and RLWE 128 will naturally increase
an IP Maximum Transmission Unit (MTU) to be larger than 1500 octets which
is common for most Internet traffic, resulting in the IKE_SA_INIT being
fragmented at the IP layer.
.in 3
.ti 0
3.3. Removal of the Diffie-Hellman exchange
The IKE_SA_INIT exchange currently mandates the use of the Diffie-Hellman. As
the Diffie-Hellman exchange is not quantum secure and the QSKE exchange is
quantum secure, the addition of the QSKE can be thought of making the
Diffie-Hellman redundant. This draft does not advise removing the use of
Diffie-Hellman, though future implementations that have migrated to using
QSKE could remove the requirement to send the Diffie-Hellman exchange with
the QSKE providing the same functionality. Sending the QSKE in the
IKE_SA_INIT allows for a simple transition to only using QSKE should the
need to remove the Diffie-Hellman exchange occur.
.ti 0
4. Security Considerations
The key length of the Encryption Algorithm (Transform Type 1),
the Pseudorandom Function (Transform Type 2) and the Integrity Algorithm
(Transform Type 3), all have to be of sufficient
length to prevent attacks using Grover's algorithm [GROVER]. In order to
use the extension proposed in this document, the key lengths of these
transforms SHALL be at least 256 bits long in order to prevent any quantum
attacks from succeeding. Accordingly the post-quantum security level
achieved is at least 128 bits.
The quantities SKEYSEED and KEYMAT are calculated from shared
secrets, g^ir and QSSS, using an algorithm defined in Transform
Type 2. While a quantum attacker may learn the value of g^ir,
the quantity QSSS ensures that neither SKEYSEED nor KEYMAT is
compromised. This assumes that the algorithm defined
in the Transform Type 2 is quantum-safe.
Because some quantum-safe public values are in the order of
several KB, a IKEv2 message that contains such a QSKE payload will exceed
the path Maximum Transmission Unit (MTU) and the message may be
fragmented at the IP level. This presents the possibility of an attack
vector that relies on IP fragmentation. One such attack vector is to mount
a denial of service by swamping a receiver with IP fragments
[DOSUDPPROT]. This issue could be mitigated by employing TCP encapsulation
[IKETCPENCAP].
The authenticity of the SAs established under IKEv2 is protected using a
pre-shared key, RSA, DSS, or ECDSA algorithms. Whilst the pre-shared key
option, provided the key is long enough, is quantum-safe, the other algorithms
are not. Moreover, in implementations where scalability is a requirement,
the pre-shared key method may not be suitable. Quantum-safe authenticity
may be provided by using a quantum-safe digital signature and several
quantum-safe digital signature methods are being explored by IETF. For
example the hash based method, XMSS has the status of an Internet Draft,
see [XMSS]. Currently, quantum-safe authentication methods are not specified
in this document, but are planned to be incorporated in due course.
It should be noted that the purpose of quantum-safe algorithms is to prevent
attacks, mounted in the future, from succeeding. The current threat is that
encrypted sessions may be subject to eavesdropping and archived with decryption
by quantum computers taking place at some point in the future. Until quantum
computers become available there is no point in attacking the authenticity of
a connection because there are no possibilities for exploitation. These only
occur at the time of the connection, for example by mounting a MitM
attack. Consequently there is not such a pressing need for quantum-safe
authenticity.
The use of the QSKE provides an method for malicious parties to send
IKE_SA_INIT initiator messages containing QSKE of type KEM and with
random values. As the standard behavior is for the responder to generate
a random entity, encrypt it using the received public key (which would be
a random value), and sends the encrypted quantity to the initiator in QSKEr
payload. This allows for a simply method for malicious parties to cause a
VPN gateway to perform excessive processing. To mitigate against this threat,
implementations can make use of the COOKIE notification as defined in
[RFC7296], to mitigate spoofed traffic and [RFC8019] to minimize the impact
from hosts who use their own IP address.
.ti 0
5. IANA Considerations
This document defines a new IANA registry for IKEv2 Transform Types.
.in 6
.nf
Trans.
Description Type Used In
-----------------------------------------------------------
Quantum-Safe Group (Q-S) tba Optional in IKE, AH & ESP
.in 3
.fi
A number of Transform IDs of the Q-S group Transform Type are also
defined. The initial values are listed below:
.in 6
.nf
Name Value
------------------------------
RLWE 128 1
NewHope 128 2
NTRU EES743EP1 3
NTRU-Prime 216 4
.in 3
.fi
In order to transport quantum-safe data to establish a quantum-safe SA,
this extension registers a new key exchange payload in the IKEv2
Payload Types of the IANA registry:
.in 6
.nf
Description Notation Value
---------------------------------
QSKE Payload QSKE tba
.in 3
.fi
This extension also specifies a new error type in the IKEv2 Notify
Message Types - Error Types of the IANA registry:
.in 6
.nf
Error Type Value
------------------------------
INVALID_QSKE_PAYLOAD tba
.in 3
.fi
.ti 0
6. References
.in 14
.ti 3
[ADPS] Alkim, E., Ducas, L., Poppelmann, T., and Schwabe, P., "Post-quantum
Key Exchange - a New Hope", 25th USENIX Security Symposium, pp. 327-343, 2016.
.ti 3
[AH] Kent, S., "IP Authentication Header", RFC 4302, December 2005,
<http://www.rfc-editor.org/info/rfc4302>.
.ti 3
[BCNS15] Bos, J., Costello, C., Naehrig, M., and Stebila, D., "Post-quantum
Key Exchange for the TLS Protocol from the Ring Learning with Errors Problem",
IEEE Symposium on Security and Privacy, pp. 553-570, 2015.
.ti 3
[DH] Diffie, W., and Hellman, M., "New Directions in Cryptography",
IEEE Transactions on Information Theory, V.IT-22 n. 6, June 1977.
.ti 3
[DOSUDPPROT]
.ti 14
Kaufman, C., Perlman, R., and Sommerfeld, B., "DoS
protection for UDP-based protocols", ACM Conference on Computer and
Communications Security, October 2003.
.ti 3
[ESP] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 4303,
December 2005, <http://www.rfc-editor.org/info/rfc4303>.
.ti 3
[GROVER] Grover, L., "A Fast Quantum Mechanical Algorithm for
Database Search", Proc. of the Twenty-Eighth Annual ACM Symposium
on the Theory of Computing (STOC 1996), 1996
.ti 3
[IKETCPENCAP]
.ti 14
Pauly, T., Touati, S., and Mantha, R., "TCP Encapsulation of IKE and IPsec
Packets", draft RFC, May 2017, <https://tools.ietf.org/html/draft-ietf-ipsecme-tcp-encaps-10>.
.ti 3
[IKEV2IANA]
.ti 14
IANA, "Internet Key Exchange Version 2 (IKEv2) Parameters",
<http://www.iana.org/assignments/ikev2-parameters/>.
.ti 3
[LOGJAM] Adrian, D., Bhargavan, K., Durumeric, Z., Gaudry, P.,
Green, M., Halderman, J., Heninger, N., Springall, D., Thome, E.,
Valenta, L., VanderSloot, B., Wustrow, E., Beguelin, S., and
Zimmermann, P., "Imperfect forward secrecy: How Diffie-Hellman fails
in practice", Proc. 22rd ACM SIGSAC Conference on Computer and
Communications Security, pp. 5-17, 2015.
.ti 3
[NTRU] Hoffstein, J., Pipher, J., and Silverman, J., "NTRU: A Ring-Based
Public Key Cryptosystem", Lecture Notes in Computer Science, pp. 267-288,
1998.
.ti 3
[NTRUPRIME]
.ti 14
Bernstein, D., Chuengsatiansup, C., Lange, T., and van Vredendaal, C.,
"NTRU Prime", IACR Cryptology ePrint Archive: Report 2016/461, 2016.
.ti 3
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", RFC 2119, March 1997.
.ti 3
[RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and Kivinen, T.,
"Internet Key Exchange Protocol Version 2 (IKEv2)", RFC 7296, October 2014.
.ti 3
[RFC7383] Smyslov, V., "Internet Key Exchange Protocol Version 2 (IKEv2)
Message Fragmentation", RFC 7383, November 2014.
.ti 3
[RFC8019] Nir, Y., Smyslov, V., "Protecting Internet Key Exchange Protocol
Version 2 (IKEv2) Implementations from Distributed Denial-of-Service Attacks",
RFC 8019, November 2016.
.ti 3
[XMSS] Huelsing, A., Butin, D., Gazdag, S., and Mohaisen, A.,
"XMSS: Extended Hash-Based Signatures", Crypto Forum Research Group Internet
Draft, 2017
.ti 0
.in 3
Appendix A. Quantum-safe Ciphers
Each of the specific quantum-safe ciphers is assigned a unique Transform
ID. All of the selected quantum-safe ciphers are based on lattice
construction. Specifically the ciphers fall into the categories of
Ring Learning With Errors, NTRU and Streamlined NTRU Prime. In
each case the selected parameters are chosen so as to achieve at least 128
bits of post-quantum security.
.ti 0
.in 3
Appendix A.1. Ring Learning With Errors
Ring Learning with Errors is a cryptographic primitive that relies
on the worst-case hardness of a shortest vector problem in ideal
lattices. It is commonly abbreviated as RLWE. The security parameters
are given by an integer n which is a power of 2, a prime integer q, an array
of n coefficients denoted by {a} and a standard deviation sigma along with the
type of error distribution X. Note that each coefficient of {a} is less
than the prime q and is sampled from distribution X. Let a(x) be a
polynomial, whose coefficients are given by {a}, the RLWE problem can be
stated as follows: given polynomials a(x), b(x) and a small polynomial e(x),
find the secret s(x) from the relationship a(x) * s(x) + b(x) = e(x) modulo q.
.nf
RLWE 128
--------
.fi
This set of parameters follows the system described by Bos et al
[BCNS15]. Using a fixed coefficient array {a} in this way may result
in security vulnerabilities such as "all-for-the-price-of-one" precomputation
attacks such as the Logjam attack on the classical Diffie-Hellman
key exchange [LOGJAM]. As has been pointed out since, this is
straightforwardly solved by the coefficient array {a} being generated
on-the-fly for each key exchange from a seed value shared by the
initiator and responder. The fixed coefficient array {a} is also avoided
in similar fashion in NewHope 128 (see below).
The set of parameters that is proposed by Bos et al is given as follows:
.in 6
.nf
n = 1024
q = 2^32 -1
sigma = 8/sqrt(2 * PI)
X = discrete Gaussian
{a} = 29FE0191, DD1A457D, 3534EE4B, 6450ED74, BBFE9F64, 92BF0F31,
.in 12
8DCF8995, 4C5E30D0, 9E2ED04D, 8C18FE0B, 1A70F2E7, 2625CD93,
0065DA14, 6E009722, E6A70E8B, AEF6EF56, 8C6C06AF, 9E59E953,
4995F67B, E918EE9D, 8B4F41A7, 0D811041, F5FE6458, 3C02B584,
CBCFC8FD, 5A01F116, 73408361, 44D3A098, BBDEECF6, 90E09082,
F8538BA4, F9600091, D8D30FEF, 56201487, ACB2159D, 38F47F77,
ED7A864F, 8FC785CA, 7CBD6108, 3CA577DE, FF44CCC2, A1385A79,
5C88E3AD, 177C46A9, DA4A4DD8, 2AA3594F, A4A5E629, 47CA6F6E,
B2DF1BC6, 6841B78E, 0823F5A8, A18C7D52, 7634A0D1, DA1751BA,
18B9D25D, 5B2643BC, ACC6975D, 48E786F4, 05E3ED4E, 4DC86568,
3F5C5F99, 585DBFD7, EF6E0715, 7D36B823, 12D872CD, D7B78F27,
DD672BF5, 2DC7C7EB, A3033801, 50E48348, 9162A260, 0BE8F15B,
ABB563EC, 06624C5A, 812BF7BC, 8637AC35, F44504F3, FF8577AB,
4A0161B0, 000AEB0E, 311204AF, 2A76831B, 4D903F3A, 97204FA9,
9EB524E3, 1757AFAC, BA369FEC, CD8F198D, 6B33C246, 51C13FCE,
B58ACC4E, 39ACF8DA, 7BB7EBF7, EDC1449D, C7B47FDB, 9C39148D,
4E688D7B, FAD0C2C2, 296CE85C, 6045C89C, 6441C0C6, 50C7C83A,
C11764DD, 58D7EEA2, E57B9D0E, 4E142770, B8BFBB59, E143EBAA,
FF60C855, 238727F0, E35B4A5B, 8F96940B, 4498A6BA, 5911093A,
394DD002, 521B00D2, 140BDAF9, EAB67207, 21E631A6, A04AADA9,
A96A9843, 4B44CC9B, E4D24C33, C7E7AE78, E45A6C72, CBE61D3C,
CE5A4869, 10442A52, DB11F194, 39FC415D, 7E7BDB76, AE9EFA22,
25F4F262, 472DD0A7, 42EBD7A0, E8038ECE, D3DB002A, 8416D2EC,
DF88C989, 7FEA22D5, C7A3F6FE, 37409982, F45B75E2, 9A4AC289,
90406FD6, EA1C74A5, 5777B39F, D07F1FA3, CE6EDA0D, D150ECFB,
BEFF71BA, 50129EFC, 51CE65B9, B9FB0AB8, 770C59CB, 11F2354F,
8623D4BB, D6FCAFD6, B2B1697C, 0D7067E2, 2BA5AFB9, D369C585,
5B5E156C, D8C81E6E, 80CFDF16, F6F441EB, C173BAF5, 78099E3A,
D38F027B, 4AC8D518, 8D0108A1, E442B0F1, 56F9EA3C, D0D6BBCA,
4E17DCB4, 69BF743B, 0CCE779F, D5E59851, 63861EA2, B1CB22C1,
BBFD2ACE, DDA390D1, EDF1059F, 04F80F89, B13AF849, 58C66009,
E0D781C0, 588DC348, A305669D, 0D7AF67F, 32BC3C38, D725EFBA,
DC3D9434, 22BD7ED8, 2DFD2926, 4BDEAD3A, B2D5ECE6, 16B05C99,
FEEC7104, F6CAC918, 0944C774, CE00633B, C59DA01A, 41E8E924,
335DF501, 3049E8EE, 5B4B8AAC, C962FC91, D6BB22B3, 0AC870EB,
C3D99400, A0CEAC28, AF07DE1E, 831C2824, 258C5DDC, 779417E6,
41CB33D0, 4E51076A, D1DB6038, 9E0B1C41, A9A1F90D, F27E7705,
75892711, 5D9F1175, 85CC508B, 5CA415BE, 1858C792, FB18632F,
C94111EB, 937C0D28, C2A09970, 386209D9, BBDD9787, 2473F53A,
EF7E7637, CFC8630B, 2BA3B7F8, 3C0047AD, 10D76FF7, B1D9414D,
CEB7B902, A5B543F5, 2E484905, E0233C10, D061A1F8, CED0A901,
AC373CAC, 04281F37, 3609797F, DB80964D, 7B49A74F, 7699656F,
0DCEC4BC, 0EC49C2D, F1573A4E, A3708464, 9A1E89F0, 6B26DEB6,
2329FA10, CA4F2BFF, 9E012C8E, 788C1DFD, 2C758156, 2774C544,
150A1F7D, 50156D6E, 7B675DE1, 5D634703, A7CEB801, 92733DAB,
B213C00B, 304A65B1, 8856CF8E, 7FF7DD67, D0912293, 30064297,
663D051D, 01BC31B4, 2B1700BD, 39D7D18F, 1EAD5C95, 6FB9CD8B,
A09993A6, B42071C0, 3C1F2195, 7FDF4CF8, C7565A7E, 64703D34,
14B250EF, 2FA338D2, AEE576DC, 6CCED41D, 612D0913, D0680733,
8B4DBE8A, 6FFEA3D0, 46197CA2, A77F916F, FA5D7BD6, 01E22AEB,
18E462DD, 4EC9B937, DE753212, 05113C94, 7786FBD4, FB379F71,
756CF595, EAADCFAB, BBD74C2E, 1F234AC9, 85E28AEB, 329F7878,
D48FDE09, 47A60D0A, AE95163F, 72E70995, 27F9FCBF, BDCFCC41,
334BC498, EE7931A1, DFA6AEF4, 1EC5E1BF, 6221870F, CD54AE13,
7B56EF58, 4847B490, 31640CD3, 10940E14, 556CC334, C9E9B521,
499611FF, BEC8D592, 44A7DCB7, 4AC2EABD, 7D387357, 1B76D4B6,